There are some platforms (e.g. iPad) which can be rotated,
but do not support the screen.orientation API. This is relevant
because iPad now supports requestFullscreen, which it did not
before.
Found while investigating #2653
Change-Id: Iacc93433aa1fb50a25d968203dc9fd4f7f16b4ae
In particular:
- New ad events were added
- It's now possible to get original IMA ad and ad manager
objects through Shaka
Change-Id: I2ffdc08befc11011673ebba5fb2fdb5e485977f5
This corrects/normalizes license headers in misc. files, such as
config files, docs, build tools, tests, and externs. This does not
affect the compiled output, and is only done for consistency.
Issue #2638
Change-Id: I9d8da2de55243b08d7df2b743aac73c6f15e858a
This change adds the following methods on CastReceiver:
- setContentMetadata(metadata)
- clearContentMetadata()
- setContentTitle(title)
- setContentImage(imageUrl)
- setContentArtist(artist)
These should be called from the CastReceiver's app data callback.
The title, image, and artist methods cover all the Cast content
metadata fields that have an effect in the Google Home App as of June
2020, and setContentMetadata can be used to set one of several object
formats with many more fields defined in the Cast SDK docs.
See https://developers.google.com/cast/docs/reference/messages and the
definitions of GenericMediaMetadata, MovieMediaMetadata,
TvShowMediaMetadata, and MusicTrackMediaMetadata for details.
This also uses these methods from our cast receiver demo, so our demo
will now set all possible metadata when casting our content library.
Closes#2606
Change-Id: I6386276449dbddd2501cd6e3e52206f7fb30b8fd
When no specific size has been set on a Cue object, the default will
now be 0, which means "auto" size to the text displayer. If a cue has
no specific width, the background will fit to the text. If a cue has
an explicit width of 100%, the background will fill the entire
horizontal space of the text container.
This fixes the 100%-width background introduced in Change-Id
I4500b8f637f3f43f48d019d14ef527e75d960fec in #2524.
Fixes#2524
Change-Id: I98caeb89d3da640a8175560810c8ccf2de27a2bb
The Closure Library's base.js, the Closure Compiler, and the Closure
deps-writer are all now loaded via NPM instead of commiting them
directly to the repo. This also updates both the library and compiler
to the latest version: 20200406.
We still have a fork of the Closure Library's URI parser. The latest
upstream version of that has too many dependencies on the rest of the
library to import directly from NPM.
Some internals of the build system have been refactored, and the
"complete" set of files in the build system now includes third_party.
Our forked URI parser does not pass lint checks yet, so the linter
does not run over third_party yet.
A couple of overly-severe sets of compiler checks have been disabled,
since even the latest Closure Library's base.js doesn't pass them.
The script-loader in load.js had to be updated for compatibility with
the new Closure Library. If you don't return "true" now, Closure's
base.js will stop loading subsequent source files.
Some local externs that we had written are now available from the
compiler, so our local copies have been deleted.
A few type-related changes have been made as well, removing casts that
were necessary with the old compiler, but not necessary with the new
one.
Finally, this corrects some type issues in the tests using the new
"typeof" annotation from the compiler. This allows us to type a
variable as a class defined elsewhere. For example, after loading the
compiled library, we can reference compiledShaka.Player, which has the
type "typeof shaka.Player". The compiler can then type-check all uses
of it in the tests.
Closes#2528 (bad polyfill code generated by the old compiler)
Change-Id: I62ec61e82d4edf342b2c576c2d4f89f11562ee65
The built-in externs for IndexedDB in Closure Compiler are missing
some type info. This overrides them to add what's missing.
This also tweaks type information in a few places in lib/offline/ to
match.
This was caught by a compiler upgrade.
Issue #2528
Change-Id: I97096656f53b426067219e2d4e3aa16f32b87188
The built-in externs for DOMStringList in Closure Compiler do not seem
to list it as Iterable. This overrides them to fix it.
This was caught by a compiler upgrade.
Issue #2528
Change-Id: I5a404f2502fce8fc3e956f68f6a51728d68f0654
This adds or augments type info for TextTrack, Cue, and related types.
This was caught by a compiler upgrade.
Issue #2528
Change-Id: I233e46eeaed8d6503702e181c3380d674ddbb499
The setClickElement() method we've been using for this is
getting deprecated, and IMA recommends setting this through
the constuctor instead.
Change-Id: I7dd5c5e2644e2b270996be7fe2b1390e41009505
When period-flattening combines Streams, key ID arrays would get very
long with duplicates.
This changes keyIds in the manifest and offline structures from Array
to Set.
Issue #1339
Change-Id: I003d23e567efafa771ecd2ad597900181604ad18
This brings the field name in line with the Stream objects from the
manifest types, allowing for more general processing of Stream and
StreamDB for period-flattening.
Issue #1339
Change-Id: Ic5d0e5d69a6560d475a19f5d3ecb0b1b40b8d271
Period-flattening will concatenate Stream objects, so this information
should be available per-Stream instead of at the Variant level.
Issue #1339
Change-Id: I96195fea48cab1e4a349b2ab0b16064a443e928a
This removes periods from the internal manifest structure and cleans
up code and tests accordingly. This leaves us unable to play
multi-period DASH & offline streams until the main period-flattening
algorithm is completed in shaka.util.Periods.
Three test cases have been disabled for the moment.
Multi-period playback will be restored in a smaller, more focused
follow-up commit, with disabled tests re-enabled.
Issue #1339 (flatten periods)
Issue #1698 (rapid period transitions issue)
Issue #856 (audio change causes bitrate change)
Closes#892 (refactor StreamingEngine)
Change-Id: I0cbf3b56bfdb51add15229df323b902f0b2e643a
The 'webkitkeyneeded' and 'encrypted' events send similar data, but
they were incompatible with each other and our transform handling.
This makes our polyfill produce the same format as the browser for
cases where the browser may only fire the old event. This also makes
our utilities work with the new format.
The 'webkitkeyneeded' event was a length-prefixed UTF-16 string while
the 'encrypted' event was just a UTF-8 string.
This also makes a breaking change in the transform callback to pass the
init data type. This shouldn't break anyone that only uses the first
argument; the second argument was mainly added so we could have the
default transform work without knowing anything.
This change could also break people who use custom transform functions.
The init data format is changing, which could break people who read
it directly. If they follow the tutorial and use our utilities, it
shouldn't break. This also updates the tutorial to match the new format
and be more clear about the format.
Fixes#2214
Change-Id: I006382028e828e31e20e085114fd7fd85c0e1eaa
This mistake was caught pre-release by a newer compiler version in
another context.
Related to #2383
Change-Id: I8e2e8c60cf50b1077b09d705116a02ce83d8dba9
Instead of having the "factories" use "new" to construct them, now they
will be plain functions.
Closes#1521
Change-Id: Ia6151ad679a78a5c6db128d43094c82add0af348
This PR ads initial logic to enable support for IMA DAI streams.
Ad-containing streams can now be requested from the IMA stream manager and played.
Integration with the ad UI will follow in a separate CL.
We fetch the previous segment in Live streams to combat differences
between the manfiest times and the segment times. Now this can be
configured so apps with correct manifests can avoid the extra segment
request.
Also, we'll update the buffering state when a segment appends so we
leave the buffering state sooner.
Issue #2291
Change-Id: Id12c8132dc11739e4c8d42cb1f08e6ae7da1a966
This will make it easier to ensure conversions are done correctly,
which will be increasingly important as we change the database format
as part of #1339 (period flattening).
Change-Id: I1114b1a9a0d341589f7f1026ec23ad93af38a6b0
Before this, we only had tests in place for loading and converting the
v1 format for offline storage. We had database dumps already for v2
and v3, but no tests exercising them. This adds some basic tests and
fixes a bug in the loading of expiration times for v2 and v3,
equivalent to what we already had for v1.
Note that here, v1, v2, and v3 do not refer to major versions of Shaka
Player. Instead, they refer to IndexedDB storage formats used in v2.x
versions of Shaka Player.
Change-Id: If32d1f1131b935eb191101463c4152317e711c5c
It is common when debugging protected content to want to see the
license request/response data. This adds a configuration to easily log
the license request/response data so we can see this without modifying
the code or adding breakpoints.
Change-Id: Ib5db3eaa1447ae8714da935ee459fc7f9ba1e937