I am creating a Chromecast app that streams video and uses out of stream VTT captions. I have successfully managed to load TTML but I require to load VTT also for this I have the following code
this.player.enableCaptions(true, 'vtt', 'http://some_file.vtt');
this fails within the MediaPlayer.js with tyhe following error
Uncaught TypeError: Cannot read property 'parse' of null
This looks to be in the code to load the individual cues has anyone come across this problem?
You need to add the (text/audio) track(s) information to your MediaInfo and then set the active track. Take a look at this guide. Also be aware that having tracks, even when your media is mp4, would require CORS.
this.player.enableCaptions(true, 'vtt', 'http://some_file.vtt');
should be
this.player.enableCaptions(true, 'webvtt', 'http://some_file.vtt');
Related
Hi I have implemented cloudflare stream video service in one of the website I am developing. The video used to play just fine but since the last 2 days it is broken in Firefox. It works fine in Chrome but won’t work in firefox.
The console gives throws up the error -
Specified “type” attribute of “application/x-mpegurl” is not supported. Load of media resource https://videodelivery.net/6aaee8579a7a98ccad84660514efe586/manifest/video.m3u8 failed. (https://www.checkbayt.com/home)
Specified “type” attribute of “application/dash+xml” is not supported. Load of media resource https://videodelivery.net/6aaee8579a7a98ccad84660514efe586/manifest/video.mpd failed.
My website is located at https://www.checkbayt.com/ in case anyone wants to try it out. I have also tried to rule out issues that might be caused due to some other code in the website and did a simple html page that only has the video and nothing else. Once again this used to work fine previously and I ran the same html file in firefox and it no longer works and gives the same error.
Is this something that anyone in here also experienced? I guess this is something to do with firefox and will get resolved from their end? Or do I need to do something different?
Try keeping the stream script after the video. Not really sure why but i faced the same issue and render the script directly after the stream helped.
Note: the element should be loaded before the script as the script injects html elements into the stream tags.
I want to cast HLS Live stream to Cast Device using Cast Companion Library Android. I try the url but failed to play on Cast Device. When using VOD HLS URL, the video can play on Cast Device.
I already change the streamType: MediaInfo.Builder(url).setStreamType(MediaInfo.STREAM_TYPE_LIVE)
Or anything else I must change ?
This is the Live stream URL I want to cast: http://live.streamingfast.net/livech1.m3u8
How to cast HLS Live stream using Cast Companion Library Android? Please help...???
Thanks
When you run into such issues, you need to turn on debugging in the console to see what the issue might be. If you do so, you'll notice that your streams lack the required CORS headers:
XMLHttpRequest cannot load http://live.streamingfast.net/hls-live/livepkgr/_definst_/liveevent/live-ch1-3.m3u8. No 'Access-Control-Allow-Origin' header is present on the requested resource.
We have successfully launched with chromecast support on our app and it was perfectly working fine, from the past few days it suddenly stopped working(the receiver was alway sending the buffering status to sender and it was continuously buffering), i have used the chrome debugging and able to find this exception in console
"Uncaught NotSupportedError: Failed to execute 'addSourceBuffer' on 'MediaSource': The type provided ('video/mp2t; codecs="mp4a.40.2,avc1.77.31"') is unsupported." in the media_player.js file (on the 80th line - according to chrome debugger).
not able to understand why suddenly this error is thrown, all our customers started complaining that chromecast support is not working.
can you please guide me through the problem.
Note: I have used the custom receiver sample from google cast github and modified the styling.
we are using HLS for streaming videos:
here is the sample m3u8 file content:
#EXTM3U
#EXT-X-VERSION:1
## Created with Unified Streaming Platform(version=1.6.9)
#EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=323376,CODECS="mp4a.40.2,avc1.77.31",RESOLUTION=1024x576
707eb5bd-dcdf-4f84-b1a3-7cdbd0d4af89-audio=131072-video_eng=174000.m3u8
#EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=510996,CODECS="mp4a.40.2,avc1.77.31",RESOLUTION=1024x576
707eb5bd-dcdf-4f84-b1a3-7cdbd0d4af89-audio=131072-video_eng=351000.m3u8
#EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=722996,CODECS="mp4a.40.2,avc1.77.31",RESOLUTION=1024x576
707eb5bd-dcdf-4f84-b1a3-7cdbd0d4af89-audio=131072-video_eng=551000.m3u8
#EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=1078096,CODECS="mp4a.40.2,avc1.77.31",RESOLUTION=1024x576
707eb5bd-dcdf-4f84-b1a3-7cdbd0d4af89-audio=131072-video_eng=886000.m3u8
#EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=1415176,CODECS="mp4a.40.2,avc1.77.31",RESOLUTION=1024x576
707eb5bd-dcdf-4f84-b1a3-7cdbd0d4af89-audio=131072-video_eng=1204000.m3u8
#EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=1743776,CODECS="mp4a.40.2,avc1.77.31",RESOLUTION=1024x576
707eb5bd-dcdf-4f84-b1a3-7cdbd0d4af89-audio=131072-video_eng=1514000.m3u8
#EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=2068136,CODECS="mp4a.40.2,avc1.77.31",RESOLUTION=1024x576
707eb5bd-dcdf-4f84-b1a3-7cdbd0d4af89-audio=131072-video_eng=1820000.m3u8
#EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=2498496,CODECS="mp4a.40.2,avc1.77.31",RESOLUTION=1024x576
707eb5bd-dcdf-4f84-b1a3-7cdbd0d4af89-audio=131072-video_eng=2226000.m3u8
I did saw answer to this post:
Is avc1.66.31,mp4a.40.2 supported by the Chromecast device?
but as we have different version of avc codec - avc1.77.31 don't know, what's the best way to get it working.
Note: I have posted the same question on G+ community, will update the answer there if i find a working solution here. thanks.
Try replacing your codec with avc1.77.30
host.processManifest = function(manifest) {
return manifest.replace(/CODECS=\"avc1.77.([0-9]*)/g, 'CODECS=\"avc1.77.30');
};
trying to launch a video streaming request with smooth Streaming i tried this example with their url and also my uri " but it didn't work , i tried it on vlc also it worked with an iphone application .. ! this is a part of my xaml code :
<Core:SMFPlayer>
<Core:SMFPlayer.Playlist>
<Media:PlaylistItem DeliveryMethod="AdaptiveStreaming" MediaSource="http://streaming.toutech.net:1936/live/jawharafm.sdp/playlist.m3u8"/>
</Core:SMFPlayer.Playlist>
</Core:SMFPlayer>
SMFPlayer does not support HLS streaming. For WindowsPhone you may want to use SmoothStreaming
Also, there was a project on codeplex that could play HLS streaming on a WindowsPhone, however it is not online anymore. I only found the tweet that referenced this project: https://twitter.com/JustinAngel/status/179253691549888514
Update
The HLS streaming for WindowsPhone is back online: http://phonesm.codeplex.com/
I have an mp3 file in an S3 bucket. I am fetching this file via ajax GET request for html5 audio playback. Intermittently, the get request will fail to download the file and thus the track will not play. The request returns "206 partial content." Oddly, it will work several times before failing and then continuing to fail.
If I disable caching in my browser (chrome), the file will download and play appropriately.
Have I configured s3 incorrectly? How can I get this mp3 file to download and play consistently?
specific file is located here: https://s3.amazonaws.com/1m40s_dev/assets/music/walden.mp3
thanks!
I've found this often relates to the MIME type set on the S3 hosted file.
Setting the correct MIME type seems to fix things.
On a side note, I struggled with a single binary file always breaking in IE. Its MIME type was application/octet-stream. I changed the MIME to binary/octet-stream and that seemed to fix downloads from IE. Not sure why.
use amazon cloudfront solve the problem
I solved this by appending a timestamp to the end of the mp3 url on page load. This forced a new download of the content each time and eliminated the caching error.
This feels more like a work around than a fix. I still don't know the root cause of the issue but if you find yourself having a similar problem and just need to move on, add a timestamp or random number as a param at the end of the url
.../assets/music/walden.mp3?[timestamp]
One other workaround I've found is, if you're using rails, turning off turbolinks makes this go away on chrome. I'll add more to my answer as I discover more.