This adds code to allow Shaka Player to play media in sequence
mode, an alternate playback mode that makes the browser ignore
media timestamps, when playing HLS media.
This is important for containerless media formats, as they do not
contain such timestamps.
Changing HLS to not require timestamps also means that we no
longer need to fetch media segments in order to get the start
time, which should lower bandwidth usage and startup delay.
In initial tests, on a simulated 3G network, load latency went down
from an average 3.16s to 2.61s on the HLS version of "Big Buck Bunny:
the Dark Truths of a Video Dev Cartoon"; an improvement of about 17%.
Issue #2337
Change-Id: I507898d74ae30ddfb1bddf8dce643780949fbd9b
If an HLS stream has no provided codec information in its manifest,
we previously defaulted to providing a best-guess video and audio
codec. This, however, caused problems for video-only and audio-only
streams; Chrome does not like it if an audio codec is provided for
a stream with no audio at all, for example, and fails to append the
chunks.
This modifies the HLS parser to not provide a default video codec if
the 'disableVideo' config is set, and similarly to not provide a
default audio codec if 'disableAudio' is set.
Issue #2868
Change-Id: I7826fdb69f2e5290914ed2c0d1e109f9db94f80d
This updates to mux.js 5.6.3, which includes a fix for v1 trun box
parsing to fix caption extraction for content with b-frames.
Closes#2395
Change-Id: I206ce26bb43e8187599e8ca7be2e718f4ea345c3
This gets us a fix for a closed caption parsing issue described in
videojs/mux.js#330 and fixed in videojs/mux.js#333:
> Atypical streams containing 2+ SEI NAL payloads of type 0x04
> (CEA-708 caption content) in the sei_rbsp (specifically a DTG1
> payload preceding a GA94 payload) fail to display captions in this
> scenario, as the current logic results in parseSei() prematurely
> returning with the DTG1 payload.
>
> By checking for the user ID within parseSei, mux.js can continue
> iterating through the sei_rbsp for the GA94 payload.
Change-Id: I9d90419643279a1273187e0354b5e991cd609ba2
The new mux.js release fixes support for a minified build, so we
should use that from now on.
videojs/mux.js#173
Change-Id: I08cff8d33a520fe753c5490a4719cba3bb27f19e
At some point, a compiler upgrade introduced a built-in polyfill for
Promise. A third-party polyfill for Promises on IE11 is no longer
required.
Change-Id: Ie5a649232d949b0bba0c6c68ea54ceed6fb30891
According to @beaufortfrancois, we should no longer be using protocol-
relative URIs. He quotes this passage from Paul Irish:
> Now that SSL is encouraged for everyone and doesn’t have performance
> concerns, this technique is now an anti-pattern. If the asset you
> need is available on SSL, then always use the https:// asset.
> Allowing the snippet to request over HTTP opens the door for attacks
> like the recent Github Man-on-the-side attack. It’s always safe to
> request HTTPS assets even if your site is on HTTP, however the
> reverse is not true.
Source: https://www.paulirish.com/2010/the-protocol-relative-url/
This change was begun with the following command:
git grep -l "'//" | xargs sed -i "s@'//@'https://@g"
Some changes made by that command were false-positives, which I then
reverted manually. Others required additional cleanup to meet style
rules.
I've also just discovered that the "max-len" rule in eslint's Google
style config exempts URIs, so there's no need to disable the max-len
rule on URIs in the assets list. These have been removed in the asset
list where unnecessary.
Finally, testing these updated URIs led to the discovery that two of
our third-party demo assets are no longer available. One URI needed
to be updated. The other had no obvious replacement, so it was
removed.
Closes#1390
Change-Id: I2fe23faec04f1904c1741236b364d5089900092a
This plugin is preferred over the XHR plugin, if available.
This plugin requires AbortController, which is only present on
Firefox 57 and Edge 16, so this will not be active on every platform.
This also adds a simple mock for the Fetch API for use with Jasmine.
Closes#829
Change-Id: Ifb79d29334fbfcfd175afe0706da5a3d5e452e2f
A bug in our Promise polyfill caused issues with the recently-added
AbortableOperation class on IE11. Since external polyfills for this
are smaller, it is easier to remove ours in favor of a third-party
polyfill. Applications that wish to support IE11 must now load this
additional polyfill.
We are using the "es6-promise-polyfill" module from npm, but any
compliant polyfill should suffice.
One feature our own polyfill offered was the ability to flush all
Promises, which allowed us to write synchronous unit tests that
simulated async processes. To get this ability back, we are now
using the "promise-mock" module in our tests.
Getting "promise-mock" to load correctly involved switching from
"requirejs" to "cajon", which builds on requirejs and supports
AMD modules more directly.
Closes#1260
Change-Id: I5de48e88a910736ae5c1897a7a509bc5641acb70
Update HLS TS question in FAQ to include info about our ongoing
effort on transmuxing TS to fMP4. This will let people know that
the solution is coming and subscribe to the issue on github.
Change-Id: I9b90e4c355834573a0d23472a2ffd369847ddb16
The FAQ file had to be moved into the tutorials folder to make this
work for some reason. JSDoc did not want to take "../faq" as a name.
Closes#865
Change-Id: I63ff5b181f494d72c04eaa054111d9fdc866064c