Fixed seeking behavior
Updated getMediaIndexForTime to be simple and stupid
Remove spurious console logs
Fixed an issue with forward seeks and a different problem with backwards seeking (thanks Matt!). Fixed fast rendition change behavior.
Remove limits on gap-skipper. Skip instantly without waiting.
Use the proper native MediaSource duration for buffer removals.
Improvements for live stream rendition changes
Fixed an undefined variable bug
Some more simplification and a very conservative live stream rendition change approach
VOD fixes
Experimental change to the way we throttle the fetcher
Use GOAL_BUFFER_LENGTH again
Continued massive changes to segment fetching. Cleanup and comments.
Fixed a bug where we were fetching starting at mediaIndex 0 on every seek.
Refactor probing code in preparation for pulling into it's own module or class
Moved sync-related logic out of segment-loader and into a new sync-controller class
Removed expired from the SegmentLoader
Update mux.js dependency to 2.5.0
Don't error when the tsprobe returns null
Fixed two issues: MAAT switching and Flash seeking
Rename duration variable
fix flash failing first segment load (#859)
dont use tech for has played (#861)
Code Coverage and Unit tests for Simple Fetcher (#862)
fix has played returning false on vod (#866)
Fixed preload="none" behavior and reduced the incidence of repeating initial segment requests (#878)
Provide option to set contrib-hls first in the HTML5 tech (#889)
This reverts commit 59ddbe1188.
Add playback tests (#894)
Fixed MSE and environment test helpers, restore properly
Removed unused test files
remove expired time tracking and use sync points to calculate seekable (#898)
Fixing a few tests for QUnit 2.0
* Media init segment support
Resolve EXT-X-MAP URI information in the playlist loader. Add support for requesting and appending initialization segments to the segment loader.
* Basic support for fragmented MP4 playback
Re-arrange source updater and track support to fit our design goals more closely. Make adjustments so that the correct source buffer types are created when a fragmented mp4 is encountered. This version will play Apple's fMp4 bipbop stream but you have to seek the player to 10 seconds after starting because the first fragment starts at 10, not 0.
* Finish consolidating audio loaders
Manage a single pair of audio playlist and segment loaders, instead of one per track. Update track logic to work with the new flow.
* Detect and set the correct starting timestamp offset
Probe the init and first MP4 segment to correctly set timestamp offset so that the stream begins at time zero. After this change, Apple's fragmented MP4 HLS example stream plays without additional modification.
* Guard against media playlists without bandwidth information
If a media playlist is loaded directly or bandwidth info is unavailable, make sure the lowest bitrate check doesn't error. Add some unnecessary request shifting to tests to avoid extraneous requests caused by the current behavior of segment loader when abort()-ing THEN pause()-ing.
* Add stub prog_index.m3u8 for tests
Some of the tests point to master playlists that reference prog_index.m3u8. Sinon caught most of the exceptions related to this but the tests weren't really exercising realistic scenarios. Add a stub prog_index to the test fixtures so that requests for prog_index don't unintentionally error.
* Abort init segment XHR alongside other segment XHRs
If the segment loader XHRs are aborted, stop the init segment one as well. Make sure to check the right property for the init segment XHR before continuing the loading process. Make sure falsey values do not cause a playlist to be blacklisted in FF for audio info changes.
* Fix audio track management after reorganization
Delay segment loader initialization steps until all starting configuration is ready. This allowed source updater MIME types to be specified early without triggering the main updater to have its audio disabled on startup. Tweak the mime type identifier function to signal alternate audio earlier. Move `this` references in segment loader's checkBuffer_ out to stateful functions to align with the original design goals. Removed a segment loader test that seemed duplicative after the checkBuffer_ change.
* Fix D3 on stats page
Update URL for D3. Remove audio switcher since it's included by default now.
* Only override codec defaults if an actual value was parsed
When converting codec strings into MIME type configurations for source buffers, make sure to use default values if the codec string didn't supply particular fields. Export the codec to MIME helper function so it can be unit-tested.
* IE fixes
Array.prototype.find() isn't available in IE so use .filter()[0] instead.
* Blacklist unsupported codecs
If MediaSource.isTypeSupported fails in a generic MP4 container, swapping to a variant with those codecs is unlikely to be successful. For instance, the fragmented bip-bop stream includes AC-3 and EC-3 audio which is not supported on Chrome or Firefox today. Exclude variants with codecs that don't pass the isTypeSupported test.
* Support for multiple alternate audio tracks
* Separated segment loading logic into a reusable piece of functionality so that we can have more than one segment loader and they can manage the segment fetch behavior unique to each playlist they are loading from
* Introduced the MasterPlaylistController to coordinate the loading of the master playlist and separate the behavior of the player from videojs-contrib-hls.js leaving the latter to be the glue between HLS and the video element's events
* Added the SourceUpdater to manage the asynchronous bahavior of SourceBuffers and MediaSource objects so that we can treat it as a non-blocking work queue
* Added parsing for MediaGroups in master playlists
* Added support for AudioTrackList objects and events
* Add support for every HLS mime type possible (#684)
* Flash live fixes (#682)
* Make Xhr a factory function that returns a unique instance of the xhr function and expose an instance of it on each player's xhr object
* Keep the returned function is backward compatible with the previous xhr
* Add a `beforeRequest` function to the XHR that allows you to override options before the request
* The `beforeRequest` function can be specified on the global `videojs.Hls.xhr` function and it'll be used for all players unless overridden on a per-player level
added notifications back to travis
fixed sinon version in package.json
got unit tests working by modifying the karma config
Added back manifest/expected.js to the build pipeline
Added a script to build/watch/clean them
Added script execution to package.json
got switcher partially working again
When we switch playlists in a live video, we have to find the right place in the new playlist to continue buffering. This is complicated because we can't guarantee the two variants are segmented at the same time positions or that the windows of time they represent are exactly in sync. Most of the time, they're pretty close to one another and we can use that fact to make better guesses at which segment to download when switching.
This PR adds back tracking of expired content in the playlist loader, which can then be used to estimate the seekable window for live playlists even before we've buffered any segments from them. This also allows seekable to be accurate even when the player has paused for a long time and all the segment timing information we gathered has gone out of date. To make rejoining or seeking in a live stream even more robust, we detect when a seek "misses" the live window and seek again to a safe position.
Media sources implicitly track expired time by retaining the mapping between presentation timestamp values and the media timeline in the buffer. That allows us to simplify a good deal of code by not tracking it ourselves. Finish updating tests to work against the new timeline start and end annotations on segments instead of the old PTS values. Remove metadata cue translation because that is now handled by contrib-media-sources. Update key fetching in HLSe to occur concurrently with the segment download. All tests are now passing.
If the old and new buffered ranges have a shared start or end point, that edge should not be interpreted as a new buffered boundary. Fix up a number of the tests. Some tests are still failing.
When switching renditions or dealing with a live stream with unaligned variant playlists, we may discover that the segment we buffered isn't associated with the time range we expected it to be. In that case, adjust our information about timeline positioning and try buffering again.
player.tech was renamed to player.tech_
the videojs.xhr must be replaced with sinon differently now since videojs.xhr holds onto a reference to window.XMLHttpRequest
Use the time range covered by the union of audio and video track PTS values when calculating duration. For non-live content, this matches the NetStream's duration calculation to within a millisecond or so. Make sure that segment PTS information is preserved when live playlists are refreshed. Remove FlvTag.durationFromTags in favor of Playlist.duration() since the latter handles durations across segments and discontinuities. For #314.
Deprecate getMediaIndexByTime and replace it with a PlaylistLoader.getMediaIndexForTime_ that considers expired content in live playlists. Fix an issues that would allow the return value to be less than zero or greater than the index of the last available media segment. Currently, this code does not take into account rounding of segment durations in HLS v3.
Keep track of the accurate durations of expired segments in the playlist loader so that it's possible to accurately calculate the start and end points of the seekable ranges relative to media timeline position zero, even if we switch variant streams or seek within a live stream. Track the media timeline position of the last discontinuity to allow for PTS-based variant stream synchronization instead of the incorrect media sequence based method we're currently using. Stop rewriting timestamps in the transmuxed FLV tags for that reason as well. Add m3u8 parser support for EXT-X-DISCONTINUITY-SEQUENCE.
If an m3u8 was missing a trailing newline, the last line of input would remain buffered in the parser. This could cause VOD playlists to be misinterpreted as live or a final segment to be switched. Fixes#113.
Keep track of total content bytes received and make it accessible from outside the tech. Trigger an event whenever a new playlist is activated. For #93.
Don't re-request playlists that have already been fully loaded. If the loader is in the middle of requesting a new playlist and is asked to switch back to a loaded one, abort the outstanding request. Update playlist loader state diagram.
Playlist and segment requests will now abort. Segment requests should continue to be retried automatically. Playlist requests will trigger a MEDIA_ERR_NETWORK.
Check the outstanding request URL before aborting playlist requests when a switch is requested. Don't filter out requests that are generated as a result of another request finishing in the switcher simulator. Actual playlist switching is showing up in the graph now.
Get rid of grunt-contrib-qunit because it was inexplicably failing in phantomjs. It's still possible to test in phantom through karma and the tests all pass there. Add test cases for object disposal on the tech and the playlist loader.
Add a new state, SWITCHING_MEDIA, that manages requests to change the active media playlist. Track media playlists by-URI on the master playlist so they can be looked up more easily.