Using MPMoviePlayerController to stream an mp4 stored on a CDN, the file is actually an .m3u8
I've looked into this and there is no direct programmatic way of removing/disabling the bottom-right captions button unless the stream does not embed the subtitles in the first place.
I know for sure that the test video I'm working with does not contain subtitles which prompts the question: why is the captions button still visible then? Is there really no way of hiding it anyway? Tapping it will pause the video but not prompt the captions menu unlike streaming an .mpd file which does prompt the captions menu even without no available language option.
I'm doing the usual:
video = MPMoviePlayerController(contentURL: NSURL(string: url))
video.view.frame = UIScreen.mainScreen().bounds
video.controlStyle = MPMovieControlStyle.Fullscreen
For a locally stored mp4, the captions button won't appear which makes me think that the issue lies in either the m3u8 aspect of the file or that the CDN requires some additional setup like mentioned here: https://developer.apple.com/library/ios/qa/qa1801/_index.html
Related
on this page, the video at the top of the page does not display an image unlike the video located on the side bar.
When play is pressed, there is no playback problem.
But my visitors may not click on the video thinking it doesn't work.
How can I make it appear?
the original video is here
The javascript code is here
The thumbnail sddefault isn't loading for an unknown reason for video VnWbJbtsyv4. However hqdefault seems to be working. So use https://img.youtube.com/vi/VnWbJbtsyv4/hqdefault.jpg instead of https://img.youtube.com/vi/VnWbJbtsyv4/sddefault.jpg.
I like to be able to share youtube music video URLs that automatically start in full-screen. The only way I know how to do this is by sharing the video as an embedded video; such as:
https://www.youtube.com/embed/oRdxUFDoQe0?autoplay=1
Unfortunately, as you can see, that does not work on copyrighted videos. So.. what's the trick to playback youtube videos automatically in fullscreen without embedding it? I tried the below URL format, but that didn't work either. Surely there has to be a way to do this>
https://www.youtube.com/watch?v=oRdxUFDoQe0&fs=1
I am using a light box type of player to open and play you tube videos. My people don't want the video link to be accessible or shared from within the player.
I.E they only want the video to play when the video loads in the player. So they don't want the share button visible and they don't want the YouTube icon that links directly to the video visible.
I can remove the share button and I can remove the YouTube icon but not at the same time.So there is always an easy way for the user to get the video url and share it etc...
I can also chose the videos to be private and that removes both. But then all of my users would need a google account which they dont.
It seems to me that Google wouldn't offer free use to its player without some type of reference to You Tube. Either with the share button or the You Tube icon that links to the video.
i have tried modifying the url parameters (embed?v=#v_ID#&rel=0&autohide=1&showinfo=0&wmode=transparent&modestbranding=1&controls=0") to no avail.
And I have tried using embed and watch to no avail..
Is there a way to do this?
You can append the following onto the end of the YouTube embed url, to remove the Watch on YouTube button from the playback controls which is accomplished by setting modestbranding to 1. The player controls are NOT removed. they are just auto0hidden by setting the parameter autohide to 1.
Try to change & to &
Here's a sample format to solves your issue:
I'm building an article reading app for iphone.I'm parsing JSON content of article in uiwebview.
Some of the articles contains videos,But it does not display in the uiwebview.
JSON format for video is
<iframe src=\"\/\/www.youtube.com\/embed\/hdstrm\" height=\"360\" width=\"640\" allowfullscreen=\"\" frameborder=\"0\">
The uiwebview display empty space at the place of video frame
here is screen shot of uiwebview:
Displaying YouTube videos on iOS requires special treatment and is much less straight forward than you would expect (or hope). You can either display the entire YouTube page and let the user take it from there (or try to programmatically simulate a press on the play button), or you can "steal" the MP4 and play it using the media player.
The second option is better because it allows you to control the UI around the video and doesn't force you to display the entire YouTube page. However, it's important to stress that it requires quite a bit of work and is frowned upon by YouTube. In fact, they change the HTML structure of their pages every 2-3 months so that these mechanisms will break, and you won't be able to access the MP4 file directly without changing your code.
For more information on how to access the media file directly and play it, check out https://github.com/larcus94/LBYouTubeView
So I am working on a piece of code that helps the user in downloading mp3 files from the UIWebView. So far it has been working perfectly by detecting the last path component of the view's URL. (www.exampledownload.com/file.mp3). But in some cases the absolute URL doesn't finish in .mp3. However the UIWebView knows it is an mp3 and opens it on a MediaPlayer (As shown in the attached screenshots).
I've tested some mp3 download apps out there and they are able to detect the mp3 and download it. I want to know how to detect the file that the WebView is trying to open. The download protocol is already stablished. I just need the actual download URL of this files. I attach some screenshots to make myself more clear.
I've seen other apps in which they modify the default media player, and the webview shows the mediaplayer but with another button besides de normal playback buttons. (The download button) I would like to know also how can this be done. Thanks!
You can intercept the URL in webView:shouldStartLoadWithRequest:navigationType: and check if its an MP3 and return NO and then do whatever you want with the file.