This PR introduces a Web Worker for transmuxing resolving
https://github.com/shaka-project/shaka-player/issues/1735
- The worker bundle is compiled separately
- The build output is embedded as a string constant and then wrapped in
a Blob to create an inline Worker URL (HLS.js does this very similarly)
- `TransmuxerProxy` is created wrapping a real transmuxer, but no worker
is started yet - on the first `transmux()` call, it checks if the device
supports worker transmuxing
- For each transmux() call: the buffer is copied, then zero-copy
transferred to the worker. A PublicPromise is stored under a reqId with
a timeout timer, and the main thread awaits it.
- The worker transmuxes and posts back transmuxed (or error). The shared
message listener routes the response to the right proxy instance by id,
which resolves the promise and cancels the timer.
- When the last proxy instance is destroyed, the worker is terminated
and the blob URL is revoked.
loaded inside the worker.
- Some low-end devices have been excluded since their Worker support is
questionable
There most likely is a better way to do this - please let me know
PR #5050 unboxed the console log methods, which broke logging on Tizen.
This change was never released.
This fixes the issue by using arrow functions to prevent unboxing.
This removes some workarounds that were in the logging code for the sake
of Internet Explorer. We no longer support IE, so those workarounds are
no longer necessary.
Closes#5032
This fixes all the license headers in the main library, which corrects
the appearance of the main license in the compiled output.
It seems that the `!` in the header forces the compiler to keep it in
the output. I believe older compiler releases did this purely based
on `@license`.
Issue #2638
Change-Id: I7f0e918caad10c9af689c9d07672b7fe9be7b2f3
This fixes the missing shaka.log in debug builds by exporting it
explicitly with the Closure Library API if goog.DEBUG is set.
Closes#2565
Change-Id: I4edd3220997f890058b693cec3bdf295ab5c171c
This reflects changes in Google's policy on JavaScript license
headers, which should be smaller to avoid increasing the size of the
binary unnecessarily.
This also updates the company name from "Google, Inc" to "Google LLC".
Change-Id: I3f8b9ed3700b6351f43173d50c94d35c333e82b4
We avoided bind() since we could use lambdas instead; but with the
console methods, we loose the link to where the log happened in the
DevTools. So by using bind(), we can see where the log came from.
Change-Id: I04ad1f360e459c3676eabb6d0651a7963d186b43
Changes in the Closure Compiler have made it so that goog.define
without using and assigning the return value will no longer be
allowed. There is no need for goog.define, though. Instead, we can
just use the @define annotation and assign directly to a variable.
This eliminates the use of goog.define.
A similar change was already made almost two years ago for the Player
version in lib/player.js
(in Change-Id: Iad9040d0f5ee397c7d46b1d64bc5bebf2def57bc)
Replaces PR #2158
Change-Id: Ia7c7de0407f9790284c418fb6edde948b922ab62
A coming update to the Google eslint config will require using "const"
over "let". This makes that one change to isolate the big changes.
Change-Id: I7d0974c3ae15c53cc45a6b07bf9f6586e2d34aca
Added an alwaysError log method that will ensure that some errors
(like expired deprecation messages) are always printed.
Change-Id: Ia641f97b97258ea2826a1ad3fe2d7d7952ffa2ed
This is part of a change to convert all usages of 'var' with either
'let' or 'const'. This takes a conservative approach for 'const' where
it will only be used for aliases and storing the "original" values in
tests.
Change-Id: I10f5c38a8b06b5797c6eec7492829084114514c9
We want to be able to write logs for deprecated APIs. This ensures
that those logs appear even when we disable logging in compiled builds.
Change-Id: I1f1546049fb17967eedb1bb45a7f76d5b1809cd1
Now the generated documentation will include the values of enums, not
just the names. This also adds documentation for shaka.log.
Closes#337
Change-Id: Ie45a5f5df8d173e5a4ba08a1807d918c22d5497c
Still missing custom controls for live, but otherwise functional.
UI design and CSS based on work by Sam Dutton.
Change-Id: I0ee41254fb3b145822b018dff87aa583d6bef179
This will allow support-testing to work on older browsers so that
application developers can still load the library and query for
support to show an appropriate error message.
To accomplish this, we avoid load-time uses of Function.bind, avoid
certain polyfills if modern types are not available, and compile down
to ES3 to avoid errors caused by use of the reserved word "catch" on
Promises.
This has been tested back to IE6, Safari 5.1, iOS 6.0, Firefox 6,
Chrome 15, and Opera 16.
Change-Id: I9deed106a7736758e04452ef85bae40f37c6fe62
* Updates all Copyright years to 2015.
* Adds licenses annotations to all JS.
* Makes all licenses identical to avoid repeated appearance in the
compiled output.
* Drops fileoverview annotations, which do not affect docs output.
* The linter still requires fileoverview on externs.
This patch required a newer closure compiler, since the previous
version we used had a bug regarding license annotations that caused
the license comment block to appear in the output once per file
regardless of uniqueness.
Change-Id: I2e9272db680cba7ecc4613d97f1d3a94ac2244cc
This reverts commit 8cb24652cb, due to
the fact that the new annotations caused our binary size to jump
by 52%.
The compiler preserves all 'unique' licenses, which causes trouble
since the comment blocks with the license annotations are not unique
and contain file overview comments as well.
We can re-examine this once we have restructured the license headers.
Change-Id: I418e407a0e0253630633697f30cf496a7fc2ddfc
* Update compiler to v20150609.
* Since v20150315:
* Promise.prototype.catch externs now provided by compiler.
* Iterator externs now provided by compiler.
* Variadic function syntax has changed.
* Since v20150505:
* BufferSource extern now provided by compiler.
* Since v20150609:
* VideoPlaybackQuality extern now provided by compiler.
b/21559591
Change-Id: Ie7d030422e132879e28b1bdf538991a27ebc25df