Apple tvOS: Hide subtitles menu option on AVPlayerViewController - ios

When watching a live stream, the subtitles menu option is still present on the video view.
How can I hide the complete subtitles group? If the display should be managed by the m3u8, how must the m3u8 look like that the subtitles menu disappears?

Subtitles are embedded into the HLS stream. AVPlayerViewController defines a property called allowedSubtitleOptionLanguages which allows to limit the allowed set of languages supported for the subtitles.
In order to disable completely the subtitles tab you could assign an empty list of allowed languages to that property:
playerViewController?.allowedSubtitleOptionLanguages = [""]

Related

Is there a way to show custom subtitles track name in AVPlayerViewController

AVPlayerViewController can perform a lot of work like switching audio/subtitles tracks, draw progress bar, retrieving thumbnails etc. On tvOS it automatically display builtin tracks in top bar and accept event from remote control.
It recognize WebVTT subtitles and can display user selected track. But it doesn't work with SMPT-ETT/TTML subtitles. There is a way to manually decode and display subtitles of these formats. But is there a way to add a button with track language to a "Subtitles" chapter?
If you create a new AVMediaSelectionOption of type AVMediaCharacteristicLegible and add it to AVAsset's mediaSelectionGroup(AVMediaSelectionGroup) and provide that asset to the AVPlayer it should show up in that list above the player.

You Tube - Disable all links to actual video in the player

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 &amp
Here's a sample format to solves your issue:

Disable Subtitles/Closed Captions on embedded YouTube video

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?

MPMoviePlayerController captions button

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

How to have a custom audio for a Voiceover element?

Now, our app, pikSpeak Camera, was recently found useful to blind iOS community as it allowed to capture photos with sound as it allowed them to easily navigate through older pics just using the the audio tags.
The issue that I am facing is that I want to override the Voiceover audio tag associated with an element when a user selects it and instead have a custom audio in the UICollectionViewController cell selection.
Basically, I guess it's easy to disable the VO tag audio but then how do I play a custom audio on VO selection?

Resources