0 Replies
      Latest reply on Oct 11, 2019 11:17 PM by matthew123
      matthew123 Level 1 Level 1 (0 points)



        We have an issue only happens on iOS 13, after select a subtitle for a video, but the selectedMediaOption function still return nil. Even we can

        see the subtitle is showing on the video. and It's only happens on iOS 13,  same code works fine on iOS 12.


        Here is the code:


        extension AVPlayerItem {


            func subtitlesSelected() -> AVMediaSelectionOption? {

                guard let legibleOptions = asset.mediaSelectionGroup(forMediaCharacteristic: .legible),

                    !legibleOptions.options.isEmpty else {

                        return nil



                let selected = currentMediaSelection.selectedMediaOption(in: legibleOptions)

                return selected




        The return value for this method will always nil on iOS13, even selected subtitle is showing on the video.


        Is it a iOS 13 bug?



        XCode 11

        iOS 13