In tvOS
, in the menu that is being displayed when a user swipes down on the remote, that shows "subtitles, audio & info" on other movie apps, how to create another tab with buttons?
Below is my code:
AVMutableMetadataItem *titleMetadataItem = [[AVMutableMetadataItem alloc] init];
titleMetadataItem.locale = NSLocale.currentLocale;
titleMetadataItem.key = AVMetadataCommonKeyTitle;
titleMetadataItem.keySpace = AVMetadataKeySpaceCommon;
titleMetadataItem.value = @"The Title";
NSArray *externalMetadata = [[NSArray alloc] initWithObjects:titleMetadataItem, nil];
_player.player.currentItem.externalMetadata = externalMetadata;
Can someone please tell me how can I create a buttons in the swipe down menu of an AVPlayerViewController
so that a user can toggle between turning off or turning on the subtitles? I do not have the srt files
embedded in the video. Instead I have a separate subtitle parser
and I display it on a label. I was able to get info section to show with text but is there any way to add buttons?
OR
how I can add a subtitle option to the video?
This does not work:
_player.requiresFullSubtitles = YES;
Thanks!