I was trying to play a live stream with AVPlayer. And I somewhat succeeded. My question is, if I play an URL that ends with m3u8 I can, however, when I try a link that doesn't (see example below) I can't! Same behavior when I try to open them with Safari, but on VLC, they both work. Why is that? Unsupported codec?
Examples:
This works: https://fluxustv.blogspot.com#bit.ly/fluxusfish?.m3u8
This doesn't: http://www.tvworldfree.ga:3000/p002/p158156/2219
The link without “m3u8” is a raw transport stream. AVPlayer does not support that format without a manifest.
Related
Currently in our iOS Application, we are downloading the video and then playing it, which is indeed taking a lot of time and killing the user experience. Now, we want to shift to directly stream the video or play the video while it is downloading.
I have tried using AVAssetResourceLoaderDelegate. I doesn't play the video at all and displays the mime type as text/html. Maybe because I am loading from a secured URL with headers.
Can someone suggest me a good way where I can stream or Play the video while downloading it. Would be glad if someone suggest a way to Stream the video's directly from the URL.
I have an intro video on this website: http://staging.optiekcardoen.be/. The video on top is playing automatically on most browsers, that's the behaviour I want. On Safari iOS, there's just a play button above the poster image of this video. When I click it, nothing happens... :(
When I integrate the bigbugbunny video from w3schools (https://www.w3schools.com/html/tryit.asp?filename=tryhtml5_video) with an absolute path, it works just fine! When I download that same bunny video, upload it to my server and make a relative link in my video-tag, it doesn't work either.
First, I moved the video up with a greather z-index. The problem stayed. Then, I checked with my hosting provider to chang the php version to a more recent one then my xampp php version. Then I asked the producer of my intro video if he wanted to minimize the video, but that didn't fixed anything.
I'm out of possibilities I'm affraid. Is there anyone with another possible answer please?
I think this is a HTTP vs HTTPS same origin security problem.
If you go to the site in Safari and look at the console you will see:
Blocked a frame with origin "https://www.youtube.com" from accessing a frame with origin "http://staging.optiekcardoen.be". The frame requesting access has a protocol of "https", the frame being accessed has a protocol of "http". Protocols must match.
See more info here: https://developer.mozilla.org/en-US/docs/Web/Security/Same-origin_policy
Update:
As Sam mentions in the comment, while the issue above should be addressed, even if this issue is bypassed, the main video, which is not from YouTube, does not play. The main page video has the wrong mime type also - see below:
<source src="/files/intro-320x176-laag.mp4" type="video/webm">
Update 2
I did a quick test and verified that on Safari at least, an mp4 video will not play if the Mime type is set to webm.
If you set your mime type to mp4 I suspect your video will play properly - i.e. change the end of the line above to:
<source src="/files/intro-320x176-laag.mp4" type="video/mp4">
<video autoplay="" muted="" loop="" poster="/files/intro.jpg">
<p>Uw browser video tag.</p>
</video>
Have you tried this?
I have managed to read matroska container and able to extract video and audio streams from a mkv file in my metro app. Now, I don't know how to feed the streams for playing. I want to know the concept of throwing media data on display. I have another option to repack the video and audio(s) with subtitles into MP4 container which will be played by MediaElement by default but that will not look like having a matroska codec in my metro app.
So, basically my question is: How to use MediaElement or any display graph to read the video and audio pulled out from any video container.
Please guide me. Thanks.
I'm making an iOS video player application that gets a whole bunch of URLs of videos from a web service and plays them in an MPMoviePlayerViewController.
Most of the videos are just .mp4 or .mov files, but some of them are live HTTP streams. The only thing I have is a URL and those don't indicate whether it's a file or stream.
Since I'm using MPMovieControlStyleNone and my own video controls, I need to be able to detect whether or not a video is a file or a live stream in order to change my controls.
Is there any way I can detect that?
Use an HTTP HEAD request. If the Content-Type is application/vnd.apple.mpegurl, then it's an http live streaming stream.
In recent work, I am using Matt Gallagher's AudioStreamer ( downloaded from here ) codes to make a music player in my App.
I have an XML file in my remote server I have hosted. This XML file has song title and songs' URL. My App gets the songs' title and URL and using Matt's AudioStreamer, it plays those songs but the problem is the song does not play in full length. Between 30 second to 1 minute, it stops playing and displays "no audio data found" pop up message.
Has anyone used Matt's API for audio stream (I am using here .mp3 files)?
Can anyone help me to fix this issue ?
Thanks
It could be a corrupt MP3 file - can you provide a link to the MP3 for me to test? I've written a more advanced AudioPlayer inspired by Matt's AudioStreamer (hosted here: https://code.google.com/p/audjustable/). I'd be interested in testing it against your files.