How to add external .vtt subtitle file to AVPlayerViewController in tvOS
While it was almost mentioned no where in the apple documentation, I read in an article that subtitles need to be embedded in the HLS stream
.
Subtitles are not intended to be added manually.. though I did find a StackOverflow post showing a hack. Unsure if it works or not.
Seeing that I use VIMEO Pro, the HLS stream that is provided has the WebVTT subtitles (that I uploaded to vimeo) embedded, thus solving my problem.
AVUrlAsset and WebVTTs
I've posted a solution over here: https://stackoverflow.com/a/37945178/171933 Basically you need to use an AVMutableComposition
to join the video with the subtitles and then play back that composition.
Embedding Subtiles/Captioned Comments in TVML TVOS
It seems at the moment there is no external subtitle file support.
Probably in future Apple might add the same, but currently we'll have to burn the subtitle files within the m3u8 playlist.
Related Topics
How to Reload Tableview of Another Uiviewcontroller in Current Viewcontroller
Table View Didselectrowatindexpath, Only Works After Selecting Second Click
Pfobject' Does Not Have a Member Named 'Subscript'
Getting Location for an iOS App When It Is in the Background and Even Killed
Mpmediaitemartwork Is Null While Cover Is Available in Itunes
In Swift, How to Get the Device Orientation Correctly Right After It's Launched
How to Retrieve a File/Resource in a iOS Framework Bundle from a Main Program
How to Change Device Orientation Programmatically in Swift
How to Determine the Correct Altitude for an Mkmapcamera Focusing on an Mkpolygon
Cannot Get My Location to Show Up in Google Maps in iOS 8
Cannot Assign Class Instance to Its Protocol Type
Synchronizing Read/Write Access to an Instance Variable for High Performance in iOS
Delphi/Firemonkey Change iOS Screen Rotation at Runtime
Ios- Check Whether Current Time Is Between Two Times or Not
Xcode5:The App References Non-Public Selectors in Payload/<Appname>.App/<Appname>: Setattribution:
How to Change iPhone Uitableview Delete Button Title While Editing It
iOS - Using Uisearchdisplaycontroller with Uisearchbar That Is Uibarbuttonitem in Uitoolbar