Disable Subtitles/Closed Captions on embedded YouTube video - ios

I have an iOS app that plays YouTube video by embedding it in a UIWebView. This allows it to be displayed in the native system player. I do this using this library: https://github.com/youtube/youtube-ios-player-helper
This video has a subtitle track that I would like to keep as an option, but I would like it to be disabled by default. The iOS player seems to enable these subtitles no matter what I do. I have experimented with the different embed options such as cc_load_policy, with no luck.
How can I disable subtitles by default on these videos?

Related

How do I disable Audiofocus in webview?

I'm making an application that plays videos in webview.
I want to play other music apps while keeping the video playing in the webview.
Is there any way to ignore or disable Audiofocus?
sorry, I'm using a translation tool by DeepL.

URL syntax for Youtube videos in fullscreen WITHOUT embedding video

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

iOS Youtube Player : Toggle fullscreen mode of youtube player in iOS using custom controls

I have a requirement to create custom controls for Youtube player in iOS. I have used UIWebview to play youtube videos. I have hidden default controls by using 'controls':0 flag. I am able to map all the actions like play, pause etc using youtube's java script api with my UIButtons. But, I am not able to figure out how to toggle full screen mode programatically with my custom button.
Any help is appreciated.

Playing Vimeo Videos with Custom Video Player in iOS

I have to play Vimeo videos in my iOS application using a video player. I need to log events like play, pause, seek etc. Its not possible to play using MPMoviePlayerController or AVPlayer as Vimeo videos have flash content. I am able to play using UIWebView. But, it is showing default Vimeo player controls. I need to have my own controls to play, pause etc as I need to log those events.
I have tried for lot of solutions. Nothing worked. If anyone knows how to play Vimeo videos using custom player. Please Let me know.
I am able to find out solution for this problem. I have used YTVimeoExtractor present here.
Its README.md file says following :
YTVimeoExtractor helps you get mp4 urls which can be use in iOS's native player. You can even choose between mobile, standard and high definition quality.
YTVimeoExtractor doesn't use UIWebView which makes it fast and clean.
I have used MKMoivePlayerViewController and its notifications - MPMoviePlayerPlaybackStateDidChangeNotification and ˚ notifications to get stop, pause events.
The only official way to use a player besides the Vimeo player to play Vimeo videos is to use third-party player urls provided to PRO members: https://vimeo.com/s/adg

Playing youtube videos on iOS

I was wondering how are apps like McTube (https://itunes.apple.com/us/app/mctube-for-youtube/id559618284?mt=8) playing youtube videos. It looks like a custom MPMoviePlayerController but is that allowed?
BTW I need autoplay which I couldn't achieve with UIWebView, that's why i was wondering.
Some YouTube videos can be played back in a MPMoviePlayerController - some cannot. When you query a video through the YouTube Data API (link here) you'll get back all the content types available for a particular videos, including the Flash player, 3GPP, MP4 (if available), etc. You can use these URLs to load up a MPMoviePlayerController.
This is perfectly fine, but as I've said - not all videos are available to embed this way. Some videos (mainly ones that require adverts to be displayed) can't be put into native controllers.

Resources