0

We have been adding Subtitle support to our AVPlayer-based video player. We are able to retrieve AVMediaSelectionOption objects of mediaType "sbtl" from the AVMediaSelectionGroup produced by [self.player.currentItem.asset mediaSelectionGroupForMediaCharacteristic:AVMediaCharacteristicLegible] and can select the appropriate AVMediaSelectionOption to display the subtitles on our live stream. This is all working fine.

Where we are having trouble is deselecting the AVMediaSelectionOption on iOS 5.01 and iOS 5.1.

On devices running iOS 6, we can disable the subtitles with [self.player.currentItem selectMediaOption:nil inMediaSelectionGroup:self.subtitleSelectionGroup] and they disappear as expected. But on iOS 5.01 and iOS 5.1 the subtitles stop updating, but the last text that was displayed remains on the video player until the player is closed, the power button is pressed, or the app is moved to the background.

We've tried filtering out forced-only subtitles, thinking that might be the problem, but to no avail. Is this a bug in the OS? Is there something wrong with our streaming video?

Thank you for any assistance and guidance you can provide.

Kevin James Hunt
  • 333
  • 3
  • 11
  • Sounds like it's working like "the big guys". Not at all uncommon to see a "closed captioning" text line (often only partially completed) persist through a commercial break on TV. – Hot Licks Nov 05 '12 at 22:27

1 Answers1

1

Not sure if this helps in iOS5 but in my video stream i have an option for subtitles and an option for forced subtitles for each language. I i change to the forced subtitle option it wont show any subtitle (only if you have forced ones). So if you make your videos like this and have that forced subtitle with not subtitles at all you can select the forced subtitles to make the trick in iOS5.

Here is a print object of how my selection group option array looks like:

<__NSArrayM 0x2006d590>(
    <AVMediaSelectionTrackOption: 0x200297a0, mediaType = sbtl, locale = en, title = (null), option ID = 3, associated forced-only option = <AVMediaSelectionTrackOption: 0x2006d600>>,
    <AVMediaSelectionTrackOption: 0x2006d600, mediaType = sbtl, locale = en, title = (null), option ID = 3, default = YES, forced subtitles only>,
    <AVMediaSelectionTrackOption: 0x20057210, mediaType = sbtl, locale = zh, title = (null), option ID = 4, associated forced-only option = <AVMediaSelectionTrackOption: 0x20044bc0>>,
    <AVMediaSelectionTrackOption: 0x20044bc0, mediaType = sbtl, locale = zh, title = (null), option ID = 4, forced subtitles only>,
    <AVMediaSelectionTrackOption: 0x2002d450, mediaType = sbtl, locale = ce, title = (null), option ID = 5, associated forced-only option = <AVMediaSelectionTrackOption: 0x20028660>>,
    <AVMediaSelectionTrackOption: 0x20028660, mediaType = sbtl, locale = ce, title = (null), option ID = 5, forced subtitles only>
    )

Hope this can be of any use for you because there is not much info available for this subject.

alamatula
  • 232
  • 4
  • 9