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
The old compiler would let us export a static method on a class
without exporting the whole class and its constructor. The new
compiler silently ignores `@export` for any methods of a non-exported
class.
This means that for the latest Closure Compiler, we must export any
class with exported static methods. In some cases, these are
non-utility classes with constructors we'd rather not export, but the
constructor is implicitly exported by exporting the class itself.
This was initially caught by the integration tests. The error wasn't
especially helpful, so I added a try/catch to loadShaka that makes the
error more apparent:
TypeError: Cannot read property 'registerParserByMime' of undefined
To make sure we do not make this mistake again, I've added a check to
the extern generator, which was already able to detect these types of
classes. I don't know a compiler-based way to do it, since the
compiler silently ignores the export annotations in these cases.
Issue #2528
Change-Id: I797c75a8098b0bb3cf837588569f878253dec2cf
Player.load and Storage.store used to accept the manifest parser factory
directly. But now they should only accept the MIME type string. This
removes the deprecated functionality in preparation for v2.6.
Change-Id: I1b4c5a4a9f0b6edbea909d18111ddc87a39da331
Instead of having the "factories" use "new" to construct them, now they
will be plain functions.
Closes#1521
Change-Id: Ia6151ad679a78a5c6db128d43094c82add0af348
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
This is a fully automated change. The linter will fail because the
extra indentation caused line-length errors. These won't be fixed
automatically. They are fixed in a follow-up to make this one fully
automated.
Change-Id: I4d8cf9c998985add2bcd24a81c8d65495668c4f3
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
Instead of triggering src= based on 'video/mp4' MIME types, ask the
browser what it can support using video.canPlayType().
Querying canPlayType() also allows us to detect src= support for
native HLS in Safari.
The original version of this change also added a complete fallback
system to detect MIME types based on common file extensions and
fetch MIME types via HEAD request when necessary, but the load graph
system does not yet allow us to make async decisions about destination
node. So this async MIME detection is commented out for now.
Closes#816 (src= single file playback)
Issue #997 (native HLS in Safari)
Change-Id: If1930ca4fd5710481a925d63fb312d9a5b15fec8
Now iOS is supported for HLS through src=, so isBrowserSupported
needs to reflect that. This makes MediaSource optional for any
browser with src= playback of HLS.
This also fixes probeSupport() to reflect the capabilities of non-MSE
platforms such as iOS, which is critical for our demo app to be able
to show the correct set of playable assets.
Issue #997Closes#1857
Change-Id: Ic6e18587db90fff2b097a2038c16cc928e2b9438
Rather than have the manifest parser class return the factory
that we then need to call "new" on, we can just have the manifest
parser class return the parser.
This makes the call-sites in Player and Storage simpler and moves
the use of factory+new to one spot so that it will be easier to
remove in 2.6.
Change-Id: I2abb8da603c9226c230bb761a20eb8dd20fc8455
Added an option for the mime type to be passed to the load function.
Going forward this will replace the option to pass in a manifest
parser factory.
This is to help with issue #816 as passing in the mime type will be
one way for the player to know if it should use src= over MSE.
Issue #816
Change-Id: Ic356bb9f52c3977620debc8d4a09b7115a81d516
https://goo.gl is being turned-down, so we can't use it for new URLS.
So we have consistent short links, this converts them to be
https://bit.ly.
Change-Id: I07a86cba807b67157664893341f648023918d0de
Google style guide requires adding curly braces to all block statements
even if it is only has one line. This fixes it by using eslint's
--fix flag followed by running clang-format to reformat the change.
Change-Id: Idc086c2aa8c02df5ef8b2140a11bfb9128eeb4bd
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: If4792c1bd3d5a82c24a4b2f0f84790d4eed22e67
This uses AbortableOperation in all networking, from the scheme
plugins all the way to the request interface.
This also updates all default scheme plugins, docs, and sample code.
Backward compatibility is provided for scheme plugins and the
request API in NetworkingEngine. This compatibility will be
removed in v2.5.
Two cancelation-related tests have been disabled in
player_integration until the new abort interface has been adopted
in the manifest parsers.
Issue #829
Change-Id: I91c8e6efe97798d111e8ddca5655cddc1f6bcbf3
This adds a severity field to Error objects. This can be used to
detect whether an error is recoverable. All the same errors are still
reported so the field can be ignored.
There are two possible values:
* RECOVERABLE means that the Player will try to recover from the error
* CRITICAL means the Player will be unable to continue and must call
load() again
Closes#564
Change-Id: Ie2c5468340c13e7a288b99690ab65b7ecc0a6b29
UNABLE_TO_GUESS_MANIFEST_TYPE doesn't indicate that the guesswork
failed due to a network error. To make it clearer what went wrong,
dispatch the original network error from the HEAD request.
Change-Id: I1905afdf0913740f9fce0d011b6b2ac3ad37efd7
Now there is a new synchronous method Player.isBrowserSupported. This
will detect basic support and return a boolean. The support() method
has been renamed to probeSupport() and should only be used for
diagnostics.
Also added a plugin system to Player support testing. Now a plugin
(e.g. offline) can add extra info to the output of probeSupport().
Closes#388Closes#389
Change-Id: I313a41d9f123871272f1395aeb99c980df1f4bae
This moves a bunch of code out of Player into different files. This
is needed to allow the new Storage class to have the same behavior
as Player. This also reduces the size of player.js.
This moves the following code:
* Determining the manifest parser to use.
* Period filtering.
* Application track restrictions.
* Configuration object merging.
* Choosing initial stream sets.
* Track creation.
Change-Id: I84d68d39b487447d6f8d61a145cd034a88165739
This properly externalizes manifest parsers so that they can be
implemented in application-space. This also moves all parameters
from the factory function to start().
Change-Id: I66801bc1cb13214d576e0043cebc2d9b9cb5a641
This is important to avoid renaming properties during compilation so
that applications can inject these types without compiling their code.
This also migrates record typedefs to the new documentation format.
Each record will be annotated with 'property' for each field in the
record. This results in better output from jsdoc.
Change-Id: Ia877b1e2b333ef7020a85f16bc2469a20879bf94
Support testing is hierarchical. Player.support returns an object
mapping out the support present in various parts of the system.
This creates a shell for Player and DrmEngine, and introduces support
tests for MediaSourceEngine, ManifestParser, and DrmEngine.
This also adjusts the way support checks are done for text types, to
allow for expansion into MP4-embedded text types and other segmented
subtitle types.
Text changes related to #150 and #146
Change-Id: I707f01ba52cba6262ee89bee2c1f28d24aca4655