@gcorevideo/player 2.20.3 → 2.20.4
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 +30 -6
- package/dist/index.css +859 -859
- package/dist/index.js +39 -10
- package/dist/player.d.ts +10 -0
- package/dist/plugins/index.css +954 -954
- package/dist/plugins/index.js +10 -5
- package/docs/api/player.contextmenupluginsettings.label.md +3 -0
- package/docs/api/player.contextmenupluginsettings.md +8 -3
- package/docs/api/player.contextmenupluginsettings.preventshowcontextmenu.md +3 -0
- package/docs/api/player.contextmenupluginsettings.url.md +3 -0
- package/docs/api/player.md +6 -2
- package/docs/api/player.multicamera._constructor_.md +3 -0
- package/docs/api/player.multicamera.activebyid.md +3 -0
- package/docs/api/player.multicamera.attributes.md +3 -0
- package/docs/api/player.multicamera.bindevents.md +3 -0
- package/docs/api/player.multicamera.events.md +3 -0
- package/docs/api/player.multicamera.getcameraslist.md +3 -0
- package/docs/api/player.multicamera.getcurrentcamera.md +3 -0
- package/docs/api/player.multicamera.md +28 -1
- package/docs/api/player.multicamera.name.md +3 -0
- package/docs/api/player.multicamera.render.md +3 -0
- package/docs/api/player.multicamera.supportedversion.md +3 -0
- package/docs/api/player.multicamera.template.md +3 -0
- package/docs/api/player.multicamera.unbindevents.md +3 -0
- package/docs/api/player.multicamera.version.md +3 -0
- package/docs/api/player.volumefadeevents.md +7 -0
- package/docs/api/player.zeptoresult.md +1 -0
- package/lib/Player.d.ts +5 -3
- package/lib/Player.d.ts.map +1 -1
- package/lib/Player.js +30 -6
- package/lib/internal.types.d.ts +7 -7
- package/lib/internal.types.d.ts.map +1 -1
- package/lib/plugins/context-menu/ContextMenu.d.ts +4 -0
- package/lib/plugins/context-menu/ContextMenu.d.ts.map +1 -1
- package/lib/plugins/multi-camera/MultiCamera.d.ts +1 -0
- package/lib/plugins/multi-camera/MultiCamera.d.ts.map +1 -1
- package/lib/plugins/multi-camera/MultiCamera.js +3 -2
- package/lib/plugins/seek-time/SeekTime.js +1 -1
- package/lib/plugins/share/Share.js +1 -1
- package/lib/plugins/volume-fade/VolumeFade.d.ts +4 -0
- package/lib/plugins/volume-fade/VolumeFade.d.ts.map +1 -1
- package/lib/plugins/volume-fade/VolumeFade.js +4 -0
- package/lib/types.d.ts +9 -1
- package/lib/types.d.ts.map +1 -1
- package/lib/utils/types.d.ts +1 -0
- package/lib/utils/types.d.ts.map +1 -1
- package/package.json +1 -1
- package/release_notes +297 -0
- package/src/Player.ts +101 -46
- package/src/__tests__/Player.test.ts +23 -1
- package/src/internal.types.ts +86 -79
- package/src/plugins/context-menu/ContextMenu.ts +4 -0
- package/src/plugins/multi-camera/MultiCamera.ts +3 -2
- package/src/plugins/seek-time/SeekTime.ts +1 -1
- package/src/plugins/share/Share.ts +1 -1
- package/src/plugins/volume-fade/VolumeFade.ts +4 -0
- package/src/types.ts +11 -1
- package/src/utils/types.ts +1 -0
- package/temp/player.api.json +24 -24
- package/tsconfig.tsbuildinfo +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MultiCamera.d.ts","sourceRoot":"","sources":["../../../src/plugins/multi-camera/MultiCamera.ts"],"names":[],"mappings":"AAAA,OAAO,EAAW,IAAI,EAA8B,YAAY,EAAE,MAAM,cAAc,CAAC;AAMvF,OAAO,yCAAyC,CAAC;AASjD,KAAK,eAAe,GAAG;IACrB,IAAI,EAAE,OAAO,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,EAAE,EAAE,MAAM,CAAC;IACX,GAAG,EAAE,OAAO,CAAC;IACb,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;CAC3B,CAAA;AAMD
|
|
1
|
+
{"version":3,"file":"MultiCamera.d.ts","sourceRoot":"","sources":["../../../src/plugins/multi-camera/MultiCamera.ts"],"names":[],"mappings":"AAAA,OAAO,EAAW,IAAI,EAA8B,YAAY,EAAE,MAAM,cAAc,CAAC;AAMvF,OAAO,yCAAyC,CAAC;AASjD,KAAK,eAA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9 +7,10 @@ import streamsIcon from '../../../assets/icons/old/streams.svg';
|
|
|
7
7
|
import streamsMomentoIcon from '../../../assets/icons/old/language.svg';
|
|
8
8
|
import streamsWhiteNightsIcon from '../../../assets/icons/old/wn.svg';
|
|
9
9
|
const VERSION = '0.0.1';
|
|
10
|
-
const T = 'plugins.
|
|
10
|
+
const T = 'plugins.multicamera';
|
|
11
11
|
/**
|
|
12
12
|
* The plugin adds support for loading multiple streams and switching between them using the media control UI.
|
|
13
|
+
* @beta
|
|
13
14
|
*/
|
|
14
15
|
export class MultiCamera extends UICorePlugin {
|
|
15
16
|
currentCamera = null;
|
|
@@ -18,7 +19,7 @@ export class MultiCamera extends UICorePlugin {
|
|
|
18
19
|
multicamera = [];
|
|
19
20
|
noActiveStreams = false;
|
|
20
21
|
get name() {
|
|
21
|
-
return '
|
|
22
|
+
return 'multicamera';
|
|
22
23
|
}
|
|
23
24
|
get supportedVersion() {
|
|
24
25
|
return { min: CLAPPR_VERSION };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"VolumeFade.d.ts","sourceRoot":"","sources":["../../../src/plugins/volume-fade/VolumeFade.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAiC,MAAM,cAAc,CAAC;AAK3E,oBAAY,gBAAgB;IAC1B,IAAI,qBAAqB;CAC1B;AAED;;;GAGG;AACH,qBAAa,UAAW,SAAQ,YAAY;IAC1C,OAAO,CAAC,kBAAkB,CAAK;IAE/B,OAAO,CAAC,SAAS,CAA0B;IAE3C,OAAO,CAAC,KAAK,CAAK;IAElB,OAAO,CAAC,QAAQ,CAAwB;IAExC;;OAEG;IACH,IAAI,IAAI,WAEP;IAED;;OAEG;IACM,UAAU;IASnB,OAAO,CAAC,YAAY;IAKpB,OAAO,CAAC,mBAAmB;IAI3B,OAAO,CAAC,eAAe;IAKvB,OAAO,CAAC,WAAW;IAwBnB,OAAO,CAAC,OAAO;IAIf,OAAO,CAAC,QAAQ;IA0BhB,OAAO,CAAC,oBAAoB;IAO5B,OAAO,CAAC,OAAO;CAGhB"}
|
|
1
|
+
{"version":3,"file":"VolumeFade.d.ts","sourceRoot":"","sources":["../../../src/plugins/volume-fade/VolumeFade.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAiC,MAAM,cAAc,CAAC;AAK3E;;;GAGG;AACH,oBAAY,gBAAgB;IAC1B,IAAI,qBAAqB;CAC1B;AAED;;;GAGG;AACH,qBAAa,UAAW,SAAQ,YAAY;IAC1C,OAAO,CAAC,kBAAkB,CAAK;IAE/B,OAAO,CAAC,SAAS,CAA0B;IAE3C,OAAO,CAAC,KAAK,CAAK;IAElB,OAAO,CAAC,QAAQ,CAAwB;IAExC;;OAEG;IACH,IAAI,IAAI,WAEP;IAED;;OAEG;IACM,UAAU;IASnB,OAAO,CAAC,YAAY;IAKpB,OAAO,CAAC,mBAAmB;IAI3B,OAAO,CAAC,eAAe;IAKvB,OAAO,CAAC,WAAW;IAwBnB,OAAO,CAAC,OAAO;IAIf,OAAO,CAAC,QAAQ;IA0BhB,OAAO,CAAC,oBAAoB;IAO5B,OAAO,CAAC,OAAO;CAGhB"}
|
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
import { UICorePlugin, Events, Browser, $ } from '@clappr/core';
|
|
2
2
|
import { reportError } from '@gcorevideo/utils';
|
|
3
|
+
/**
|
|
4
|
+
* Events emitted by the VolumeFade plugin.
|
|
5
|
+
* @beta
|
|
6
|
+
*/
|
|
3
7
|
export var VolumeFadeEvents;
|
|
4
8
|
(function (VolumeFadeEvents) {
|
|
5
9
|
VolumeFadeEvents["FADE"] = "core:volume:fade";
|
package/lib/types.d.ts
CHANGED
|
@@ -49,12 +49,20 @@ export type MediaTransport = 'dash' | 'hls';
|
|
|
49
49
|
export type TransportPreference = MediaTransport;
|
|
50
50
|
/**
|
|
51
51
|
* @beta
|
|
52
|
-
* @see {@link https://clappr.github.io/classes/UIContainerPlugin.html},
|
|
52
|
+
* @see {@link https://clappr.github.io/classes/UIContainerPlugin.html},
|
|
53
|
+
* {@link https://clappr.github.io/classes/ContainerPlugin.html}
|
|
53
54
|
*/
|
|
54
55
|
export type PlayerPlugin = {
|
|
55
56
|
new (...args: any[]): unknown;
|
|
56
57
|
name: string;
|
|
57
58
|
};
|
|
59
|
+
export type PlayerPluginConstructor = CorePluginConstructor | ContainerPluginConstructor;
|
|
60
|
+
export type CorePluginConstructor = ((core: unknown) => PlayerPlugin) & {
|
|
61
|
+
type: 'core';
|
|
62
|
+
};
|
|
63
|
+
export type ContainerPluginConstructor = ((container: unknown) => PlayerPlugin) & {
|
|
64
|
+
type: 'container';
|
|
65
|
+
};
|
|
58
66
|
/**
|
|
59
67
|
* Configuration options for the player
|
|
60
68
|
*
|
package/lib/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,MAAM,WAAW,qBAAqB;IACpC;;;OAGG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAA;IAEjB;;OAEG;IACH,MAAM,EAAE,MAAM,CAAA;CACf;AAED;;;GAGG;AACH,MAAM,MAAM,iBAAiB,GAAG,MAAM,GAAG,qBAAqB,CAAA;AAE9D;;;GAGG;AACH,MAAM,MAAM,cAAc,GAAG,KAAK,GAAG,QAAQ,GAAG,MAAM,GAAG,KAAK,GAAG,MAAM,CAAA;AAEvE;;;GAGG;AACH,MAAM,MAAM,mBAAmB,GAAG,cAAc,GAAG,OAAO,CAAA;AAE1D;;;GAGG;AACH,MAAM,MAAM,YAAY,GAAG,MAAM,GAAG,KAAK,CAAA;AAEzC;;;GAGG;AACH,MAAM,MAAM,cAAc,GAAG,MAAM,GAAG,KAAK,CAAA;AAE3C;;;GAGG;AACH,MAAM,MAAM,mBAAmB,GAAG,cAAc,CAAA;AAEhD
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"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G;IACH,IAAI,SAAS;IACb;;;OAGG;IACH,UAAU,eAAe;IACzB;;;OAGG;IACH,YAAY,iBAAiB;CAC9B"}
|
package/lib/utils/types.d.ts
CHANGED
package/lib/utils/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/utils/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,cAAc,CAAC;AAEjC
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/utils/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,cAAc,CAAC;AAEjC;;;GAGG;AACH,MAAM,MAAM,WAAW,GAAG,UAAU,CAAC,OAAO,CAAC,CAAC,CAAC;AAE/C;;GAEG;AACH,MAAM,MAAM,OAAO,GAAG,UAAU,CAAC,OAAO,UAAU,CAAC,CAAC"}
|
package/package.json
CHANGED
package/release_notes
ADDED
|
@@ -0,0 +1,297 @@
|
|
|
1
|
+
commit e0fdb8709baf62055124303f46ed3a18d47dca27
|
|
2
|
+
Author: Dmitrii Tkach <dmitrii.tkach@gcore.com>
|
|
3
|
+
Date: Fri Feb 21 18:56:59 2025 +0400
|
|
4
|
+
|
|
5
|
+
Add documentation on the Favicon, GoogleAnalytics plugins
|
|
6
|
+
|
|
7
|
+
commit 11e82a088643cf9b4ef9e244b472887325c87605
|
|
8
|
+
Author: Dmitrii Tkach <dmitrii.tkach@gcore.com>
|
|
9
|
+
Date: Fri Feb 21 18:52:09 2025 +0400
|
|
10
|
+
|
|
11
|
+
Add AudioSelector docs
|
|
12
|
+
|
|
13
|
+
commit 4cf62967bbea6906b00961f1d2631aff4a7a255b
|
|
14
|
+
Author: Dmitrii Tkach <dmitrii.tkach@gcore.com>
|
|
15
|
+
Date: Fri Feb 21 18:10:07 2025 +0400
|
|
16
|
+
|
|
17
|
+
Add DvrControls plugin docs
|
|
18
|
+
|
|
19
|
+
commit b0df7f005024912cba46cc9f478a7355efeefb5a
|
|
20
|
+
Author: Dmitrii Tkach <dmitrii.tkach@gcore.com>
|
|
21
|
+
Date: Fri Feb 21 17:31:43 2025 +0400
|
|
22
|
+
|
|
23
|
+
Add documentation on ContextMenu plugin
|
|
24
|
+
|
|
25
|
+
commit 24c3ce396a8d69e60433a126b5a7c5efdee94957
|
|
26
|
+
Author: Dmitrii Tkach <dmitrii.tkach@gcore.com>
|
|
27
|
+
Date: Fri Feb 21 17:17:46 2025 +0400
|
|
28
|
+
|
|
29
|
+
Add documentation on the ClickToPause and Clips plugins
|
|
30
|
+
|
|
31
|
+
commit 141e43d009c95fab701007b0c6886e02d8edcaac
|
|
32
|
+
Author: Dmitrii Tkach <dmitrii.tkach@gcore.com>
|
|
33
|
+
Date: Fri Feb 21 17:03:58 2025 +0400
|
|
34
|
+
|
|
35
|
+
Add ClapprStats plugin documentation
|
|
36
|
+
|
|
37
|
+
commit 9e777c289b81cc2fe2393496a0b1d6dcf4da375e
|
|
38
|
+
Author: Dmitrii Tkach <dmitrii.tkach@gcore.com>
|
|
39
|
+
Date: Fri Feb 21 16:57:21 2025 +0400
|
|
40
|
+
|
|
41
|
+
Add documentation on the Thumbnails and BigMuteButton plugins
|
|
42
|
+
|
|
43
|
+
commit 4e3e080fa9dfdc2778ad1a2578d4ddfa4a36063f
|
|
44
|
+
Author: Dmitrii Tkach <dmitrii.tkach@gcore.com>
|
|
45
|
+
Date: Fri Feb 21 16:41:30 2025 +0400
|
|
46
|
+
|
|
47
|
+
Refactor Telemetry plugin
|
|
48
|
+
|
|
49
|
+
commit ab7d3a300526047256ecedb3e79a70f368dd6b4e
|
|
50
|
+
Author: Dmitrii Tkach <dmitrii.tkach@gcore.com>
|
|
51
|
+
Date: Thu Feb 20 20:04:00 2025 +0400
|
|
52
|
+
|
|
53
|
+
Add documentation on PictuerInPicture plugin
|
|
54
|
+
|
|
55
|
+
commit ee9cfdd684c762b8fb01dc38eab4783f2cd20301
|
|
56
|
+
Author: Dmitrii Tkach <dmitrii.tkach@gcore.com>
|
|
57
|
+
Date: Thu Feb 20 19:54:25 2025 +0400
|
|
58
|
+
|
|
59
|
+
Add docs on PlaybackRate plugin
|
|
60
|
+
|
|
61
|
+
commit f80f4612b5e06a61b88ce79f8fc7fff22bd6a8f8
|
|
62
|
+
Author: Dmitrii Tkach <dmitrii.tkach@gcore.com>
|
|
63
|
+
Date: Thu Feb 20 19:33:54 2025 +0400
|
|
64
|
+
|
|
65
|
+
Refactor Subtitles plugin
|
|
66
|
+
|
|
67
|
+
commit 389ea9ff869852270c2f946e36c2f88a99007e0f
|
|
68
|
+
Author: Dmitrii Tkach <dmitrii.tkach@gcore.com>
|
|
69
|
+
Date: Thu Feb 20 16:10:26 2025 +0400
|
|
70
|
+
|
|
71
|
+
Media control plugins refactoring
|
|
72
|
+
|
|
73
|
+
commit 2eb75ea01af24723ddeb16596b4c031cac6802fd
|
|
74
|
+
Author: Dmitrii Tkach <dmitrii.tkach@gcore.com>
|
|
75
|
+
Date: Wed Feb 19 19:22:23 2025 +0400
|
|
76
|
+
|
|
77
|
+
Refactor MediaControl. Add documentation on plugins
|
|
78
|
+
|
|
79
|
+
commit 8b2e7b99a6f546491597f5dd8fcf095b85d736e6
|
|
80
|
+
Author: Dmitrii Tkach <dmitrii.tkach@gcore.com>
|
|
81
|
+
Date: Wed Feb 19 12:38:34 2025 +0400
|
|
82
|
+
|
|
83
|
+
Rename CI directory
|
|
84
|
+
|
|
85
|
+
commit 51d26f1bb79e9d6f18d85a95884d5703b1db28e8
|
|
86
|
+
Author: Dmitrii Tkach <dmitrii.tkach@gcore.com>
|
|
87
|
+
Date: Wed Feb 19 12:33:42 2025 +0400
|
|
88
|
+
|
|
89
|
+
Fix premature autoplay
|
|
90
|
+
|
|
91
|
+
commit 500baf2d59ed9c7a93574c2607629f9fcd30c2ea
|
|
92
|
+
Author: Dmitrii Tkach <dmitrii.tkach@gcore.com>
|
|
93
|
+
Date: Tue Feb 18 15:31:06 2025 +0400
|
|
94
|
+
|
|
95
|
+
Update documentation on media control plugin
|
|
96
|
+
|
|
97
|
+
commit 584c36655f6b5943992ae22cf9e8e3f0784a3ce2
|
|
98
|
+
Author: Dmitrii Tkach <dmitrii.tkach@gcore.com>
|
|
99
|
+
Date: Tue Feb 18 14:04:43 2025 +0400
|
|
100
|
+
|
|
101
|
+
2.0.0
|
|
102
|
+
|
|
103
|
+
commit 2339ad64729136df35f55b4e316ae2ac8d8721e1
|
|
104
|
+
Author: Dmitrii Tkach <dmitrii.tkach@gcore.com>
|
|
105
|
+
Date: Tue Feb 18 14:04:35 2025 +0400
|
|
106
|
+
|
|
107
|
+
Install husky
|
|
108
|
+
|
|
109
|
+
commit 620088cafb283b71d8b2abc63b80fbfb243da99c
|
|
110
|
+
Author: Dmitrii Tkach <dmitrii.tkach@gcore.com>
|
|
111
|
+
Date: Tue Feb 18 14:04:00 2025 +0400
|
|
112
|
+
|
|
113
|
+
Fix vertical formats treatment in level selector
|
|
114
|
+
|
|
115
|
+
commit 5411aeac00da59a2d4fe44fd661af55571398b77
|
|
116
|
+
Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
|
|
117
|
+
Date: Mon Feb 17 15:34:59 2025 +0000
|
|
118
|
+
|
|
119
|
+
Bump oxlint from 0.13.2 to 0.15.11
|
|
120
|
+
|
|
121
|
+
Bumps [oxlint](https://github.com/oxc-project/oxc/tree/HEAD/npm/oxlint) from 0.13.2 to 0.15.11.
|
|
122
|
+
- [Release notes](https://github.com/oxc-project/oxc/releases)
|
|
123
|
+
- [Changelog](https://github.com/oxc-project/oxc/blob/main/npm/oxlint/CHANGELOG.md)
|
|
124
|
+
- [Commits](https://github.com/oxc-project/oxc/commits/oxlint_v0.15.11/npm/oxlint)
|
|
125
|
+
|
|
126
|
+
---
|
|
127
|
+
updated-dependencies:
|
|
128
|
+
- dependency-name: oxlint
|
|
129
|
+
dependency-type: direct:development
|
|
130
|
+
update-type: version-update:semver-minor
|
|
131
|
+
...
|
|
132
|
+
|
|
133
|
+
Signed-off-by: dependabot[bot] <support@github.com>
|
|
134
|
+
|
|
135
|
+
commit bb92071ee144d26ec75d5e0c2fb6cd858fb5b03a
|
|
136
|
+
Author: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
|
|
137
|
+
Date: Tue Feb 18 11:50:09 2025 +0400
|
|
138
|
+
|
|
139
|
+
Update documentation (#14)
|
|
140
|
+
|
|
141
|
+
Co-authored-by: dmitritz <dmitritz@users.noreply.github.com>
|
|
142
|
+
|
|
143
|
+
commit fb93868502059f3e39e5d242e4e4f2703a5ada86
|
|
144
|
+
Author: Dmitrii Tkach <dmitrii.tkach@gcore.com>
|
|
145
|
+
Date: Tue Feb 18 11:44:07 2025 +0400
|
|
146
|
+
|
|
147
|
+
Fix docs update workflow
|
|
148
|
+
|
|
149
|
+
commit 59fea91631903d4e6cc47ee9d6b89d7778f9cf3a
|
|
150
|
+
Author: Dmitrii Tkach <dmitrii.tkach@gcore.com>
|
|
151
|
+
Date: Tue Feb 18 11:13:53 2025 +0400
|
|
152
|
+
|
|
153
|
+
Set the commiter username and email in docs update workflow
|
|
154
|
+
|
|
155
|
+
commit 1e08c59d3a3cddf2f4e71cc02167fc872ca771fa
|
|
156
|
+
Author: Dmitrii Tkach <dmitrii.tkach@gcore.com>
|
|
157
|
+
Date: Tue Feb 18 10:52:15 2025 +0400
|
|
158
|
+
|
|
159
|
+
Add documentation update workflow
|
|
160
|
+
|
|
161
|
+
commit 28317d9233fa1fa3524dba636161cf8adceff736
|
|
162
|
+
Author: Dmitrii Tkach <dmitrii.tkach@gcore.com>
|
|
163
|
+
Date: Mon Feb 17 19:33:43 2025 +0400
|
|
164
|
+
|
|
165
|
+
Update documentation
|
|
166
|
+
|
|
167
|
+
commit edfeaecc20293c59cf2d73505d6313cf90f94277
|
|
168
|
+
Author: Dmitrii Tkach <dmitrii.tkach@gcore.com>
|
|
169
|
+
Date: Mon Feb 17 17:22:03 2025 +0400
|
|
170
|
+
|
|
171
|
+
Fix wrong plugins build output
|
|
172
|
+
|
|
173
|
+
commit 5a26abe259aee23c47cfc6174c23cb2e9e6b9ced
|
|
174
|
+
Author: Dmitrii Tkach <dmitrii.tkach@gcore.com>
|
|
175
|
+
Date: Mon Feb 17 17:18:19 2025 +0400
|
|
176
|
+
|
|
177
|
+
Fix wrong dist data upload
|
|
178
|
+
|
|
179
|
+
commit eff63fc92e3ab24cc781a3919f21567e172ea2db
|
|
180
|
+
Author: Dmitrii Tkach <dmitrii.tkach@gcore.com>
|
|
181
|
+
Date: Mon Feb 17 16:51:21 2025 +0400
|
|
182
|
+
|
|
183
|
+
Fix uploaded package version
|
|
184
|
+
|
|
185
|
+
commit 57542e2d111b633f270e90030c915038c98fd581
|
|
186
|
+
Author: Dmitrii Tkach <dmitrii.tkach@gcore.com>
|
|
187
|
+
Date: Mon Feb 17 16:43:56 2025 +0400
|
|
188
|
+
|
|
189
|
+
Fix version ref in publishing workflow
|
|
190
|
+
|
|
191
|
+
commit 7a00e2e88eeff3ebc9a57531f18c1a60006cb38a
|
|
192
|
+
Author: Dmitrii Tkach <dmitrii.tkach@gcore.com>
|
|
193
|
+
Date: Mon Feb 17 16:35:46 2025 +0400
|
|
194
|
+
|
|
195
|
+
Fix publishing workflow
|
|
196
|
+
|
|
197
|
+
commit cbab766280d71472583f1dabab857d3516293488
|
|
198
|
+
Author: Dmitrii Tkach <dmitrii.tkach@gcore.com>
|
|
199
|
+
Date: Mon Feb 17 16:31:57 2025 +0400
|
|
200
|
+
|
|
201
|
+
Fix no event listeners after container change in LevelSelector
|
|
202
|
+
|
|
203
|
+
commit d19638c072222eb113fab9486e2a702adb012c22
|
|
204
|
+
Author: Dmitrii Tkach <dmitrii.tkach@gcore.com>
|
|
205
|
+
Date: Mon Feb 17 14:36:17 2025 +0400
|
|
206
|
+
|
|
207
|
+
Merge player and plugins into single package
|
|
208
|
+
|
|
209
|
+
commit 39cbb56f3d55959d5c7470a21dd2a96a2e53386d
|
|
210
|
+
Author: Dmitrii Tkach <dmitrii.tkach@gcore.com>
|
|
211
|
+
Date: Mon Feb 17 13:49:34 2025 +0400
|
|
212
|
+
|
|
213
|
+
Fix initial bitrate detection dash
|
|
214
|
+
|
|
215
|
+
commit 7e6e8160c139e74e81d453d63a0fb569c33b0447
|
|
216
|
+
Author: Dmitrii Tkach <dmitrii.tkach@gcore.com>
|
|
217
|
+
Date: Fri Feb 14 18:47:10 2025 +0400
|
|
218
|
+
|
|
219
|
+
Add isMuted method in Player API
|
|
220
|
+
|
|
221
|
+
commit 12fb16cf335b9b69c6deaf6b26f54bbd72a794b9
|
|
222
|
+
Author: Dmitrii Tkach <dmitrii.tkach@gcore.com>
|
|
223
|
+
Date: Fri Feb 14 17:59:10 2025 +0400
|
|
224
|
+
|
|
225
|
+
Add isDvrInUse in Player API
|
|
226
|
+
|
|
227
|
+
commit 3fb532b2eff0b57ccf21912c125897a314977f27
|
|
228
|
+
Author: Dmitrii Tkach <dmitrii.tkach@gcore.com>
|
|
229
|
+
Date: Fri Feb 14 15:00:43 2025 +0400
|
|
230
|
+
|
|
231
|
+
Fix empty labels in level selector due to missed config option
|
|
232
|
+
|
|
233
|
+
commit cbca60708e5349d126a4942ba3bfd7659a668705
|
|
234
|
+
Author: Dmitrii Tkach <dmitrii.tkach@gcore.com>
|
|
235
|
+
Date: Fri Feb 14 13:51:34 2025 +0400
|
|
236
|
+
|
|
237
|
+
Ability to restrict resolution in LevelSelector
|
|
238
|
+
|
|
239
|
+
commit e157dfa386b39ffb2f1c3b3d6eb5776531124a2f
|
|
240
|
+
Author: Dmitrii Tkach <dmitrii.tkach@gcore.com>
|
|
241
|
+
Date: Thu Feb 13 21:35:21 2025 +0400
|
|
242
|
+
|
|
243
|
+
Update docs
|
|
244
|
+
|
|
245
|
+
commit 7c381d03037caa77d4f4e7c42ecd4db98dfa1c1a
|
|
246
|
+
Author: Dmitrii Tkach <dmitrii.tkach@gcore.com>
|
|
247
|
+
Date: Thu Feb 13 21:30:45 2025 +0400
|
|
248
|
+
|
|
249
|
+
Update docs
|
|
250
|
+
|
|
251
|
+
commit 17e0d1a6a2337833f6d3da7fc8d6abfc2d3bfb81
|
|
252
|
+
Author: Dmitrii Tkach <dmitrii.tkach@gcore.com>
|
|
253
|
+
Date: Thu Feb 13 19:20:14 2025 +0400
|
|
254
|
+
|
|
255
|
+
Add public API methods. Update documentation
|
|
256
|
+
|
|
257
|
+
commit 549e87ff0ddfea8c1d087a38e1dc73e21141d4bc
|
|
258
|
+
Author: Dmitrii Tkach <dmitrii.tkach@gcore.com>
|
|
259
|
+
Date: Thu Feb 13 16:30:37 2025 +0400
|
|
260
|
+
|
|
261
|
+
Update documentation
|
|
262
|
+
|
|
263
|
+
commit d3a532e2c702273637baf6c22216c91900036297
|
|
264
|
+
Author: Dmitrii Tkach <dmitrii.tkach@gcore.com>
|
|
265
|
+
Date: Wed Feb 12 20:46:11 2025 +0400
|
|
266
|
+
|
|
267
|
+
Update docs
|
|
268
|
+
|
|
269
|
+
commit acab9ab142460d6872568f97e2976032fe09a54f
|
|
270
|
+
Author: Dmitrii Tkach <dmitrii.tkach@gcore.com>
|
|
271
|
+
Date: Wed Feb 12 20:44:53 2025 +0400
|
|
272
|
+
|
|
273
|
+
Add docs
|
|
274
|
+
|
|
275
|
+
commit 159c3c8dd9da1105b01c892a1af1b47d8fb1a093
|
|
276
|
+
Author: Dmitrii Tkach <dmitrii.tkach@gcore.com>
|
|
277
|
+
Date: Wed Feb 12 18:49:49 2025 +0400
|
|
278
|
+
|
|
279
|
+
Rename packages directories, refactor tracing code
|
|
280
|
+
|
|
281
|
+
commit 66762d433c72382fe691d46a416d8715799fdbf4
|
|
282
|
+
Author: Dmitrii Tkach <dmitrii.tkach@gcore.com>
|
|
283
|
+
Date: Wed Feb 12 18:45:50 2025 +0400
|
|
284
|
+
|
|
285
|
+
Rename plugins directory
|
|
286
|
+
|
|
287
|
+
commit 69b8528562d25c14cb5e7a0419cce50248dbcba0
|
|
288
|
+
Author: Dmitrii Tkach <dmitrii.tkach@gcore.com>
|
|
289
|
+
Date: Mon Feb 10 14:25:58 2025 +0400
|
|
290
|
+
|
|
291
|
+
Fix MIME type guess
|
|
292
|
+
|
|
293
|
+
commit b94f32aa3c0bf16c9a27e3ccc26e5b411d23c1bb
|
|
294
|
+
Author: Dmitrii Tkach <dmitrii.tkach@gcore.com>
|
|
295
|
+
Date: Mon Feb 10 14:07:13 2025 +0400
|
|
296
|
+
|
|
297
|
+
Add dash.js & hls.js error codes handling. Rewrite sources selection
|
package/src/Player.ts
CHANGED
|
@@ -15,12 +15,13 @@ import type {
|
|
|
15
15
|
CoreOptions,
|
|
16
16
|
CorePluginOptions,
|
|
17
17
|
} from './internal.types.js'
|
|
18
|
-
import type {
|
|
18
|
+
import type {
|
|
19
|
+
ContainerSize,
|
|
20
|
+
PlayerMediaSourceDesc,
|
|
21
|
+
PlayerPluginConstructor,
|
|
22
|
+
} from './types.js'
|
|
19
23
|
import { PlayerConfig, PlayerEvent } from './types.js'
|
|
20
|
-
import {
|
|
21
|
-
buildMediaSourcesList,
|
|
22
|
-
wrapSource,
|
|
23
|
-
} from './utils/mediaSources.js'
|
|
24
|
+
import { buildMediaSourcesList, wrapSource } from './utils/mediaSources.js'
|
|
24
25
|
import { registerPlaybacks } from './playback/index.js'
|
|
25
26
|
import { PlaybackError, TimePosition } from './playback.types.js'
|
|
26
27
|
|
|
@@ -28,20 +29,28 @@ import { PlaybackError, TimePosition } from './playback.types.js'
|
|
|
28
29
|
* @beta
|
|
29
30
|
*/
|
|
30
31
|
export type PlayerEventParams<E extends PlayerEvent> =
|
|
31
|
-
E extends PlayerEvent.Seek
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
32
|
+
E extends PlayerEvent.Seek
|
|
33
|
+
? [number]
|
|
34
|
+
: E extends PlayerEvent.VolumeUpdate
|
|
35
|
+
? [number]
|
|
36
|
+
: E extends PlayerEvent.TimeUpdate
|
|
37
|
+
? [TimePosition]
|
|
38
|
+
: E extends PlayerEvent.Resize
|
|
39
|
+
? [{ width: number; height: number }]
|
|
40
|
+
: E extends PlayerEvent.Fullscreen
|
|
41
|
+
? [boolean]
|
|
42
|
+
: E extends PlayerEvent.Error
|
|
43
|
+
? [PlaybackError]
|
|
44
|
+
: []
|
|
38
45
|
|
|
39
46
|
/**
|
|
40
47
|
* Type of a listener callback function for a player event.
|
|
41
48
|
* See the description of the event parameters in {@link PlayerEvent}.
|
|
42
49
|
* @beta
|
|
43
50
|
*/
|
|
44
|
-
export type PlayerEventHandler<E extends PlayerEvent> = (
|
|
51
|
+
export type PlayerEventHandler<E extends PlayerEvent> = (
|
|
52
|
+
...args: PlayerEventParams<E>
|
|
53
|
+
) => void
|
|
45
54
|
|
|
46
55
|
const T = 'GPlayer'
|
|
47
56
|
|
|
@@ -157,7 +166,7 @@ export class Player {
|
|
|
157
166
|
}
|
|
158
167
|
|
|
159
168
|
const coreOpts = this.buildCoreOptions(playerElement)
|
|
160
|
-
const { core, container } =
|
|
169
|
+
const { core, container } = Player.getRegisteredPlugins()
|
|
161
170
|
trace(`${T} init`, {
|
|
162
171
|
registeredPlaybacks: Loader.registeredPlaybacks.map((p) => p.name),
|
|
163
172
|
})
|
|
@@ -331,19 +340,51 @@ export class Player {
|
|
|
331
340
|
* @example
|
|
332
341
|
* ```ts
|
|
333
342
|
* import MyPlugin from './MyPlugin.js'
|
|
334
|
-
*
|
|
343
|
+
*
|
|
335
344
|
* Player.registerPlugin(MyPlugin)
|
|
336
345
|
* ```
|
|
337
346
|
*/
|
|
338
|
-
static registerPlugin(plugin:
|
|
347
|
+
static registerPlugin(plugin: PlayerPluginConstructor) {
|
|
348
|
+
assert.ok(
|
|
349
|
+
plugin.type === 'core' || plugin.type === 'container',
|
|
350
|
+
'Invalid plugin type',
|
|
351
|
+
)
|
|
352
|
+
if (plugin.type === 'core') {
|
|
353
|
+
if (plugin.prototype.name === 'media_control') {
|
|
354
|
+
Player.corePlugins.unshift(plugin)
|
|
355
|
+
} else {
|
|
356
|
+
Player.corePlugins.push(plugin)
|
|
357
|
+
}
|
|
358
|
+
return
|
|
359
|
+
}
|
|
339
360
|
Loader.registerPlugin(plugin)
|
|
340
361
|
}
|
|
341
362
|
|
|
363
|
+
private static getRegisteredPlugins(): {
|
|
364
|
+
core: Record<string, PlayerPluginConstructor>
|
|
365
|
+
container: Record<string, PlayerPluginConstructor>
|
|
366
|
+
} {
|
|
367
|
+
for (const plugin of Player.corePlugins) {
|
|
368
|
+
Loader.registerPlugin(plugin)
|
|
369
|
+
}
|
|
370
|
+
return Loader.registeredPlugins
|
|
371
|
+
}
|
|
372
|
+
|
|
373
|
+
private static corePlugins: PlayerPluginConstructor[] = []
|
|
374
|
+
|
|
342
375
|
/**
|
|
343
376
|
* Unregisters a plugin registered earlier with {@link Player.registerPlugin}.
|
|
344
377
|
* @param plugin - a plugin class
|
|
345
378
|
*/
|
|
346
|
-
static unregisterPlugin(plugin:
|
|
379
|
+
static unregisterPlugin(plugin: PlayerPluginConstructor) {
|
|
380
|
+
assert.ok(
|
|
381
|
+
plugin.type === 'core' || plugin.type === 'container',
|
|
382
|
+
'Invalid plugin type',
|
|
383
|
+
)
|
|
384
|
+
if (plugin.type === 'core') {
|
|
385
|
+
Player.corePlugins = Player.corePlugins.filter((p) => p !== plugin)
|
|
386
|
+
return
|
|
387
|
+
}
|
|
347
388
|
Loader.unregisterPlugin(plugin)
|
|
348
389
|
}
|
|
349
390
|
|
|
@@ -392,7 +433,10 @@ export class Player {
|
|
|
392
433
|
}, 0)
|
|
393
434
|
}
|
|
394
435
|
|
|
395
|
-
private safeTriggerEvent<E extends PlayerEvent>(
|
|
436
|
+
private safeTriggerEvent<E extends PlayerEvent>(
|
|
437
|
+
event: E,
|
|
438
|
+
...args: PlayerEventParams<E>
|
|
439
|
+
) {
|
|
396
440
|
try {
|
|
397
441
|
this.emitter.emit(event, ...args)
|
|
398
442
|
} catch (e) {
|
|
@@ -445,29 +489,34 @@ export class Player {
|
|
|
445
489
|
|
|
446
490
|
this.rootNode = rootNode
|
|
447
491
|
|
|
448
|
-
const coreOptions: CoreOptions & PluginOptions = $.extend(
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
492
|
+
const coreOptions: CoreOptions & PluginOptions = $.extend(
|
|
493
|
+
true,
|
|
494
|
+
{
|
|
495
|
+
allowUserInteraction: true,
|
|
496
|
+
debug: 'none',
|
|
497
|
+
events: this.events,
|
|
498
|
+
height: rootNode.clientHeight,
|
|
499
|
+
playback: {
|
|
500
|
+
controls: false,
|
|
501
|
+
playInline: true,
|
|
502
|
+
preload: Browser.isiOS ? 'metadata' : 'none',
|
|
503
|
+
mute: this.config.mute,
|
|
504
|
+
crossOrigin: 'anonymous', // TODO
|
|
505
|
+
hlsjsConfig: {
|
|
506
|
+
debug: this.config.debug === 'all' || this.config.debug === 'hls',
|
|
507
|
+
},
|
|
461
508
|
},
|
|
509
|
+
parent: rootNode,
|
|
510
|
+
width: rootNode.clientWidth,
|
|
462
511
|
},
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
512
|
+
this.config,
|
|
513
|
+
{
|
|
514
|
+
autoPlay: false,
|
|
515
|
+
mimeType: source ? source.mimeType : undefined,
|
|
516
|
+
source: source ? source.source : undefined,
|
|
517
|
+
sources,
|
|
518
|
+
},
|
|
519
|
+
)
|
|
471
520
|
return coreOptions
|
|
472
521
|
}
|
|
473
522
|
|
|
@@ -496,14 +545,20 @@ export class Player {
|
|
|
496
545
|
}
|
|
497
546
|
})
|
|
498
547
|
}
|
|
499
|
-
activeContainer?.on(
|
|
500
|
-
|
|
501
|
-
|
|
548
|
+
activeContainer?.on(
|
|
549
|
+
ClapprEvents.CONTAINER_VOLUME,
|
|
550
|
+
(volume: number) => {
|
|
551
|
+
this.safeTriggerEvent(PlayerEvent.VolumeUpdate, volume)
|
|
552
|
+
},
|
|
553
|
+
null,
|
|
554
|
+
)
|
|
502
555
|
}
|
|
503
556
|
|
|
504
557
|
private bindCoreListeners() {
|
|
505
|
-
|
|
506
|
-
|
|
558
|
+
// TODO create an class inherited from PlayerClappr
|
|
559
|
+
assert.ok(this.player, 'Player is not initialized')
|
|
560
|
+
const core = this.player.core
|
|
561
|
+
core.on(
|
|
507
562
|
ClapprEvents.CORE_SCREEN_ORIENTATION_CHANGED,
|
|
508
563
|
({ orientation }: { orientation: 'landscape' | 'portrait' }) => {
|
|
509
564
|
trace(`${T} on CORE_SCREEN_ORIENTATION_CHANGED`, {
|
|
@@ -522,7 +577,7 @@ export class Player {
|
|
|
522
577
|
},
|
|
523
578
|
null,
|
|
524
579
|
)
|
|
525
|
-
core
|
|
580
|
+
core.on(
|
|
526
581
|
ClapprEvents.CORE_RESIZE,
|
|
527
582
|
({ width, height }: { width: number; height: number }) => {
|
|
528
583
|
trace(`${T} on CORE_RESIZE`, {
|
|
@@ -533,7 +588,7 @@ export class Player {
|
|
|
533
588
|
},
|
|
534
589
|
null,
|
|
535
590
|
)
|
|
536
|
-
core
|
|
591
|
+
core.on(
|
|
537
592
|
ClapprEvents.CORE_FULLSCREEN,
|
|
538
593
|
(isFullscreen: boolean) => {
|
|
539
594
|
trace(`${T} CORE_FULLSCREEN`, {
|