Commit Graph

130 Commits

Author SHA1 Message Date
Joey Parrish 7b80252408 Improved ClearKey Example (#2439)
Improving documentation for DRM-Configuration for ClearKey

Closes #2434
2020-03-04 10:26:07 -08:00
Joey Parrish b38b75c892 Fix truncated UI tutorial
Unescaped HTML tags in the tutorial text were placed directly in the
HTML output by jsdoc, causing the text to appear truncated.

Closes #2410

Change-Id: Ic7e3563cc000e666237851b1c7429a164532db6a
2020-02-21 00:47:12 +00:00
Brian Harris 10218b1342 Update offline.md (#2404)
https://developers.google.com/web/updates/2017/12/chrome-63-64-media-updates#persistent-licenses-windows-mac
2020-02-19 13:09:24 -08:00
michellezhuo cfe1f89171 Add playback speed selection to UI
Closes #2362
Closes #1676

Change-Id: I10184dccab301be7382940e35e36d66dc7a5e2ad
2020-02-12 20:24:03 +00:00
Sandra Lokshina eda5b72134 Add loop control element to the UI.
Please note that this CL doesn't add the new control
to the default layout, so it won't show up in our
demo page.

Issue #2362

Change-Id: Ibecf6a7174de7d8eca9049f0b46ae179a03b9c01
2020-02-04 21:27:20 +00:00
Theodore Abshire bcb4c56ecc Fix typo in fairplay tutorial.
Closes #2344

Change-Id: I8f3702820887e3f4a6158fbdaa01df032a5193e7
2020-01-16 13:47:25 -08:00
Joey Parrish 41a8664dba Make segment references independent of periods
This is a step along the way to flattening periods, and also
simplifies a few small things in StreamingEngine and tests.

Issue #1339 (flatten periods)
Issue #892 (refactor StreamingEngine)

Change-Id: Ie17cd5e15ed6ec9290a918c3a69c05c74581e0fc
2020-01-02 19:03:18 +00:00
Joey Parrish c13830e535 Augment SegmentReference with offset and window
SegmentReference used to have presentationTimeOffset, which,
subtracted from the period start time, was then _added_ to the
timestamps in the segment by MediaSource.

Now, SegmentReference has a timestampOffset field, which is exactly
what MediaSource's timestampOffset field is set to on the SourceBuffer
before this segment is appended.  For DASH, this is periodStart minus
presentationTimeOffset.

This also adds append window start & end times to the
SegmentReference.  Now segments can be appended to SourceBuffers
without reference to the period.

Note that start & end times of the SegmentReference in each segment
index are still relative to the period.  This will change in a
follow-up.

Issue #1339 (flatten periods)
Issue #892 (refactor StreamingEngine)

Change-Id: I9d54eb2b529ec643c9475b8e9d218c3e2e826a26
2019-12-19 11:35:14 -08:00
Sandra Lokshina 151c06985a Add a FAQ about ad blockers.
Issue #2222.

Change-Id: I6af12a98bf976c19fdc69bbad9f4fdde69f84dc2
2019-12-03 21:52:00 +00:00
Sandra Lokshina 8d1ec9b460 Expand on how to customize the UI in the tutorial.
Apparently, the UI customization tutorial is a bit hard
for people to understand. This adds some more context
to the code examples.

Issue #2241.

Change-Id: I6218e4afb8293dfc1cc98e3677868f36f27cec09
2019-11-18 09:57:52 -08:00
Sandra Lokshina 827e5d813f Support setting source through HTML
Issue #2088.

Change-Id: Ib0ee45e4b5e6b0f6bcdd8b76f26ddd0cfa972a03
2019-08-28 18:34:51 +00:00
Sandra Lokshina 1cc3b9ff96 Add player and ui to window in UI tutorial.
Based on the recent CWIP feedback.

Closes #2112.

Change-Id: I157ba61ba1b6a9c9557fddeb2fd47dcde794e7db
2019-08-23 18:22:07 +00:00
Jacob Trimble c5b9d6804f Allow custom content ID in FairPlay.
Now there is a generic callback to transform the init data before
passing it to the browser.  This can be used by apps to use a custom
content ID in FairPlay content.  This also adds some utilities to help
in writing these functions and moves the default behavior to DrmEngine.

Closes #1951

Change-Id: I78ce660c126b53a69d5f55b16775ffcdbbe4d748
2019-08-07 18:38:40 +00:00
Jacob Trimble ad996d6873 Add tutorial for FairPlay support.
Closes #1951

Change-Id: I2dac43117ef444cf0701b2195d4a0e93385e5d52
2019-08-05 17:25:34 +00:00
Sandra Lokshina b4ddbd2131 Add mention of the Chromecast SDK to the UI tutorial.
Closes #2061.

Change-Id: I48396b8e5cd9ed821b25f5d87965ed7fd8e86691
2019-08-01 22:50:18 +00:00
Joey Parrish 7fe97b841b Move fields to SegmentReference
To prepare for flattening out the manifest structure to remove
periods, this change moves initSegmentReference and
presentationTimeOffset fields into the SegmentReference object.  This
way, the segments on either side of a period transition or HLS
discontinuity can have different offsets or init segments, eventually
allowing us to create a single array of SegmentReferences for
multi-period content.

Issue #1339

Change-Id: Ic7eff0483789644881247ecf8044c5fb6a48f0e6
2019-08-01 11:04:36 -07:00
Sandra Lokshina f33395eb83 Add the addBigPlayButton config to the tutorial.
Change-Id: Ief7c13490954539bf9784f1ecd3c7cc3d6b58e1b
2019-07-25 15:10:18 -07:00
Joey Parrish 08cec995c9 Replace find/get callbacks with SegmentIndex
This replaces find/get callbacks in Stream with a SegmentIndex.  With
the exception of DASH's SegmentTemplate+duration, all manifests were
already backed by SegmentIndex.  Now, all manifests are backed by
SegmentIndex.  This will simplify Period-flattening, in which all
tracks will be represented by a list of segments, some of which come
from different Periods.

The SegmentIndex in Stream will not be created until
createSegmentIndex is called.  Prior to this change, the find/get
callbacks could be invoked without createSegmentIndex() in some cases
(excluding DASH's SegmentBase), which some lazy tests took advantage
of.  Now that find/get are methods on SegmentIndex, createSegmentIndex
must be called in all cases.  The tests have been updated accordingly.

Making SegmentIndex generation async in all cases exposed some issues
with the parser context being modified in-place between one
Representation and the next.  So the parser now makes a shallow copy
of the context before it is bound into an async callback.

To facilitate updating the SegmentIndex for SegmentTemplate+duration
content, SegmentIndex now has a method to update its list on a timer.
Once per segment duration, the index will be updated to add and remove
SegmentReferences.

The initial expansion of SegmentTemplate+duration will be limited to a
relatively small number of segments, to avoid excessive CPU or memory
consumption.  This defaults to 1000 segments, but is configurable.

Issue #1339

Change-Id: I99c007b1096c3b396d04a729750cd7b743cb899d
2019-07-08 22:22:13 +00:00
Sandra Lokshina aa259565fe Reflect code changes in ui tutorial.
The seekbar color consts got moved from Controls
to ui.Constants.

Issue #2005.

Change-Id: Id8c09cb59930f2f23a350cb1e7be3c8708c121d7
2019-06-21 11:21:07 -07:00
Sandra Lokshina 4bb1207ee3 Update UI tutorial according to the CWIP feedback.
Fixes #1954

Change-Id: I89166832b174df6e4db9c8f153b3edd0962319ef
2019-06-10 21:54:20 +00:00
mohrash92 b02dedf90b Fix a typo in the docs (#1973) 2019-06-01 18:01:14 -07:00
Joey Parrish e54f729a04 Deprecate ui.getPlayer for controls.getPlayer
The controls have the cast proxy and the proxied player, so the UI
itself offering direct access to the local player is confusing.
Instead, we will send all requests through the controls, which have
explicit getPlayer() and getLocalPlayer() methods for access to the
proxied and local players.

Closes #1941

Change-Id: I1d6154d76b1b3b5b550e55e39efcbb2c451f7569
2019-05-16 18:30:16 +00:00
Joey Parrish 42b40bd3da Require NodeJS v8+ and NPM v5+
This updates our build requirements to NodeJS v8+ and NPM v5+, both
released in 2017.

This also clarifies our support for Python 3 (not well-documented
before) to the version we are using on Debian, v3.5.

Requiring NodeJS v8+ means our node tools (like our extern generator)
no longer need shims for compatibility.  This allows us to drop the
"es6-shim" and "array-includes" modules.

In NPM v5+, the "prepublish" script has been deprecated, and replaced
with "prepublishOnly" (which is what we want) and "prepare" (the old
behavior we had to work around).  This allows us to drop the
"in-publish" module.

Change-Id: Ied189c76a58fe981c12d41155b834f2d6ea73bbd
2019-05-15 20:32:34 +00:00
Joey Parrish d66d6c4255 Upgrade mux.js and use minified version
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
2019-05-13 14:24:41 -07:00
Joey Parrish 34585af993 Inline external CSS for quicker load
This reduces the number of resources we have to load by using LESS to
import them into the compiled CSS bundle.

This also gets rid of a flash of unstyled content in compiled mode by
always including the compiled CSS in HTML directly, regardless of
mode.  If the app is running in uncompiled mode, LESS is still loaded
and can override the compiled styles.

Change-Id: I8cde25c15c281029a129225fc85a8baee767f424
2019-05-09 19:05:17 +00:00
Joey Parrish 94fd088199 Update upgrade guides for v2.5
This also drops the oldest upgrade guides for v1 - v2.2, because they
were far too difficult to maintain.

Change-Id: I9552891376d34f48e6424e862bd980f8ecc274c7
2019-05-07 22:19:13 +00:00
Joey Parrish f39bade337 Add play/pause button in controls
This is different from the giant play/pause button that sits over the
video container.

Change-Id: I4629b3a64a5208f23c65b383f4fb992e6ddfd334
2019-05-07 17:57:59 +00:00
Joey Parrish 233bcd62e5 Clarify offline tutorial track selection
The track selection algorithm in the offline tutorial is only an
example, and not a best practice.  This change adds comments to make
this clear.

Change-Id: Ic2d2e50505b5b3a05640278016b01a1e9a5f1445
2019-05-03 18:43:17 +00:00
Sandra Lokshina aac3657a83 Add dynamic UI reconstruction to the tutorials.
Change-Id: I915e2f52a597fabd4b81711dcf97a38cf2e3d788
2019-05-02 18:19:54 +00:00
Theodore Abshire efc2ed3df1 Added new demo page.
This is a complete replacement for the old demo page, made to be more
modern-looking and easier to maintain. It contains new features such as
remembering the URIs you provide for custom assets, and searching through
the default assets by feature.
This demo page is not quite ready for release yet, but it's getting close.

Change-Id: Iad01d1fc02c3cd238d73b9b9e02dbb4301cb6f2a
2019-05-01 19:58:18 +00:00
Joey Parrish b8baeb8a3a Remove jsdoc links in markdown files
Jsdoc has the `@link` syntax for links, but github's markdown renderer
sees the closing curly brace as part of the link.

To format things in a way that works for both jsdoc and github, we
should specify text for the `@link` as well as the link itself.  This
separates the URL from the enclosing curly braces in a way that fixes
github's rendering of the markdown.

Change-Id: I1cb9273aae50d6089aa4d3c33a7ad5daecaa141f
2019-04-24 09:45:45 -07:00
Jacob Trimble 6f47a6bf88 Add link for Shaka Player Embedded.
This also updates our docs for iOS support.

Issue #997
Closes #1846

Change-Id: If95d726acc00e16a4f25291b9791bee820a74b84
2019-04-23 22:31:57 +00:00
Deniz Susman f4f23fa846 Fix typo in code section (#1797)
" member" instead of "memeber".
2019-02-07 09:41:27 -08:00
Sandra Lokshina 3f04554926 Add tutorials on creating accessible buttons.
Change-Id: I203cffef9f73205a33b77a76aa85a2c5ad62451e
2019-02-06 19:28:23 +00:00
Sandra Lokshina 3fd138b433 Add tutorial on creating custom UI buttons.
Change-Id: Ib258ccb88b85ec87a753cd5d6348eb2b6b356ce2
2019-01-22 19:36:34 +00:00
Sandra Lokshina 40afb00f20 Add spacer element to the UI.
Issue #1673.

Change-Id: I8e01366f82e5e7d3b9365d8387f02eede877ad07
2019-01-18 21:48:31 +00:00
Joey Parrish db125ea8a7 Update "new issue" link for new template system 2019-01-10 12:36:51 -08:00
Jacob Trimble ced5ecda48 Add FAQ entry about Chrome robustness warning.
Change-Id: I02515fc254b3947af6816b1ad729bf213f797ea5
2018-12-20 10:10:51 -08:00
Tomáš Tichý e3739c9495 Add safeSeekOffset to StreamingConfiguration (#1726)
Closes #1723
2018-12-14 11:01:50 -08:00
Aaron Vaage 4bdca263cc Fix UIConfiguration Link in UI Tutorial
To link to the docs there is a special link syntax provided by
JSDoc. However, we were using a normal MD link resulting in a
link to a missing resource.

This changes that link to use the JSDoc link.

Fix #1719

Change-Id: I9f1633dbc8e1ac288a55636bd6b98dbff0ec9771
2018-12-05 17:44:37 +00:00
Joey Parrish f274e94dc8 Update docs to mention ignoreMinBufferTime
Issue #1547 (introduced manifest.dash.ignoreMinBufferTime config)
Issue #1666 (in which ignoreMinBufferTime is discussed as a solution)

Change-Id: I895dc136ab7a4900ee74ff8ebe60b2bc194efe32
2018-11-21 21:21:19 +00:00
Sandra Lokshina 6b1ca2d229 Initial release of Shaka Player UI
Other contributors:
 - @joeyparrish
 - @michellezhuogg
 - @TheModMaker
 - @theodab
 - @vaage

Change-Id: If6df33d9ab5035d1ead4402004f7de37ee8470f4
2018-11-16 14:40:37 -08:00
Joey Parrish 4c34b89c1b Document restrictions on large timescales
Fixes #1667

Change-Id: I00f0e049f6111dffa73c6dce852c9db81373b359
2018-11-15 09:50:25 -08:00
Gi Gi 29e15b74a5 Bugfix/offline tutorial sample (#1609)
* Fix tracks sorting in Offline tutorial sample code

Sort bandwidths numerically.

Fixes #1608
2018-10-08 10:39:57 -07:00
Joey Parrish 7091275cbf Replace indexOf with includes, startsWith
This replaces almost every instance of indexOf on both String and
Array.  There are very few places where we really wanted an index.
Mostly, indexOf was used to check for inclusion.

Change-Id: I08e299768b6ffdb4bfc30b39b5d82a058c6d1b56
2018-09-14 19:10:56 +00:00
Joey Parrish 7a3b352023 An external Promise polyfill is no longer required
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
2018-09-13 22:12:04 +00:00
Jacob Trimble ea9702b19b Rename 'video' to 'mediaElem'.
This emphasizes that both a <video> and <audio> elements can be used
in Shaka Player.

Closes #1555

Change-Id: I2aa6e10b9ad7044588e1b418d938060aca333a2b
2018-09-10 18:51:53 +00:00
Jacob Trimble da28845d2e Fix generated documentation problems.
- Fix some links.
- Add exportDoc to externs members so they appear in the documentation.
- Fix `shaka.extern` namespace so it appears in sidebar.

Change-Id: I4bdbf5083180d6d64a69c8d0dfd1b2d52f3f78c0
2018-06-20 16:34:31 +00:00
Joey Parrish 4d88905463 Build docs as part of build/all.py
Originally, docs were slow to build, and many people did not need a
local copy.  Now, building the docs is fast, and doing everything as
part of "all" is less surprising.

Closes #1421

Change-Id: I5ac254df9d2beca8c1c5898614782a81e662a0e9
2018-05-11 21:55:32 +00:00
Sandra Lokshina 1cca1d0ea2 Allow users to more easily set single config fields.
Closes #763

Change-Id: I1918f2a5286781e81f2619296e3201f02b91128f
2018-05-09 19:03:28 +00:00