ios - How to get the information stored in the hls playlist CHARACTERISTICS field from the avplayer -
i´m trying guess if subtitle has accessibility options show information in ui layer i´m working on.
i´m using apple´s example stream bipbop:
https://devimages.apple.com.edgekey.net/streaming/examples/bipbop_16x9/bipbop_16x9_variant.m3u8
that playlist has several subtitles, of them accessibility characteristics, example one:
ext-x-media:type=subtitles,group-id="subs",name="english",default=yes,autoselect=yes,forced=no,language="en",characteristics="public.accessibility.transcribes-spoken-dialog, public.accessibility.describes-music-and-sound",uri="subtitles/eng/prog_index.m3u8"
you can see has following characteristics:
characteristics="public.accessibility.transcribes-spoken-dialog, public.accessibility.describes-music-and-sound"
from app point of view i´m retrieving subtitles piece of code:
avmediaselectiongroup * subtitleselectiongroup = [asset mediaselectiongroupformediacharacteristic: avmediacharacteristiclegible]; (avmediaselectionoption * subtitleoption in subtitleselectiongroup.options) { nslog(@"%@", subtitleoption); }
an output of avmediaselectionoption created subtitle talking about:
<avmediaselectionkeyvalueoption: 0x14785320, locale = en, mediatype = 'sbtl', tagged media characteristics = {public.accessibility.transcribes-spoken-dialog, public.accessibility.describes-music-and-sound}, title = english, default = yes>
as can see avplayer reporting me information in field
tagged media characteristics = {public.accessibility.transcribes-spoken-dialog, public.accessibility.describes-music-and-sound}
since can see in output of nslog
the question is, how query code? there specific field in avmediaselectionoption class? can´t find one
thanks!
Comments
Post a Comment