Skip to content

Commit 90f2370

Browse files
Interfacedl1bbcsg
authored andcommitted
Version 2.4.0
GitOrigin-RevId: 6726183d873fdedd821dd9539ab97f67bf7927c0
1 parent 539b35a commit 90f2370

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+4608
-977
lines changed

.eslintrc.js

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,21 @@
1+
const path = require('path');
2+
const sinonPath = path.join(path.dirname(require.resolve('sinon/package.json')), 'pkg');
3+
14
module.exports = {
25
extends: 'interfaced',
3-
rules: {
4-
'jsdoc/check-tag-names': ['error', {
5-
definedTags: [
6-
'suppress'
7-
]
8-
}]
9-
},
106
overrides: [
117
{
128
files: ['zb/**', 'test/framework/*/**', 'test/tools/addons/*/lib/**', 'templates/**/*.js'],
139
extends: 'interfaced/esm',
1410
settings: {
15-
'import/resolver': 'zombiebox'
11+
'import/resolver': {
12+
'zombiebox': {},
13+
'alias': {
14+
'map': [
15+
['sinon', sinonPath]
16+
]
17+
}
18+
}
1619
}
1720
},
1821
{

CHANGELOG.md

Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,89 @@
11
# Change log
22

3+
## 2.4.0 (release date 28.12.2019)
4+
5+
Identical to `2.0.0-rc.2`, changes since previous stable version (`2.3.0`) are listed.
6+
7+
This release introduces `IStatefulVideo` and tis Abstract and HTML5 implementations. Stateful Video has a much stricter model that leverages more stability, standardisation and error handling. Additionally it supports DRM playback.
8+
Stateful Video is meant to replace current IVideo, but at this point both are available and the latte is not even deprecated.
9+
Migrating to Stateful Video will require a large effort as its model and APIs are vastly incompatible with previous IVideo.
10+
11+
For more details on Stateful Video see [docs/video](./docs/video/).
12+
13+
Other changes:
14+
15+
* `PrincipalAxisNavigation` is now used as first spatial navigation strategy of choice
16+
* `EventPublisher` refactored, added `runAfterCurrentEvent` method, improved test coverage
17+
* QHD resolution support removed, 4K and 8K added
18+
* `Info.osdResolutionType` deprecated in favor of `getOSDResolution` and `getPanelResolution`
19+
* `Viewport.getFullScreen` deprecated in favor of `isFullScreen`
20+
* `AbstractStatefulVideo` and `AbstracViewport` constructors both now accept panel and app resolutions
21+
* `zb/http` `decodeParams` now returns properly empty object if query string is empty as opposed to object with empty keys
22+
23+
## 2.4.0-rc.2 (release date 28.12.2019)
24+
25+
### Framework
26+
* Ensure no changes in html5 engine or Video happen once Video entered `ERROR` state
27+
* `EVENT_ERROR` now tries to make a better message
28+
29+
### Tools
30+
* Fixed issue when errors occurred while loading custom configs could be consumed and not reported
31+
32+
## 2.4.0-rc.1 (release date 27.12.2019)
33+
34+
### Framework
35+
* Aborting transition in `StateMachine` now restores it to previous state
36+
37+
### Tools
38+
* ESLint, its configs and plugins updated
39+
* Fix polyfills not being included in build
40+
* Workaround for GCC issue that prevents object destructuring from working without native `Object.assign`
41+
42+
## 2.4.0-alpha.6 (release date 19.12.2019)
43+
44+
### Framework
45+
* `PrincipalAxisNavigation` is now used as first spatial navigation strategy of choice
46+
* Improved stability of `StatefulVideo`, especially when destroying it
47+
* `EVENT_STATE_EXIT` now happens before asynchronous transitions. This makes `getState` return `null` in between states. `getPendingTransitions` should be used in this occasions.
48+
* `EventPublisher` refactored, added `runAfterCurrentEvent` method, improved test coverage
49+
50+
## 2.4.0-alpha.5 (release date 16.12.2019)
51+
### Framework
52+
* Ensure `getUrl` always returns url in LOADING state
53+
* Refactor Viewport to always accept application coordinates
54+
* `Device.createStatefulVideo` no longer requires Rect parameter
55+
* QHD resolution removed support, 4K and 8K added
56+
* `AbstractStatefulVideo` and `AbstracViewport` constructors both now accept panel and app resolutions
57+
* `Info.osdResolutionType` deprecated in favor of `getOSDResolution` and `getPanelResolution`
58+
* `Viewport.getFullScreen` deprecated in favor of `isFullScreen`
59+
60+
## 2.4.0-alpha.4 (release date 12.12.2019)
61+
### Framework
62+
* Added `PrepareOption` to support 4K and 8K video.
63+
* Added `Device.isUHD8KSupported`.
64+
* Fixed StatefulVideo positioning in letterbox mode.
65+
66+
## 2.4.0-alpha.3 (release date 05.12.2019)
67+
68+
### Framework
69+
* VerimatrixClient added, support VCAS.
70+
71+
## 2.4.0-alpha.2 (release date 02.12.2019)
72+
73+
### Framework
74+
* DRM support was added. See [drm.md](./docs/video/drm.md) for more details.
75+
* new `IStatefulVideo` methods: static `isDRMSupported`, static `canHandleMultiDRM`, `attachDRM`, `detachDRM`.
76+
* new interfaces and classes: `IDRMClient`, `AbstractDRMClient`, `PlayReadyClient`.
77+
* `PrepareOption.FORMAT` was renamed to `PrepareOption.TYPE` and now accepts mime-type. `MediaType` enum added with common mime types.
78+
79+
## 2.4.0-alpha.1 (release date 19.11.2019)
80+
81+
Unstable channel release.
82+
83+
### Framework
84+
* `IStatefulVideo`, `AbstractStatefulVideo` and `StatefulHtml5Video` classes and `Device.createStatefulVideo` were added. This a new video interface expected to eventually replace `IVideo`, in foreseeable future however they will coexist. It's much more strict and standardized. See [](./docs/video)
85+
* `zb/http` `decodeParams` now returns properly empty object if query string is empty as opposed to object with empty keys.
86+
387
## 2.3.0 (release date 02.10.2019)
488

589
### Tools

docs/video/Video States.jpg

74.2 KB
Loading

docs/video/Video States.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
<mxfile modified="2019-12-06T11:53:30.246Z" host="www.draw.io" agent="Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3983.0 Safari/537.36" etag="0Lyk78tJYSbXdK-Tgt5o" version="12.3.7" type="device" pages="1"><diagram id="eb7a8a20-44d6-642c-9700-ebd0be929ef0" name="Page-1">7VzRdps4EP0aP8YHSUiCRyd2s9mmbU6cbTdPPQRjm9YGFuPE7tevMMIgITsYMCE9zUMbBhBidO/MaGZID10tN9ehFcw/+RNn0YPaZNNDwx6EBiXs31iwTQQAEJRIZqE74bJMMHZ/OVyocenanTgr4cLI9xeRG4hC2/c8x44EmRW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0OEQFyLwqouDvUaR9QahLKwIpNExkilCnoA6zpCOhYw6Y00Ta3jeri+Yk15Yr9B+32G5SJEysB+2j/wXlztbU8fzrFOiVhQ1Vjvfn8dXB7Mzx/KfUMtTpd+r6g1VqdcpnSb3ZOafDI7+Ws0G6Onsdbzdupv8itHGf9qFyZ0yzbF9c4j9Xfs5f6gPHPnwuQVvbo3waoFKS0s9zlvldtKadbpRLRJ6b0XbuJ3/l37aWx1I18T5rf2edvGq7WHlVHLty4Hw2Gj9XjgU6kdOTcL8qa48+R1GGH2Z/qSZYm+3tIaPQ/</diagram></mxfile>

docs/video/drm.md

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
# DRM Playback
2+
ZombieBox `IStatefulVideo` supports supports DRM protected video playback. Support for DRM system varies from platform to platform, however.
3+
4+
To detect platform support `IStatefulVideo` exposes static methods `isDRMSupported(type)` and `canHandleMultiDRM()`. Some common DRM types are listed in zb/device/drm/drm.js as `Type`, but platforms may support additional proprietary types.
5+
6+
Some can have several DRM systems initialised at the same time and choose whichever is appropriate for the stream. `canHandleMultiDRM` detects that.
7+
8+
## DRM initialization
9+
DRM is enabled with `attachDRM` method that accepts `IDRMClient`. Several `IDRMClient`s for different DRM types can be attached on platforms that support multi DRM.
10+
11+
`attachDRM` can only be called in `IDLE` state. `detachDRM` can be called in the same state and no other.
12+
13+
ZombieBox provides `IDRMClient` implementations for most common DRM types and use cases:
14+
* `PlayReadyClient` supports reactive PlayReady DRM with optional license acquisition server.
15+
16+
Note that some platforms require explicit media type to enable DRM.
17+
18+
### PlayReady
19+
Simplest PlayReady example:
20+
21+
```javascript
22+
import PlayReadyClient from 'zb/device/drm/playready-client';
23+
import {PrepareOption, MediaType} from 'zb/device/interfaces/i-stateful-video';
24+
25+
// Microsoft test assets
26+
const laServer = 'https://test.playready.microsoft.com/service/rightsmanager.asmx?PlayRight=1&UseSimpleNonPersistentLicense=1';
27+
const url = 'https://demo.unified-streaming.com/video/tears-of-steel/tears-of-steel-dash-playready.ism/.mpd';
28+
29+
// Create Video instance through Device factory or otherwise
30+
video.attachDRM(new PlayReadyClient(laServer));
31+
video.prepare(url, {
32+
[PrepareOption.TYPE]: MediaType.DASH
33+
});
34+
video.once(video.EVENT_READY, () => video.play());
35+
```
36+
37+
## Custom `IDRMClient`
38+
To add custom initialization such as addition authentication you can provide your own `IDRMClient` or inherit from its descendand and use `init` and `prepare` methods. `init` is called when client is created and attached to Video instance, `prepare` is called when Video is initialized with a media file.
39+
40+
## Implementation notes
41+
Internally ZombieBox uses Hook classes to communicate with DRM. Video deals with device specific initialization in non-DRM specific way; Hook is device-specific, DRM-specific but not app/server-specific; Client is device non-specific, DRM-specific and app/server-specific.

0 commit comments

Comments
 (0)