In tvOS , in the menu that appears when the user goes through a remote control that shows “subtitles, audio and information” in other movie applications, how do I 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 buttons in the AVPlayerViewController drop-down menu so that the user can switch between turning subtitles on or off? I do not have srt files built into the video. Instead, I have a separate subtitle parser and I display it on a shortcut. I was able to get a section of information to show the text, but is there any way to add buttons?
OR how can I add a subtitle option to a video? This does not work: _player.requiresFullSubtitles = YES;
Thanks!
objective-c tvos avplayerviewcontroller
Jenel ejercito myers
source share