@gcorevideo/player 2.20.12 → 2.20.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/core.js +26 -2
- package/dist/index.css +1197 -1197
- package/dist/index.js +33 -19
- package/dist/player.d.ts +8 -10
- package/dist/plugins/index.css +1619 -1619
- package/dist/plugins/index.js +8 -13
- package/docs/api/player.md +1 -1
- package/docs/api/player.mediacontrol.md +2 -11
- package/docs/api/player.playbackerror.md +2 -2
- package/docs/api/player.playbackerror.origin.md +1 -1
- package/docs/api/player.playbackerror.scope.md +1 -1
- package/docs/api/player.poster.md +1 -1
- package/docs/api/player.sourcecontroller.md +2 -33
- package/lib/Player.js +1 -1
- package/lib/playback/HTML5Video.d.ts +5 -0
- package/lib/playback/HTML5Video.d.ts.map +1 -1
- package/lib/playback/HTML5Video.js +21 -0
- package/lib/playback/hls-playback/HlsPlayback.d.ts +2 -2
- package/lib/playback/hls-playback/HlsPlayback.d.ts.map +1 -1
- package/lib/playback/hls-playback/HlsPlayback.js +4 -0
- package/lib/playback.types.d.ts +2 -2
- package/lib/plugins/click-to-pause/ClickToPause.d.ts.map +1 -1
- package/lib/plugins/click-to-pause/ClickToPause.js +0 -4
- package/lib/plugins/dvr-controls/DvrControls.d.ts.map +1 -1
- package/lib/plugins/dvr-controls/DvrControls.js +0 -1
- package/lib/plugins/media-control/MediaControl.d.ts +1 -8
- package/lib/plugins/media-control/MediaControl.d.ts.map +1 -1
- package/lib/plugins/media-control/MediaControl.js +2 -9
- package/lib/plugins/poster/Poster.d.ts +2 -0
- package/lib/plugins/poster/Poster.d.ts.map +1 -1
- package/lib/plugins/poster/Poster.js +3 -3
- package/lib/plugins/source-controller/SourceController.d.ts +3 -0
- package/lib/plugins/source-controller/SourceController.d.ts.map +1 -1
- package/lib/plugins/source-controller/SourceController.js +3 -0
- package/package.json +1 -1
- package/src/Player.ts +1 -1
- package/src/playback/HTML5Video.ts +29 -1
- package/src/playback/__tests__/HTML5Video.test.ts +47 -0
- package/src/playback/hls-playback/HlsPlayback.ts +5 -1
- package/src/playback.types.ts +2 -2
- package/src/plugins/click-to-pause/ClickToPause.ts +0 -5
- package/src/plugins/dvr-controls/DvrControls.ts +0 -1
- package/src/plugins/media-control/MediaControl.ts +2 -9
- package/src/plugins/poster/Poster.ts +4 -3
- package/src/plugins/source-controller/SourceController.ts +3 -0
- package/temp/player.api.json +6 -40
- package/tsconfig.tsbuildinfo +1 -1
- package/docs/api/player.sourcecontroller._constructor_.md +0 -50
|
@@ -70,11 +70,6 @@ export class ClickToPause extends ContainerPlugin {
|
|
|
70
70
|
const isLivePlayback = this.container.getPlaybackType() === Playback.LIVE
|
|
71
71
|
const pointerEnabled = !isLivePlayback || this.container.isDvrEnabled()
|
|
72
72
|
|
|
73
|
-
trace(`${T} settingsUpdate`, {
|
|
74
|
-
isLivePlayback,
|
|
75
|
-
pointerEnabled,
|
|
76
|
-
})
|
|
77
|
-
|
|
78
73
|
if (pointerEnabled === this.pointerEnabled) {
|
|
79
74
|
return
|
|
80
75
|
}
|
|
@@ -19,6 +19,7 @@ import { reportError, trace } from '@gcorevideo/utils'
|
|
|
19
19
|
|
|
20
20
|
import { type TimeProgress } from '../../playback.types.js'
|
|
21
21
|
|
|
22
|
+
// TODO replace Kibo with mousetrap
|
|
22
23
|
import { Kibo } from '../kibo/index.js'
|
|
23
24
|
|
|
24
25
|
import { CLAPPR_VERSION } from '../../build.js'
|
|
@@ -90,17 +91,10 @@ type DisabledClickable = {
|
|
|
90
91
|
}
|
|
91
92
|
|
|
92
93
|
/**
|
|
93
|
-
* `PLUGIN` that provides a foundation for developing custom
|
|
94
|
+
* `PLUGIN` that provides basic playback controls UI and a foundation for developing custom UI.
|
|
94
95
|
* @beta
|
|
95
96
|
* @remarks
|
|
96
97
|
* The methods exposed are to be used by the other plugins that extend the media control UI.
|
|
97
|
-
* The plugin registration should be arranged so that MediaControl is initialized before every other `PLUGIN` that depends on it.
|
|
98
|
-
* @example
|
|
99
|
-
* ```ts
|
|
100
|
-
* Player.registerPlugin(MediaControl) // <--- This must go first
|
|
101
|
-
* Player.registerPlugin(LevelSelector) // a media control plugin
|
|
102
|
-
* Player.registerPlugin(NerdStats) // another media control plugin
|
|
103
|
-
* ```
|
|
104
98
|
*/
|
|
105
99
|
export class MediaControl extends UICorePlugin {
|
|
106
100
|
private advertisementPlaying = false
|
|
@@ -1316,7 +1310,6 @@ export class MediaControl extends UICorePlugin {
|
|
|
1316
1310
|
}
|
|
1317
1311
|
|
|
1318
1312
|
private configure() {
|
|
1319
|
-
// this.advertisementPlaying ? this.disable() : this.enable()
|
|
1320
1313
|
this.trigger(Events.MEDIACONTROL_OPTIONS_CHANGE)
|
|
1321
1314
|
}
|
|
1322
1315
|
|
|
@@ -9,7 +9,6 @@ import {
|
|
|
9
9
|
UIContainerPlugin,
|
|
10
10
|
template,
|
|
11
11
|
$,
|
|
12
|
-
Container,
|
|
13
12
|
} from '@clappr/core'
|
|
14
13
|
import { trace } from '@gcorevideo/utils'
|
|
15
14
|
|
|
@@ -28,6 +27,8 @@ const T = 'plugins.poster'
|
|
|
28
27
|
* @beta
|
|
29
28
|
* @remarks
|
|
30
29
|
* When the playback is stopped, media control UI is disabled.
|
|
30
|
+
* Note that the poster image, if specified via the player config, will be used to update video element's poster attribute by the
|
|
31
|
+
* HTML5-video-based playback module.
|
|
31
32
|
*
|
|
32
33
|
* Configuration options:
|
|
33
34
|
*
|
|
@@ -51,6 +52,8 @@ const T = 'plugins.poster'
|
|
|
51
52
|
* ```
|
|
52
53
|
*/
|
|
53
54
|
export class Poster extends UIContainerPlugin {
|
|
55
|
+
// TODO merge non-poster related functionality into the ClickToPause plugin
|
|
56
|
+
|
|
54
57
|
private hasFatalError = false
|
|
55
58
|
|
|
56
59
|
private hasStartedPlaying = false
|
|
@@ -236,8 +239,6 @@ export class Poster extends UIContainerPlugin {
|
|
|
236
239
|
this.container.playback.consent()
|
|
237
240
|
this.container.playback.play()
|
|
238
241
|
}
|
|
239
|
-
} else {
|
|
240
|
-
this.container.trigger('container:start')
|
|
241
242
|
}
|
|
242
243
|
|
|
243
244
|
return false
|
package/temp/player.api.json
CHANGED
|
@@ -2594,7 +2594,7 @@
|
|
|
2594
2594
|
{
|
|
2595
2595
|
"kind": "Class",
|
|
2596
2596
|
"canonicalReference": "@gcorevideo/player!MediaControl:class",
|
|
2597
|
-
"docComment": "/**\n * `PLUGIN` that provides a foundation for developing custom
|
|
2597
|
+
"docComment": "/**\n * `PLUGIN` that provides basic playback controls UI and a foundation for developing custom UI.\n *\n * @remarks\n *\n * The methods exposed are to be used by the other plugins that extend the media control UI.\n *\n * @beta\n */\n",
|
|
2598
2598
|
"excerptTokens": [
|
|
2599
2599
|
{
|
|
2600
2600
|
"kind": "Content",
|
|
@@ -3737,7 +3737,7 @@
|
|
|
3737
3737
|
{
|
|
3738
3738
|
"kind": "PropertySignature",
|
|
3739
3739
|
"canonicalReference": "@gcorevideo/player!PlaybackError#origin:member",
|
|
3740
|
-
"docComment": "/**\n *
|
|
3740
|
+
"docComment": "/**\n * Name of the component that originated the error.\n *\n * @example\n *\n * - 'core' - 'dash' - 'media_control'\n */\n",
|
|
3741
3741
|
"excerptTokens": [
|
|
3742
3742
|
{
|
|
3743
3743
|
"kind": "Content",
|
|
@@ -3764,7 +3764,7 @@
|
|
|
3764
3764
|
{
|
|
3765
3765
|
"kind": "PropertySignature",
|
|
3766
3766
|
"canonicalReference": "@gcorevideo/player!PlaybackError#scope:member",
|
|
3767
|
-
"docComment": "/**\n * Component subsystem of the error origin
|
|
3767
|
+
"docComment": "/**\n * Component subsystem of the error origin, together with the `origin` uniquely identifies the originating component.\n */\n",
|
|
3768
3768
|
"excerptTokens": [
|
|
3769
3769
|
{
|
|
3770
3770
|
"kind": "Content",
|
|
@@ -5998,7 +5998,7 @@
|
|
|
5998
5998
|
{
|
|
5999
5999
|
"kind": "Class",
|
|
6000
6000
|
"canonicalReference": "@gcorevideo/player!Poster:class",
|
|
6001
|
-
"docComment": "/**\n * `PLUGIN` that displays a poster image in the background and a big play button on top when playback is stopped\n *\n * @remarks\n *\n * When the playback is stopped, media control UI is disabled.\n *\n * Configuration options:\n *\n * - `poster.custom` - custom CSS background\n *\n * - `poster.showForNoOp` - whether to show the poster when the playback is not started\n *\n * - `poster.url` - the URL of the poster image\n *\n * - `poster.showOnVideoEnd` - whether to show the poster when the playback is ended\n *\n * @example\n * ```ts\n * new Player({\n * ...\n * poster: {\n * showForNoOp: true,\n * url: 'https://via.placeholder.com/150.png',\n * }\n * })\n * ```\n *\n * @beta\n */\n",
|
|
6001
|
+
"docComment": "/**\n * `PLUGIN` that displays a poster image in the background and a big play button on top when playback is stopped\n *\n * @remarks\n *\n * When the playback is stopped, media control UI is disabled. Note that the poster image, if specified via the player config, will be used to update video element's poster attribute by the HTML5-video-based playback module.\n *\n * Configuration options:\n *\n * - `poster.custom` - custom CSS background\n *\n * - `poster.showForNoOp` - whether to show the poster when the playback is not started\n *\n * - `poster.url` - the URL of the poster image\n *\n * - `poster.showOnVideoEnd` - whether to show the poster when the playback is ended\n *\n * @example\n * ```ts\n * new Player({\n * ...\n * poster: {\n * showForNoOp: true,\n * url: 'https://via.placeholder.com/150.png',\n * }\n * })\n * ```\n *\n * @beta\n */\n",
|
|
6002
6002
|
"excerptTokens": [
|
|
6003
6003
|
{
|
|
6004
6004
|
"kind": "Content",
|
|
@@ -7659,7 +7659,7 @@
|
|
|
7659
7659
|
{
|
|
7660
7660
|
"kind": "Class",
|
|
7661
7661
|
"canonicalReference": "@gcorevideo/player!SourceController:class",
|
|
7662
|
-
"docComment": "/**\n * `PLUGIN` that is responsible for managing the automatic failover between sources.\n *\n * @remarks\n *\n * Have a look at the {@link https://miro.com/app/board/uXjVLiN15tY=/?share_link_id=390327585787 | source failover diagram} for the details on how sources ordering and selection works.\n *\n * This plugin does not expose any public methods apart from required by the Clappr plugin interface. It is supposed to work autonomously.\n *\n * @example\n * ```ts\n * import { SourceController } from '@gcorevideo/player'\n *\n * Player.registerPlugin(SourceController)\n * ```\n *\n * @beta\n */\n",
|
|
7662
|
+
"docComment": "/**\n * `PLUGIN` that is responsible for managing the automatic failover between sources.\n *\n * @remarks\n *\n * Have a look at the {@link https://miro.com/app/board/uXjVLiN15tY=/?share_link_id=390327585787 | source failover diagram} for the details on how sources ordering and selection works.\n *\n * This plugin does not expose any public methods apart from required by the Clappr plugin interface. It is supposed to work autonomously.\n *\n * The constructor for this class is marked as internal. Third-party code should not call the constructor directly or create subclasses that extend the `SourceController` class.\n *\n * @example\n * ```ts\n * import { SourceController } from '@gcorevideo/player'\n *\n * Player.registerPlugin(SourceController)\n * ```\n *\n * @beta\n */\n",
|
|
7663
7663
|
"excerptTokens": [
|
|
7664
7664
|
{
|
|
7665
7665
|
"kind": "Content",
|
|
@@ -7680,41 +7680,7 @@
|
|
|
7680
7680
|
"isAbstract": false,
|
|
7681
7681
|
"name": "SourceController",
|
|
7682
7682
|
"preserveMemberOrder": false,
|
|
7683
|
-
"members": [
|
|
7684
|
-
{
|
|
7685
|
-
"kind": "Constructor",
|
|
7686
|
-
"canonicalReference": "@gcorevideo/player!SourceController:constructor(1)",
|
|
7687
|
-
"docComment": "/**\n * Constructs a new instance of the `SourceController` class\n */\n",
|
|
7688
|
-
"excerptTokens": [
|
|
7689
|
-
{
|
|
7690
|
-
"kind": "Content",
|
|
7691
|
-
"text": "constructor(core: "
|
|
7692
|
-
},
|
|
7693
|
-
{
|
|
7694
|
-
"kind": "Reference",
|
|
7695
|
-
"text": "ClapprCore",
|
|
7696
|
-
"canonicalReference": "@clappr/core!default:class"
|
|
7697
|
-
},
|
|
7698
|
-
{
|
|
7699
|
-
"kind": "Content",
|
|
7700
|
-
"text": ");"
|
|
7701
|
-
}
|
|
7702
|
-
],
|
|
7703
|
-
"releaseTag": "Beta",
|
|
7704
|
-
"isProtected": false,
|
|
7705
|
-
"overloadIndex": 1,
|
|
7706
|
-
"parameters": [
|
|
7707
|
-
{
|
|
7708
|
-
"parameterName": "core",
|
|
7709
|
-
"parameterTypeTokenRange": {
|
|
7710
|
-
"startIndex": 1,
|
|
7711
|
-
"endIndex": 2
|
|
7712
|
-
},
|
|
7713
|
-
"isOptional": false
|
|
7714
|
-
}
|
|
7715
|
-
]
|
|
7716
|
-
}
|
|
7717
|
-
],
|
|
7683
|
+
"members": [],
|
|
7718
7684
|
"extendsTokenRange": {
|
|
7719
7685
|
"startIndex": 1,
|
|
7720
7686
|
"endIndex": 2
|