-
Notifications
You must be signed in to change notification settings - Fork 263
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added support for #EXT-X-MEDIA:TYPE=SUBTITLES tracks #514
base: dev
Are you sure you want to change the base?
Conversation
…eter (%1); added build-temp.bat to build SWF/SWC into /bin-temp folder (ignored by repo) for testing
…format instead of single array); added support for OSMF NetClient to HLSMediaElement
… "I/O Error while trying to load Playlist"
# Conflicts: # src/org/mangui/hls/stream/HLSNetStreamClient.as
An HLS stream with subtitles: |
# Conflicts: # src/org/mangui/hls/demux/TSDemuxer.as # src/org/mangui/hls/playlist/Manifest.as # src/org/mangui/hls/stream/HLSNetStream.as
Thank you for working on this. Am I correct in the assumption that the following would return the subtitles to the external javascript application (e.g. chromeless player):
|
I'm only working with the OSMF implementation, so I'm not familiar with how the chromeless player works. Are you trying to expose the WebVTT file URLs or the parsed Subtitle objects? If you simply want to know when to display subtitles in JS, |
Hi, what's the status of this PR, do we have a plan to review & merge it? |
I have added support for WebVTT subtitles tracks on both live and VOD streams, modelled on the existing alternative audio classes and implemented using the TX3G timed text standard, with subtitles tracks announced via a
NetStream
clientonMetaData
event and subtitlesFLVTag
metadata injected into the stream asonTextData
events.As an alternative to using a
NetStream
client object, subtitles related events have also been added (see below).Overview
Subtitles tracks are detected and selected in the same way as alternative audio tracks. When a subtitles track is selected,
onTextData
metadata is added to the stream and Flashls will dispatchSUBTITLES_CHANGE
events when subtitles should be displayed.There is currently no OSMF or Flowplayer specific integration.
New HLS class properties
subtitlesPlaylistTracks:Vector.<SubtitlesPlaylistTrack>
subtitles equivalent toaltAudioTracks
subtitlesTracks:Vector.<SubtitlesTrack>
subtitles equivalent toaudioTracks
subtitlesTrack:int
subtitles equivalent toaudioTrack
New HLSEvent class constants and properties
Constants
SUBTITLES_TRACKS_LIST_CHANGE
when subtitles tracks are detected or changedSUBTITLES_TRACK_SWITCH
when the selected subtitles track changesSUBTITLES_LEVEL_LOADING
when the subtitles level is loadingSUBTITLES_LEVEL_LOADED
when the subtitles level is loadedSUBTITLES_CHANGE
when the current subtitles changeProperties
subtitlesTrack:int
the subtitles track ID related to the current eventsubtitle:Subtitle
model containing subtitles related to the current eventNew HLSSettings properties
autoSelectSubtitles:Boolean
whether or not to select subtitles tracks flaggedAUTOSELECT=YES
that match the current system locale (taken from HLS spec)autoSelectDefaultSubtitles:Boolean
whether or not to select subtitles tracks flaggedDEFAULT=YES
(selected in preference toAUTOSELECT=YES
)autoSelectForcedSubtitles:Boolean
whether or not to select subtitles tracks flaggedFORCED=YES
(selected in preference to any other)Code example
Additional bug fixes
HLSNetStreamClient
to ensure parameters are passed to client objects in original format rather than in one parameter as an Array_levels
property inFragmentLoader
as emptyVector.<Level>
to prevent crash after "I/O Error while trying to load Playlist" caused by null object referencebuild ..\temp
, to enable developers to build SWF/SWC files for testing without affecting SWF/SWC files in the repo (folders will be created if they don't exist)build-temp.bat
as a quick way of building intobin-temp
, which is ignored by git