strobe media player issue - yii

i want to to play media files(video and audio) using strobe media player.
this is the first time i'am using it.
can anybody tell me whats the wrong here:
widget('application.extensions.StrobeMediaPlayback.smp.StrobeMediaPlayback',array(
//Embed a video from youtube with youtube plugin,included by default:
'src'=>$url,
'width'=>'680',
'height'=>'400',
'allowFullScreen'=>'true' //default is true
));
the error is:
we are having problems with playback
the url: C:\wamp\www\mediastore/files/video/Community1/28237.flv
could you give me some tutorials about strobe media player within yii please ?
network errors:
GET http://localhost/mediastore/index.php/files/play/ConfigurationEchoPlugin1.swf 400 (Bad Request) 22:1
GET http://localhost/mediastore/index.php/files/play/ConfigurationEchoPlugin2.swf 400 (Bad Request) 22:1
GET http://localhost/mediastore/index.php/files/play/ConfigurationEchoPlugin1.swf 400 (Bad Request) ConfigurationEchoPlugin1.swf:1
GET http://localhost/mediastore/index.php/files/play/ConfigurationEchoPlugin2.swf 400 (Bad Request) ConfigurationEchoPlugin2.swf:1

Related

Cannot Send Video Files Using Twilio's Whatsapp API

I am Currently on a Project Which Captures a Video Detects for a Light Source in it and if The source Exists The Video gets Recorded and saved in cloudinary.com,
What I did after was i passed the cloudinary url into the media_url of twilio create function,
There are no error codes in the response, the status is 'queued' and The dashboard at twilio shows nothing.
Where Would The Problem Be?

React Native - Network request failed when uploading image second time

I have found what seems to be a bug on Android. I have not tested it on IOS.
updateProfilePhoto() is a redux thunk that just sends a PUT request to my node server.
The problem is this, I can upload an image to my node server using fetch. The image is received and saved successfully on the server. If I wait for about 1 second and the upload another image, it goes through successfully. However, if I upload an image and then upload another immediately after the first one goes through, I get the error 'Network request failed' and the second image will not be received on the server.
It seems to me that I cannot constantly upload images back to back really quickly, one will go through, the next one will fail and the next will go through... and so on.
I am testing on an Android Emulator. API level 30. I have not tested on a real device yet, I will try that when I'm able to.
The error happens for the built-in fetch() and XMLHttpRequest. Both behave the same. On XMLHttpRequest I can check the progress and it says 100% and then fails with xhr.status equal to 0.
I need a sure fire way to upload an image to my server without it failing for no reason. I can add a delay of something like 500ms between uploads and show the user that it's loading but that's a silly way to resolve the issue. I can't find out why the upload fails on the second try.
const onSelectProfileImage = (pickerResponse: ImagePickerResponse) =>
{
const uri = pickerResponse?.assets && pickerResponse.assets[0].uri;
const name = pickerResponse?.assets && pickerResponse.assets[0].fileName;
const type = pickerResponse?.assets && pickerResponse.assets[0].type;
if(uri)
{
const photo = new FormData();
photo.append('photo', {name,type,uri});
dispatch(updateProfilePhoto({photo, uri, user_id: id, headers: {...headers,"content-type": "multipart/form-data"}}))
}
}

Safari not retrieving mp4 video from cache, and sometimes timeout when downloading the same resource

I'm running a VueJS application that displays a full screen story of videos. I don't create as many tag as number of media in my story : I'm just changing component video sources each time I play a new video.
But it looks like Safari (Desktop & mobile) still does not cache HTML video once loaded : when I'm playing again a previous media, Safari is downloading again the asset. Instead of getting from cache like Chrome does.
The same issue has already been reported here but sill no correct answer.
Safari even stops downloading the final bytes video (producing a sort of timeout) when we go back and forth quicky in the story, so the story looks stuck.
Here's an example link.
Does anyone know a good alternative that avoids re-downloading video data at each play on Safari ?
Partial solution
Found myself a workaround that works pretty well if video is small size - all video are less than 3Mb in my case.
The trick is to use js fetch API to download full video, then stream it into video tag.
const videoRequest = fetch("/path/to/video.mp4")
.then(response => response.blob());
videoRequest.then(blob => {
video.src = window.URL.createObjectURL(blob);
});
Contrary to video src attribute, fetch API will get video data from cache if the same video was already fetched before.
Here a codepen demo that can be tested in Safari desktop/mobile (when NOT in private mode).
Pro : Video are now pulled from cache in Safari !
Con : You can't start the video until full data has been downloaded. That's why this solution can be used only for small video (like < 5Mb), else your users may wait a while before being able to play the video.

How to tell YouTube that a livestream is a 360 video?

We are successfully streaming video to YouTube already. However we don't know how to create the livestreams for a 360 video via the API:
My guess is that we miss some documentation about how to tell YouTube that a video stream needs to be played back in a 360 video player. We are using this code snippet to generate the liveStreams resource:
NSDictionary *stream = #{#"snippet": #{#"title": broadcast.title ? broadcast.title : #"mimoLive Livestream"},
#"cdn": #{#"resolution": resolution,
#"frameRate": framerate,
#"ingestionType": #"rtmp"}};
Is there a (un)documented key we need to add here?
Refering to YouTube API:
https://developers.google.com/youtube/v3/live/docs/liveStreams
(BTW: Facebook recently added the option is_spherical to their API to make this work)
You need to set the contentDetails.Projection field to 360 when creating a new broadcast object. It is set to rectangular by default. This is documented under https://developers.google.com/youtube/v3/live/docs/liveBroadcasts

Sonos music service: 'No Music' message when playing a program media collection

I have a music service added to Sonos in production,
I received a complaint about a user who plays from a calendar of us, and often the music stops and he gets the message 'No Music' in the player. If he presses 'play' again, Sonos continues to play again till the next 'No Music' message.
The problem happens at an element with these properties:
<ns1:mediaCollection xsi:type="ns1:mediaCollection" readOnly="true" userContent="false" renameable="false" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<ns1:id>calendar:34685</ns1:id>
<ns1:itemType>program</ns1:itemType>
<ns1:displayType>List</ns1:displayType>
<ns1:title>Stylish Restaurant</ns1:title>
<ns1:canPlay>true</ns1:canPlay>
<ns1:canEnumerate>false</ns1:canEnumerate>
<ns1:containsFavorite>false</ns1:containsFavorite>
<ns1:albumArtURI requiresAuthentication="false">images/menu/green_legacy.png</ns1:albumArtURI>
<ns1:canAddToFavorite>false</ns1:canAddToFavorite>
</ns1:mediaCollection>
The method GetMetadata with calendar:34685 works fine and returns 2 songs, to be responsive on changes in the calendar.
Is it possible that sometimes this request does not return a valid answer? If so, does anyone know which error type or error return code causes this 'no music' message? Or does it return a valid answer without any songs?
Is there a way to see all sent requests and received responses from a sonos controller or sonos device?
Thanks!