Thursday, March 21, 2024
HomeiOS Developmentios - AVPlayerViewController's caption choices don't replace in .Web 8 tvOS app

ios – AVPlayerViewController’s caption choices don’t replace in .Web 8 tvOS app


I want to point out which closed captions choice is lively in our .Web 8 tvOS app by highlighting the chosen choice within the UI, however I’m solely in a position to do that for sure movies. If the embedded captions specify the language, then the show title for the AVMediaSelectionOption is “English CC”. If the embedded captions don’t specify the language, then the locale worth is null and the show title is simply “CC”. Nonetheless, AVPlayerViewController’s transport bar merchandise for captions doesn’t replace to point out the present AVPlayerItem’s obtainable AVMediaSelectionOptions. So if I name playerItem.SelectMediaOption(choice, group) on a video that doesn’t specify a language within the embedded captions, it could possibly’t spotlight the chosen choice as a result of it’s not current within the UI. Is there a technique to pressure the listing to replace and present the present merchandise’s obtainable AVMediaSelectionOptions?

As of proper now, I’ve an observer arrange on AVPlayer’s timeControlStatus property. When a brand new video begins taking part in I fetch the AVMediaSelectionOption for the present video and choose it. This works simply positive if the brand new video’s obtainable choice matches what’s already within the captions listing within the UI.



Supply hyperlink

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

- Advertisment -
Google search engine

Most Popular

Recent Comments