Previously, if the seekable window for the content started at 0
(generally denoting a VOD or LIVE DVR playlist), the back buffer would
not be trimmed. With high bitrate and/or longer content, this could
lead to an APPEND_BUFFER_ERR due to the buffer exceeding the max
allowed buffered bytes.
In order to help alleviate this issue, particularly with the increase in
high bitrate content, the back buffer is now trimmed to a reasonable
length, even if the seekable window starts at 0.
* Update sinon to v8.1.1 and fix abort tracking in mediaRequestsAborted
* Add check to media-segment-request for empty responseText when handling partial data
This was not needed in the past, as the responseText property of a sinon response was
anually set by VHS' test helpers. However, sinon now clears out the responseText property
on a response, the mime type override trick doesn't work like it would in a browser. The
additional check to the code should prove harmless, and acts as a guard against browsers
which don't implement the mime type override trick in the same way.
* Add an abortFn callback to media-segment-request to fix abort tracking in
mediaRequestsAborted
In the previously used version of sinon (v1.10.3), aborts of requests triggered the XHR
callback. In the XHR standard however, this does not happen. Later versions of sinon fixed
this issue. VHS' use of the old sinon lead to tests relying on broken behavior to verify
abort tracking in mediaRequestsAborted.
To properly use mediaRequestsAborted, aborts are tracked on loadend, part of XHR's
[request error steps](https://xhr.spec.whatwg.org/#request-error-steps), and called back
via the abortFn to increment mediaRequestsAborted
* Skip id3 with partial data handling tests until they no longer rely on segments being
fully requested
A couple of tests checking for id3 frames surfacing from partial data handling were found
to rely on the segment finishing its request before the data was surfaced. These tests are
skipped until a fix can be made such that they rely only on partial data.
* No longer override sinon's abort behavior for tests
* No longer work around sinon's response types in standardXHRResponse
With a newer sinon version, a few workarounds needed in test-helpers are no longer needed.
* Skip partial data caption tests until they no longer rely on full segment responses
This feature adds support for passing a JSON object as the source via a
data URI, which VHS looks for alongside a new vendor (VHS) specific
media type, 'application/vnd.vhs+json'. If present, VHS will use the
provided manifest object as the first requested manifest.
* Extract manifest modification functions from playlist loaders to manifest module
After parsing an HLS or DASH manifest string via m3u8-parser or
mpd-parser, the respective playlist loader (playlist-loader or
dash-playlist-loader) would modify the manifest objects to add
properties or change their structure so that VHS could use them
as if they were standardized.
The functions for doing this lived in playlist-loader and
dash-playlist-loader, however, with the upcoming possibility of passing
in a vhs-json object as the source (representing a manifest string
already parsed by m3u8-parser/mpd-parser), the functions needed to be
extracted to be reused appropriately, in a way that could act on either
HLS or DASH playlists in the same fashion.
This extracts that functionality to the manifests.js module.
* Simplify manifest modification functions by reducing abstraction
Previously, the same functions would be used for adding properties to
both master and media playlists. This simplified calls, but made for
more confusing sets of parameters and behaviors. It also led to some
harder to find backwards incompatibilities.
This simplifies the scope of each function to act on media playlists
regardless of whether they were part of a master or were sole media
playlists.
Ignore unsupported renditions (those with an excludeUntil of Infinity)
This time use a separate timer for the final rendition.
Second try at #396. Reverts #471.
* Add document for program time from player time
* Attach video timing info from probe and transmuxer to segments
* Change `appendBuffer` to use a config instead of an optional trailing
callback parameter
* Add TODO for fmp4 timing info, since fmp4 segments won't go through
the transmuxer
* Add creating-content.md doc file with ffmpeg command to create HLS VOD
stream with EXT-X-PROGRAM-DATE-TIME tags
* Fix seekToStreamTime to perform seeks when findSegmentForStreamTime
returns estimates
* Rename convertToStreamTime and seekToStreamTime as convertToProgramTime
and seekToProgramTime
* Fix intermittent Firefox loop test failures
* Bump mux.js to 5.1.0
* add clock.ticks to now async operations
* adding more comments
* use real browser for Chrome
* skip fullscreen test for now
* export path to chrome, start xvfb, add display flag
* use base Chrome
* initial method stub
* take playlist directly instead of reference to MasterPlaylistController. Simplify method arguments.
* rework API to have onsuccess and onreject callbacks. Return accurate and estimate values where appropriate
* use node style callback. Added top-level test for convertToStreamTime
* skip flakey test
* Update sinon to 1.10.3
* Update videojs-contrib-quality-levels to ^2.0.4
* Fix test for event handler cleanup on dispose by calling event handling methods
* Remove IE11 section from README (#1325)
* Throttler: Minor changes to make throttler work with native safari (#1118
Run a test pass with video.js 6 and video.js 5.
Also, use in-publish to not run build when running `npm install`.
Consolidate karma configs into one config but keep npm scripts for them.
Add `this.clock.tick(1)` after player creation to support video.js 6.