* Change processing segment reference on playlist refresh
* Test for correct segment references on pending segments
* Fix unreachable segment tests after rebase on async monitor buffer change
* Update media index on playlist refreshes for all requests (including syncs)
- Convert all calls to fillBuffer_ to calls to monitorBuffer_
- Rename monitorBuffer_ to monitorBufferTick_ which becomes the 500ms buffer check timer loop
- Make monitorBuffer_ schedule an immediate timer for monitorBufferTick_
* fix representations enabled function closure and seperate blacklisting from enabling
* populate quality level list in hls when available
* use uri for representation id
* update readme
* add isEnabled and isBlacklisted function for playlists
* filter blacklisted playlists from representations
* update unit tests
* Map legacy AVC codecs to their modern equivalents when excluding incompatible playlists
* Add JSDoc and replace arrow function for mapLegacyAvcCodecs
* Mark mapLegacyAvcCodecs as private
* Fix references to mapLegacyAvcCodecs_
* Fix a segment hop in live
In a case where the live playlist updates during processing of the first segment request, it is possible that we'd skip over the next segment and proceed down the playlist. This accounts for the change in media sequence during update end.
* Remove unnecessary isSyncRequest check in handleUpdateEnd
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
* Use 'decrypt' with callback instead of Decrypter directly
Cast request.response ArrayBuffer to Uint8Array for explicit passing to
decrypt
* Fix text with Uint8Array key result
* fix test for decrypting (#1)
* s/var/let/
* Upgrade aes-decrypter to ^2.0.0
* Added support for the throughput of the whole system to the ABR algorithm to allow it to adjust better to poor performance especially with flash.
* Added tests for systemBandwidth and throughput
* Replaced instances of (new Date()).getTime() with Date.now()
* Removed redundant test and added a comment to explain bandwidith and throughput setters
* Renamed startOfLoad_ to startOfAppend which is a more accurate name
* Updated the reloadSourceOnError plugin based on feedback:
* Allow the ability to pass a `getSource` function that can be used to provide a new source to load on error
* Added the ability to override the default minimum time between errors in seconds
* Plugin now cleans up event bindings when initialized multiple times
* Added some better doc-comments
* Made getSource a default function and added a test to verify that passing a non-function as getSource via options doesn't break anything
* Seek to live point if we fall off the back of a live playlist
* Remove extraneous checks from always-be-playing
* Remove side effects from always-be-playing check functions
* Rename AlwaysBePlaying to PlaybackWatcher
If a CODECS attribute is present on an m3u8 but MSE isn't present, don't explode. In practice, this means only exclude variants based on codec for MSE mode.
* use window.isSecureContext to detect ff 49
* fix tests
* fix linting
* make supportsAudioInfoChange private
* forgot to save this file before commit
* detect firefox 49 by user agent parsing for version number
* 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.
* Skip gaps caused by video underflow
In the event that there is a small gap in the video buffer, Chrome will consider it video underflow, and will continue playing audio for ~3 seconds while video remains frozen. The current time of the player will update to reflect the audio playback. Due to the audio overplay, the gap skipper will think we are in a buffered region, and will not skip over the gap. This adds support for skipping over gaps caused by a browser's interpretation of video underflow.
* Add text track cues for #ext-x-cue-out, #ext-x-cue-in, and #ext-x-cue-cont segment tags
* Change tags track to keep its reference and add documentation
* Guard against negative media index due to manifest vs actual timing differences
One of the possible reasons for us getting a negative media index is that we've recorded actual segment timing information and it differs enough from the manifest's timing information that we can't properly place the first segment. In the event that we're at time 0 and the video isn't live, we can safely assume that we should get the first segment.
* Change getMediaIndexForTime to return first segment when time and expired are 0
The PlaylistLoader signals that the active playlist has changed by triggering a mediachange event and the segmentloader needs to know about the new playlist or it will continue to select segments from the old playlist
* Added bandwidth stats to HLS
* moved bandwidth stats to reside on segment loaders
* added accessors for stats on master playlist controller
* added getters for stats using master playlist controller on hls
* updated tests to check for stats
* Fudge segments that are reported as having a zero-second duration
* The fetcher logic basically ignores segments with a duration of zero. Give them a tiny duration so that the fetcher will "see" these segments.
* Added tests for and fixed getSegmentBufferedPercent_ calculations
* Now returns the percent buffered of the entire segment duration instead of the "adjusted" duration
* Handles segments reported as having a zero-duration
* Reduced the number of segments that we will attempt to "timeCorrect" when the segment chosen by `checkBuffer_` is already more than 90% buffered to 1
* No longer trigger errors from `timeCorrection_` handling, returning to the previous behavior
* Use the tech's setCurrentTime function in segment loaders
* Moved getSegmentBufferedPercent to `Ranges` module
* Moved correction for zero-duration segments from parse-stream to parser proper
* add tests for all options in HLS
* add configuration hierarchy testing
* Hls.GOAL_BUFFER_LENGTH is settable to a number greater than 0 with a warning
* use Hls.GOAL_BUFFER_LENGTH if it exists
* added unit tests to verify warning logs
* fixed comment about Mbps vs MB/s
* Fix how and when timeCorrection_ was being applied so that it works for Flash
* Always apply timeCorrection_ when we haven't learned anything even if playlists have changed
* Apply timeCorrection_ directly to the currentTime when calling getMediaIndexForTime so that we can work around bad segment.end metadata in the playlist
* Emit an error if we have been stuck in a "timeCorrection" loop for more than 5 fetch attempts
* Make sure to clear the timeout before setting another in monitorBuffer_
* Clearer naming of variables
* Use timeCorrection_ when a chosen segment is more than 90% buffered
* Break out timeCorrection_ functionality into a reusable piece
* Added tests of the new timeCorrection_ functionality
* Test that timeCorrection is applied even when the segment.end data is misleading
* Verify that an error is emitted when we have failed to make progress after 5 time-corrections
* Ensure that we only have 1 timer if monitorBuffer_ is called multiple times
* Moved percent-buffered check out of checkBuffer_ to fillBuffer_