Added support for #EXT-X-MEDIA:TYPE=SUBTITLES tracks#514
Open
neilrackett wants to merge 13 commits intomangui:devfrom
Open
Added support for #EXT-X-MEDIA:TYPE=SUBTITLES tracks#514neilrackett wants to merge 13 commits intomangui:devfrom
neilrackett wants to merge 13 commits intomangui:devfrom
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
Contributor
Author
|
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): |
Contributor
Author
|
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? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
NetStreamclientonMetaDataevent and subtitlesFLVTagmetadata injected into the stream asonTextDataevents.As an alternative to using a
NetStreamclient 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,
onTextDatametadata is added to the stream and Flashls will dispatchSUBTITLES_CHANGEevents when subtitles should be displayed.There is currently no OSMF or Flowplayer specific integration.
New HLS class properties
subtitlesPlaylistTracks:Vector.<SubtitlesPlaylistTrack>subtitles equivalent toaltAudioTrackssubtitlesTracks:Vector.<SubtitlesTrack>subtitles equivalent toaudioTrackssubtitlesTrack:intsubtitles equivalent toaudioTrackNew HLSEvent class constants and properties
Constants
SUBTITLES_TRACKS_LIST_CHANGEwhen subtitles tracks are detected or changedSUBTITLES_TRACK_SWITCHwhen the selected subtitles track changesSUBTITLES_LEVEL_LOADINGwhen the subtitles level is loadingSUBTITLES_LEVEL_LOADEDwhen the subtitles level is loadedSUBTITLES_CHANGEwhen the current subtitles changeProperties
subtitlesTrack:intthe subtitles track ID related to the current eventsubtitle:Subtitlemodel containing subtitles related to the current eventNew HLSSettings properties
autoSelectSubtitles:Booleanwhether or not to select subtitles tracks flaggedAUTOSELECT=YESthat match the current system locale (taken from HLS spec)autoSelectDefaultSubtitles:Booleanwhether or not to select subtitles tracks flaggedDEFAULT=YES(selected in preference toAUTOSELECT=YES)autoSelectForcedSubtitles:Booleanwhether or not to select subtitles tracks flaggedFORCED=YES(selected in preference to any other)Code example
Additional bug fixes
HLSNetStreamClientto ensure parameters are passed to client objects in original format rather than in one parameter as an Array_levelsproperty inFragmentLoaderas 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.batas a quick way of building intobin-temp, which is ignored by git