@gcorevideo/player 2.19.7 → 2.19.8
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 +1 -1
- package/dist/index.css +474 -474
- package/dist/index.js +85 -39
- package/dist/player.d.ts +109 -55
- package/dist/plugins/index.css +599 -599
- package/dist/plugins/index.js +84 -38
- package/docs/api/player.bigmutebutton.md +0 -14
- package/docs/api/player.levelselector.md +1 -1
- package/docs/api/player.md +24 -9
- package/docs/api/player.mediacontrol._constructor_.md +5 -2
- package/docs/api/player.mediacontrol.attributes.md +3 -0
- package/docs/api/player.mediacontrol.bindcontainerevents.md +3 -0
- package/docs/api/player.mediacontrol.bindevents.md +3 -0
- package/docs/api/player.mediacontrol.container.md +3 -0
- package/docs/api/player.mediacontrol.destroy.md +3 -0
- package/docs/api/player.mediacontrol.disable.md +3 -0
- package/docs/api/player.mediacontrol.disabled.md +3 -0
- package/docs/api/player.mediacontrol.disabledcontrolbutton.md +5 -0
- package/docs/api/player.mediacontrol.enable.md +3 -0
- package/docs/api/player.mediacontrol.enablecontrolbutton.md +5 -0
- package/docs/api/player.mediacontrol.events.md +3 -0
- package/docs/api/player.mediacontrol.getelement.md +11 -2
- package/docs/api/player.mediacontrol.getexternalinterface.md +3 -0
- package/docs/api/player.mediacontrol.md +53 -570
- package/docs/api/player.mediacontrol.muted.md +5 -0
- package/docs/api/player.mediacontrol.name.md +3 -0
- package/docs/api/player.mediacontrol.pause.md +5 -0
- package/docs/api/player.mediacontrol.play.md +5 -0
- package/docs/api/player.mediacontrol.playback.md +3 -0
- package/docs/api/player.mediacontrol.render.md +3 -0
- package/docs/api/player.mediacontrol.setinitialvolume.md +20 -0
- package/docs/api/player.mediacontrol.setmuted.md +3 -0
- package/docs/api/player.mediacontrol.setvolume.md +12 -1
- package/docs/api/player.mediacontrol.stop.md +5 -0
- package/docs/api/player.mediacontrol.supportedversion.md +3 -0
- package/docs/api/player.mediacontrol.volume.md +5 -0
- package/docs/api/{player.bigmutebutton.unbindevents.md → player.mediacontrolelement.md} +4 -7
- package/docs/api/player.subtitles.buttonelement.md +1 -1
- package/docs/api/player.subtitles.levelelement.md +1 -1
- package/docs/api/player.zeptoresult.md +15 -0
- package/lib/index.core.d.ts +1 -0
- package/lib/index.core.d.ts.map +1 -1
- package/lib/index.core.js +1 -0
- package/lib/plugins/big-mute-button/BigMuteButton.d.ts +1 -1
- package/lib/plugins/big-mute-button/BigMuteButton.d.ts.map +1 -1
- package/lib/plugins/clips/Clips.d.ts +3 -0
- package/lib/plugins/clips/Clips.d.ts.map +1 -1
- package/lib/plugins/clips/Clips.js +22 -2
- package/lib/plugins/kibo/index.d.ts +3 -0
- package/lib/plugins/kibo/index.d.ts.map +1 -1
- package/lib/plugins/kibo/index.js +3 -0
- package/lib/plugins/media-control/MediaControl.d.ts +95 -54
- package/lib/plugins/media-control/MediaControl.d.ts.map +1 -1
- package/lib/plugins/media-control/MediaControl.js +60 -37
- package/lib/plugins/subtitles/Subtitles.d.ts +1 -1
- package/lib/plugins/subtitles/Subtitles.d.ts.map +1 -1
- package/lib/plugins/vast-ads/roll.d.ts +1 -1
- package/lib/plugins/vast-ads/roll.d.ts.map +1 -1
- package/lib/plugins/vast-ads/rollmanager.d.ts +1 -1
- package/lib/plugins/vast-ads/rollmanager.d.ts.map +1 -1
- package/lib/types.d.ts.map +1 -1
- package/lib/utils/types.d.ts +6 -0
- package/lib/utils/types.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/index.core.ts +1 -0
- package/src/plugins/audio-selector/AudioSelector.ts +1 -1
- package/src/plugins/big-mute-button/BigMuteButton.ts +2 -2
- package/src/plugins/clappr-nerd-stats/ClapprNerdStats.ts +1 -1
- package/src/plugins/clappr-nerd-stats/speedtest/Speedtest.ts +1 -1
- package/src/plugins/clappr-stats/ClapprStats.ts +1 -1
- package/src/plugins/clips/Clips.ts +29 -3
- package/src/plugins/error-screen/ErrorScreen.ts +1 -1
- package/src/plugins/favicon/Favicon.ts +1 -1
- package/src/plugins/kibo/index.ts +3 -0
- package/src/plugins/level-selector/LevelSelector.ts +1 -1
- package/src/plugins/level-selector/__tests__/LevelSelector.test.ts +1 -8
- package/src/plugins/level-selector/__tests__/__snapshots__/LevelSelector.test.ts.snap +33 -0
- package/src/plugins/logo/Logo.ts +1 -1
- package/src/plugins/media-control/MediaControl.ts +114 -94
- package/src/plugins/multi-camera/MultiCamera.ts +1 -1
- package/src/plugins/playback-rate/PlaybackRate.ts +1 -1
- package/src/plugins/poster/Poster.ts +1 -1
- package/src/plugins/seek-time/SeekTime.ts +1 -1
- package/src/plugins/spinner-three-bounce/SpinnerThreeBounce.ts +1 -1
- package/src/plugins/subtitles/Subtitles.ts +1 -1
- package/src/plugins/thumbnails/Thumbnails.ts +1 -1
- package/src/plugins/vast-ads/VastAds.ts +1 -1
- package/src/plugins/vast-ads/roll.ts +1 -1
- package/src/plugins/vast-ads/rollmanager.ts +1 -1
- package/src/plugins/volume-fade/VolumeFade.ts +1 -1
- package/src/types.ts +0 -2
- package/src/utils/types.ts +6 -0
- package/temp/player.api.json +587 -2743
- package/tsconfig.tsbuildinfo +1 -1
- package/docs/api/player.kibo._constructor_.md +0 -49
- package/docs/api/player.kibo.delegate.md +0 -79
- package/docs/api/player.kibo.down.md +0 -65
- package/docs/api/player.kibo.lastkey.md +0 -51
- package/docs/api/player.kibo.lastmodifiersandkey.md +0 -15
- package/docs/api/player.kibo.md +0 -137
- package/docs/api/player.kibo.off.md +0 -49
- package/docs/api/player.kibo.up.md +0 -65
- package/docs/api/player.mediacontrol.applybuttonstyle.md +0 -49
- package/docs/api/player.mediacontrol.bigplaybutton.md +0 -11
- package/docs/api/player.mediacontrol.bindkeyandshow.md +0 -63
- package/docs/api/player.mediacontrol.bindkeyevents.md +0 -15
- package/docs/api/player.mediacontrol.configure.md +0 -15
- package/docs/api/player.mediacontrol.createcachedelements.md +0 -15
- package/docs/api/player.mediacontrol.drawdurationandposition.md +0 -15
- package/docs/api/player.mediacontrol.ended.md +0 -15
- package/docs/api/player.mediacontrol.getsettings.md +0 -15
- package/docs/api/player.mediacontrol.getvolumefromuievent.md +0 -49
- package/docs/api/player.mediacontrol.hide.md +0 -51
- package/docs/api/player.mediacontrol.hidecontrollads.md +0 -15
- package/docs/api/player.mediacontrol.hidevolumebar.md +0 -51
- package/docs/api/player.mediacontrol.highdefinitionupdate.md +0 -49
- package/docs/api/player.mediacontrol.initializeicons.md +0 -15
- package/docs/api/player.mediacontrol.isseekenabledforhtml5playback.md +0 -15
- package/docs/api/player.mediacontrol.isvisible.md +0 -15
- package/docs/api/player.mediacontrol.onactivecontainerchanged.md +0 -15
- package/docs/api/player.mediacontrol.onfinishad.md +0 -15
- package/docs/api/player.mediacontrol.onstartad.md +0 -15
- package/docs/api/player.mediacontrol.ontimeupdate.md +0 -49
- package/docs/api/player.mediacontrol.parsecolors.md +0 -15
- package/docs/api/player.mediacontrol.renderseekbar.md +0 -15
- package/docs/api/player.mediacontrol.resetindicators.md +0 -15
- package/docs/api/player.mediacontrol.resetkeepvisible.md +0 -15
- package/docs/api/player.mediacontrol.resetuserkeepvisible.md +0 -15
- package/docs/api/player.mediacontrol.seek.md +0 -49
- package/docs/api/player.mediacontrol.seekrelative.md +0 -49
- package/docs/api/player.mediacontrol.setcliptext.md +0 -49
- package/docs/api/player.mediacontrol.setkeepvisible.md +0 -15
- package/docs/api/player.mediacontrol.setseekpercentage.md +0 -49
- package/docs/api/player.mediacontrol.setsvgmask.md +0 -49
- package/docs/api/player.mediacontrol.setuserkeepvisible.md +0 -15
- package/docs/api/player.mediacontrol.show.md +0 -51
- package/docs/api/player.mediacontrol.showvolumebar.md +0 -15
- package/docs/api/player.mediacontrol.startseekdrag.md +0 -49
- package/docs/api/player.mediacontrol.startvolumedrag.md +0 -49
- package/docs/api/player.mediacontrol.stopdrag.md +0 -11
- package/docs/api/player.mediacontrol.template.md +0 -11
- package/docs/api/player.mediacontrol.togglefullscreen.md +0 -15
- package/docs/api/player.mediacontrol.togglemute.md +0 -15
- package/docs/api/player.mediacontrol.toggleplaypause.md +0 -15
- package/docs/api/player.mediacontrol.toggleplaystop.md +0 -15
- package/docs/api/player.mediacontrol.unbindkeyevents.md +0 -15
- package/docs/api/player.mediacontrol.updatecursorstyle.md +0 -49
- package/docs/api/player.mediacontrol.updatedrag.md +0 -11
- package/docs/api/player.mediacontrol.updateprogressbar.md +0 -49
- package/src/plugins/types.ts +0 -7
|
@@ -1,9 +1,6 @@
|
|
|
1
1
|
// Copyright 2014 Globo.com Player authors. All rights reserved.
|
|
2
2
|
// Use of this source code is governed by a BSD-style
|
|
3
3
|
// license that can be found in the LICENSE file.
|
|
4
|
-
/**
|
|
5
|
-
* The MediaControl is responsible for displaying the Player controls.
|
|
6
|
-
*/
|
|
7
4
|
import assert from 'assert';
|
|
8
5
|
import { Events, UICorePlugin, Browser, Playback, Utils, template, $, } from '@clappr/core';
|
|
9
6
|
import { reportError } from '@gcorevideo/utils';
|
|
@@ -21,6 +18,14 @@ import volumeOffIcon from '../../../assets/icons/new/volume-off.svg';
|
|
|
21
18
|
import fullscreenOffIcon from '../../../assets/icons/new/fullscreen-off.svg';
|
|
22
19
|
import fullscreenOnIcon from '../../../assets/icons/new/fullscreen-on.svg';
|
|
23
20
|
const T = 'plugins.media_control';
|
|
21
|
+
const LEFT_ORDER = [
|
|
22
|
+
'playpause',
|
|
23
|
+
'playstop',
|
|
24
|
+
'live',
|
|
25
|
+
'volume',
|
|
26
|
+
'position',
|
|
27
|
+
'duration',
|
|
28
|
+
];
|
|
24
29
|
const { Config, Fullscreen, formatTime, extend, removeArrayItem } = Utils;
|
|
25
30
|
function orderByOrderPattern(arr, order) {
|
|
26
31
|
const arrWithoutDuplicates = [...new Set(arr)];
|
|
@@ -28,6 +33,13 @@ function orderByOrderPattern(arr, order) {
|
|
|
28
33
|
const rest = arrWithoutDuplicates.filter((item) => !order.includes(item));
|
|
29
34
|
return [...ordered, ...rest];
|
|
30
35
|
}
|
|
36
|
+
/**
|
|
37
|
+
* The MediaControl is responsible for displaying the Player controls.
|
|
38
|
+
* @beta
|
|
39
|
+
* @remarks
|
|
40
|
+
* This plugin provides a foundation for developing a media controls UI via additional plugins.
|
|
41
|
+
* The methods exposed are to be used by the other plugins that extend the media control UI.
|
|
42
|
+
*/
|
|
31
43
|
export class MediaControl extends UICorePlugin {
|
|
32
44
|
advertisementPlaying = false;
|
|
33
45
|
buttonsColor = null;
|
|
@@ -80,6 +92,7 @@ export class MediaControl extends UICorePlugin {
|
|
|
80
92
|
$volumeBarScrubber = null;
|
|
81
93
|
$volumeContainer = null;
|
|
82
94
|
$volumeIcon = null;
|
|
95
|
+
template = template(mediaControlHTML);
|
|
83
96
|
get name() {
|
|
84
97
|
return 'media_control';
|
|
85
98
|
}
|
|
@@ -131,14 +144,17 @@ export class MediaControl extends UICorePlugin {
|
|
|
131
144
|
'mouseleave .media-control-layer[data-controls]': 'resetUserKeepVisible',
|
|
132
145
|
};
|
|
133
146
|
}
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
147
|
+
/**
|
|
148
|
+
* Current volume
|
|
149
|
+
*/
|
|
137
150
|
get volume() {
|
|
138
151
|
return this.container && this.container.isReady
|
|
139
152
|
? this.container.volume
|
|
140
153
|
: this.intendedVolume;
|
|
141
154
|
}
|
|
155
|
+
/**
|
|
156
|
+
* Muted state
|
|
157
|
+
*/
|
|
142
158
|
get muted() {
|
|
143
159
|
return this.volume === 0;
|
|
144
160
|
}
|
|
@@ -233,15 +249,27 @@ export class MediaControl extends UICorePlugin {
|
|
|
233
249
|
this.bindKeyEvents();
|
|
234
250
|
this.show();
|
|
235
251
|
}
|
|
252
|
+
/**
|
|
253
|
+
* Start the playback
|
|
254
|
+
*/
|
|
236
255
|
play() {
|
|
237
256
|
this.container && this.container.play();
|
|
238
257
|
}
|
|
258
|
+
/**
|
|
259
|
+
* Pause the playback
|
|
260
|
+
*/
|
|
239
261
|
pause() {
|
|
240
262
|
this.container && this.container.pause();
|
|
241
263
|
}
|
|
264
|
+
/**
|
|
265
|
+
* Stop the playback
|
|
266
|
+
*/
|
|
242
267
|
stop() {
|
|
243
268
|
this.container && this.container.stop();
|
|
244
269
|
}
|
|
270
|
+
/**
|
|
271
|
+
* Set the initial volume, which is preserved when playback is interrupted by an advertisement
|
|
272
|
+
*/
|
|
245
273
|
setInitialVolume() {
|
|
246
274
|
const initialVolume = this.persistConfig ? Config.restore('volume') : 100;
|
|
247
275
|
const options = (this.container && this.container.options) || this.options;
|
|
@@ -441,6 +469,13 @@ export class MediaControl extends UICorePlugin {
|
|
|
441
469
|
toggleMute() {
|
|
442
470
|
this.setVolume(this.muted ? 100 : 0);
|
|
443
471
|
}
|
|
472
|
+
/**
|
|
473
|
+
* Set the volume
|
|
474
|
+
* @param value - The volume value
|
|
475
|
+
* @param isInitialVolume - save as the initial volume
|
|
476
|
+
* @remarks
|
|
477
|
+
* Initial volume can be restored later
|
|
478
|
+
*/
|
|
444
479
|
setVolume(value, isInitialVolume = false) {
|
|
445
480
|
value = Math.min(100, Math.max(value, 0));
|
|
446
481
|
// this will hold the intended volume
|
|
@@ -661,14 +696,6 @@ export class MediaControl extends UICorePlugin {
|
|
|
661
696
|
default: [],
|
|
662
697
|
right: [],
|
|
663
698
|
});
|
|
664
|
-
const LEFT_ORDER = [
|
|
665
|
-
'playpause',
|
|
666
|
-
'playstop',
|
|
667
|
-
'live',
|
|
668
|
-
'volume',
|
|
669
|
-
'position',
|
|
670
|
-
'duration',
|
|
671
|
-
];
|
|
672
699
|
newSettings.left = orderByOrderPattern([...newSettings.left, 'clipsText', 'volume'], LEFT_ORDER);
|
|
673
700
|
newSettings.right = [
|
|
674
701
|
'fullscreen',
|
|
@@ -735,12 +762,20 @@ export class MediaControl extends UICorePlugin {
|
|
|
735
762
|
this.resetIndicators();
|
|
736
763
|
this.initializeIcons();
|
|
737
764
|
}
|
|
765
|
+
/**
|
|
766
|
+
* Get a media control element DOM node
|
|
767
|
+
* @param name - The name of the media control element
|
|
768
|
+
* @returns The DOM node to render the media control element
|
|
769
|
+
*/
|
|
738
770
|
getElement(name) {
|
|
739
771
|
switch (name) {
|
|
772
|
+
case 'clipText':
|
|
773
|
+
return this.$clipText;
|
|
740
774
|
case 'pip':
|
|
741
775
|
return this.$pip;
|
|
776
|
+
case 'seekBarContainer':
|
|
777
|
+
return this.$seekBarContainer;
|
|
742
778
|
}
|
|
743
|
-
return null;
|
|
744
779
|
}
|
|
745
780
|
resetIndicators() {
|
|
746
781
|
assert.ok(this.$duration && this.$position, 'duration and position elements must be present');
|
|
@@ -939,9 +974,6 @@ export class MediaControl extends UICorePlugin {
|
|
|
939
974
|
this.trigger(Events.MEDIACONTROL_RENDERED);
|
|
940
975
|
return this;
|
|
941
976
|
}
|
|
942
|
-
get bigPlayButton() {
|
|
943
|
-
return playIcon;
|
|
944
|
-
}
|
|
945
977
|
handleFullScreenOnBtn() {
|
|
946
978
|
this.trigger(Events.MEDIACONTROL_FULLSCREEN, this.name);
|
|
947
979
|
this.container.fullscreen();
|
|
@@ -959,37 +991,24 @@ export class MediaControl extends UICorePlugin {
|
|
|
959
991
|
}
|
|
960
992
|
this.resetUserKeepVisible();
|
|
961
993
|
}
|
|
994
|
+
// TODO manage by the ads plugin
|
|
962
995
|
onStartAd() {
|
|
963
996
|
this.advertisementPlaying = true;
|
|
964
997
|
this.disable();
|
|
965
998
|
}
|
|
999
|
+
// TODO manage by the ads plugin
|
|
966
1000
|
onFinishAd() {
|
|
967
1001
|
this.advertisementPlaying = false;
|
|
968
1002
|
this.enable();
|
|
969
1003
|
}
|
|
970
|
-
|
|
971
|
-
if (this.$clipText && txt) {
|
|
972
|
-
this.$clipTextContainer?.show();
|
|
973
|
-
this.$clipText.text(`${txt}`);
|
|
974
|
-
}
|
|
975
|
-
}
|
|
1004
|
+
// TODO remove
|
|
976
1005
|
hideControllAds() {
|
|
977
1006
|
if (this.container.advertisement &&
|
|
978
1007
|
this.container.advertisement.type !== 'idle') {
|
|
979
1008
|
this.hide();
|
|
980
1009
|
}
|
|
981
1010
|
}
|
|
982
|
-
|
|
983
|
-
if (this.svgMask) {
|
|
984
|
-
this.svgMask.remove();
|
|
985
|
-
}
|
|
986
|
-
if (this.$seekBarContainer?.get(0)) {
|
|
987
|
-
this.$seekBarContainer.addClass('clips');
|
|
988
|
-
}
|
|
989
|
-
this.svgMask = $(svg);
|
|
990
|
-
this.$seekBarContainer?.append(this.svgMask);
|
|
991
|
-
}
|
|
992
|
-
// https://bugs.chromium.org/p/chromium/issues/detail?id=109212
|
|
1011
|
+
// TODO
|
|
993
1012
|
setMuted(value) {
|
|
994
1013
|
this.container.options.mute = value;
|
|
995
1014
|
}
|
|
@@ -1005,13 +1024,17 @@ export class MediaControl extends UICorePlugin {
|
|
|
1005
1024
|
}
|
|
1006
1025
|
return 0;
|
|
1007
1026
|
}
|
|
1008
|
-
|
|
1009
|
-
|
|
1027
|
+
/**
|
|
1028
|
+
* Enable the control button
|
|
1029
|
+
*/
|
|
1010
1030
|
enableControlButton() {
|
|
1011
1031
|
this.disabledClickableList.forEach((element) => {
|
|
1012
1032
|
element.el.css({ 'pointer-events': element.pointerEventValue });
|
|
1013
1033
|
});
|
|
1014
1034
|
}
|
|
1035
|
+
/**
|
|
1036
|
+
* Disable the control button
|
|
1037
|
+
*/
|
|
1015
1038
|
disabledControlButton() {
|
|
1016
1039
|
this.disabledClickableList.forEach((element) => {
|
|
1017
1040
|
element.el.css({ 'pointer-events': 'none' });
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { UICorePlugin } from '@clappr/core';
|
|
2
2
|
import '../../../assets/subtitles/style.scss';
|
|
3
|
-
import type { ZeptoResult } from '
|
|
3
|
+
import type { ZeptoResult } from '../../utils/types.js';
|
|
4
4
|
export declare class Subtitles extends UICorePlugin {
|
|
5
5
|
private currentContainer;
|
|
6
6
|
private currentLevel;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Subtitles.d.ts","sourceRoot":"","sources":["../../../src/plugins/subtit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IAYnB,OAAO,CAAC,aAAa;IAWrB,OAAO,CAAC,yBAAyB;IASjC,OAAO,CAAC,qBAAqB;IAI7B,OAAO,CAAC,mBAAmB;IAI3B,OAAO,CAAC,iBAAiB;IAIzB,aAAa,IAAI,WAAW;IAI5B,YAAY,CAAC,EAAE,CAAC,EAAE,MAAM,GAAG,WAAW;IAQtC,gBAAgB;IAIhB,eAAe;IAIf,eAAe;IAgDf,OAAO,CAAC,eAAe;IAIvB,OAAO,CAAC,iBAAiB;IAIzB,OAAO,CAAC,kBAAkB;IAW1B,OAAO,CAAC,yBAAyB;IAYjC,OAAO,CAAC,UAAU;CAOnB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"roll.d.ts","sourceRoot":"","sources":["../../../src/plugins/vast-ads/roll.ts"],"names":[],"mappings":"AACA,OAAO,EAAgB,IAAI,EAAE,MAAM,EAAiB,MAAM,cAAc,CAAC;AAIzE,OAAO,KAAK,EAAW,WAAW,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"roll.d.ts","sourceRoot":"","sources":["../../../src/plugins/vast-ads/roll.ts"],"names":[],"mappings":"AACA,OAAO,EAAgB,IAAI,EAAE,MAAM,EAAiB,MAAM,cAAc,CAAC;AAIzE,OAAO,KAAK,EAAW,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAEjE,KAAK,sBAAsB,GAAG;IAC5B,IAAI,EAAE,IAAI,CAAC;IACX,OAAO,EAAE,WAAW,CAAC;IACrB,SAAS,EAAE,WAAW,CAAC;IACvB,UAAU,EAAE,WAAW,CAAC;IACxB,IAAI,EAAE,OAAO,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,UAAU,EAAE,MAAM,CAAC;CACpB,CAAC;AAEF,MAAM,CAAC,OAAO,OAAO,IAAK,SAAQ,MAAM;IACtC,OAAO,CAAC,IAAI,CAAU;IACtB,OAAO,CAAC,IAAI,CAAO;IACnB,OAAO,CAAC,SAAS,CAAY;IAC7B,OAAO,CAAC,O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gB;IAkBhB,aAAa;IA+Cb,UAAU,CAAC,IAAI,EAAE,MAAM,EAAE;IAMzB,SAAS,CAAC,GAAG,EAAE,MAAM;IAQrB,OAAO;CAWR"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Core, Events } from '@clappr/core';
|
|
2
|
-
import { ZeptoResult } from '
|
|
2
|
+
import { ZeptoResult } from '../../utils/types.js';
|
|
3
3
|
import { AdRollDesc, AdRollType } from './types.js';
|
|
4
4
|
type CoreOptions = Record<string, unknown>;
|
|
5
5
|
export default class RollManager extends Events {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rollmanager.d.ts","sourceRoot":"","sources":["../../../src/plugins/vast-ads/rollmanager.ts"],"names":[],"mappings":"AAAA,OAAO,EAA0C,IAAI,EAAE,MAAM,EAAuD,MAAM,cAAc,CAAC;AAMzI,OAAO,EAAE,WAAW,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"rollmanager.d.ts","sourceRoot":"","sources":["../../../src/plugins/vast-ads/rollmanager.ts"],"names":[],"mappings":"AAAA,OAAO,EAA0C,IAAI,EAAE,MAAM,EAAuD,MAAM,cAAc,CAAC;AAMzI,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AACnD,OAAO,EAAE,UAAU,EAAc,UAAU,EAAkB,MAAM,YAAY,CAAC;AAEhF,KAAK,WAAW,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;AAI3C,MAAM,CAAC,OAAO,OAAO,WAAY,SAAQ,MAAM;IAqC3C,OAAO,CAAC,IAAI;IACZ,OAAO,CAAC,OAAO;IACf,OAAO,CAAC,OAAO;IACf,OAAO,CAAC,SAAS;IACjB,OAAO,CAAC,UAAU;IAClB,OAAO,CAAC,YAAY;IACpB,OAAO,CAAC,IAAI;IACZ,OAAO,CAAC,SAAS;IACjB,OAAO,CAAC,MAAM;IACd,OAAO,CAAC,UAAU;IA7CpB,OAAO,CAAC,cAAc,CAAS;I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AE,GAAG;IAiB5B,SAAS,CAAC,SAAS,EAAE,MAAM,EAAE,CAAC,EAAE,GAAG;IAInC;;;OAGG;IACG,iBAAiB,CAAC,IAAI,EAAE,GAAG;IAcjC,iBAAiB;IAejB,WAAW;CASZ"}
|
package/lib/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"
|
|
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;;;GAGG;AACH,MAAM,MAAM,YAAY,GAAG;IACzB,KAAK,GAAG,IAAI,EAAE,GAAG,EAAE,GAAG,OAAO,CAAA;IAC7B,IAAI,EAAE,MAAM,CAAA;CACb,CAAA;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwCG;AACH,MAAM,WAAW,YAAa,SAAQ,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;IAC3D;;;OAGG;IACH,Q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,IAAI,SAAS;IACb;;OAEG;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,MAAM,MAAM,WAAW,GAAG,UAAU,CAAC,OAAO,CAAC,CAAC,CAAC;AAE/C,MAAM,MAAM,OAAO,GAAG,UAAU,CAAC,OAAO,UAAU,CAAC,CAAC"}
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/utils/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,cAAc,CAAC;AAEjC;;GAEG;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/src/index.core.ts
CHANGED
|
@@ -11,7 +11,7 @@ import { CLAPPR_VERSION } from '../build.js';
|
|
|
11
11
|
import pluginHtml from '../../../assets/audio-selector/track-selector.ejs';
|
|
12
12
|
import '../../../assets/audio-selector/style.scss';
|
|
13
13
|
import audioArrow from '../../../assets/icons/old/quality-arrow.svg';
|
|
14
|
-
import { ZeptoResult } from '
|
|
14
|
+
import { ZeptoResult } from '../../utils/types.js';
|
|
15
15
|
|
|
16
16
|
const VERSION: string = '0.0.1';
|
|
17
17
|
|
|
@@ -2,7 +2,7 @@ import { Events, template, UICorePlugin, Utils } from '@clappr/core';
|
|
|
2
2
|
import { trace } from '@gcorevideo/utils';
|
|
3
3
|
|
|
4
4
|
import { CLAPPR_VERSION } from '../build.js';
|
|
5
|
-
import { ZeptoResult } from "
|
|
5
|
+
import { ZeptoResult } from "../../utils/types.js";
|
|
6
6
|
|
|
7
7
|
import volumeMuteIcon from '../../../assets/icons/new/volume-off.svg';
|
|
8
8
|
import pluginHtml from '../../../assets/big-mute-button/big-mute-button.ejs';
|
|
@@ -52,7 +52,7 @@ export class BigMuteButton extends UICorePlugin {
|
|
|
52
52
|
this.listenTo(this.core.mediaControl, Events.MEDIACONTROL_RENDERED, this.mediaControlRendered);
|
|
53
53
|
}
|
|
54
54
|
|
|
55
|
-
unBindEvents() {
|
|
55
|
+
private unBindEvents() {
|
|
56
56
|
// @ts-ignore
|
|
57
57
|
this.stopListening(this.core, Events.CORE_READY);
|
|
58
58
|
this.stopListening(this.core, 'core:advertisement:start', this.onStartAd);
|
|
@@ -15,7 +15,7 @@ import {
|
|
|
15
15
|
stopSpeedtest,
|
|
16
16
|
} from './speedtest/index.js';
|
|
17
17
|
import { CustomMetrics } from './speedtest/types.js';
|
|
18
|
-
import { ZeptoResult } from '
|
|
18
|
+
import { ZeptoResult } from '../../utils/types.js';
|
|
19
19
|
|
|
20
20
|
import '../../../assets/clappr-nerd-stats/clappr-nerd-stats.scss';
|
|
21
21
|
import pluginHtml from '../../../assets/clappr-nerd-stats/clappr-nerd-stats.ejs';
|
|
@@ -2,7 +2,7 @@ import { reportError } from '@gcorevideo/utils';
|
|
|
2
2
|
|
|
3
3
|
import SpeedtestWorkerModule from '../../../../assets/clappr-nerd-stats/speedtest/speedtest.worker.js';
|
|
4
4
|
|
|
5
|
-
import { TimerId } from '
|
|
5
|
+
import { TimerId } from '../../../utils/types.js';
|
|
6
6
|
|
|
7
7
|
export type Server = {
|
|
8
8
|
id: number;
|
|
@@ -3,7 +3,7 @@ import type { QualityLevel, TimePosition, TimeProgress } from '../../playback.ty
|
|
|
3
3
|
import assert from 'assert';
|
|
4
4
|
|
|
5
5
|
import { CLAPPR_VERSION } from '../build.js';
|
|
6
|
-
import { TimerId } from '
|
|
6
|
+
import { TimerId } from '../../utils/types.js';
|
|
7
7
|
import type { Metrics, MetricsUpdateFn } from './types.js';
|
|
8
8
|
import { ClapprStatsEvents } from './types.js';
|
|
9
9
|
import { newMetrics } from './utils.js';
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { Container, Events, UICorePlugin } from '@clappr/core';
|
|
2
|
-
import { TimeProgress } from '../../playback.types.js';
|
|
1
|
+
import { Container, Events, UICorePlugin, $ } from '@clappr/core';
|
|
3
2
|
|
|
3
|
+
import { TimeProgress } from '../../playback.types.js';
|
|
4
|
+
import type { ZeptoResult } from '../../utils/types.js';
|
|
4
5
|
import { strtimeToMiliseconds } from '../utils.js';
|
|
5
6
|
import '../../../assets/clips/clips.scss';
|
|
6
7
|
|
|
@@ -25,6 +26,8 @@ export class ClipsPlugin extends UICorePlugin {
|
|
|
25
26
|
|
|
26
27
|
private _oldContainer: Container | undefined;
|
|
27
28
|
|
|
29
|
+
private svgMask: ZeptoResult | null = null;
|
|
30
|
+
|
|
28
31
|
get name() {
|
|
29
32
|
return 'clips';
|
|
30
33
|
}
|
|
@@ -88,7 +91,7 @@ export class ClipsPlugin extends UICorePlugin {
|
|
|
88
91
|
|
|
89
92
|
for (const value of this.clips.values()) {
|
|
90
93
|
if (event.current >= value.start && event.current < value.end) {
|
|
91
|
-
this.
|
|
94
|
+
this.setClipText(value.text);
|
|
92
95
|
break;
|
|
93
96
|
}
|
|
94
97
|
}
|
|
@@ -147,6 +150,29 @@ export class ClipsPlugin extends UICorePlugin {
|
|
|
147
150
|
|
|
148
151
|
svg += `<rect x="${finishValue}" y="0" width="${widthOfSeek - finishValue}" height="30"/>\n`;
|
|
149
152
|
svg += '</clipPath>' + '</defs>' + '</svg>';
|
|
153
|
+
this.setSVGMask(svg)
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
private setSVGMask(svg: string) {
|
|
150
157
|
this.core.mediaControl.setSVGMask(svg);
|
|
158
|
+
if (this.svgMask) {
|
|
159
|
+
this.svgMask.remove()
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
const $seekBarContainer = this.core.mediaControl.getElement('seekBarContainer')
|
|
163
|
+
if ($seekBarContainer?.get(0)) {
|
|
164
|
+
$seekBarContainer.addClass('clips')
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
this.svgMask = $(svg)
|
|
168
|
+
$seekBarContainer?.append(this.svgMask)
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
private setClipText(text: string) {
|
|
172
|
+
const $clipText = this.core.mediaControl.getElement('clipText')
|
|
173
|
+
if ($clipText && text) {
|
|
174
|
+
$clipText.show()
|
|
175
|
+
$clipText.text(`${text}`)
|
|
176
|
+
}
|
|
151
177
|
}
|
|
152
178
|
}
|
|
@@ -2,7 +2,7 @@ import { UICorePlugin, Events, template, PlayerError } from '@clappr/core';
|
|
|
2
2
|
import { trace } from '@gcorevideo/utils';
|
|
3
3
|
|
|
4
4
|
import { CLAPPR_VERSION } from '../build.js';
|
|
5
|
-
import type { TimerId, ZeptoResult } from '
|
|
5
|
+
import type { TimerId, ZeptoResult } from '../../utils/types.js';
|
|
6
6
|
|
|
7
7
|
import reloadIcon from '../../../assets/icons/old/reload.svg';
|
|
8
8
|
import templateHtml from '../../../assets/error-screen/error_screen.ejs';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { CorePlugin, Events, $, Core, Container } from '@clappr/core';
|
|
2
2
|
|
|
3
3
|
import { CLAPPR_VERSION } from '../build.js';
|
|
4
|
-
import { ZeptoResult } from '
|
|
4
|
+
import { ZeptoResult } from '../../utils/types.js';
|
|
5
5
|
|
|
6
6
|
import playIcon from '../../../assets/icons/new/play.svg';
|
|
7
7
|
import pauseIcon from '../../../assets/icons/new/pause.svg';
|
|
@@ -3,7 +3,7 @@ import { reportError, trace } from '@gcorevideo/utils'
|
|
|
3
3
|
|
|
4
4
|
import { type QualityLevel } from '../../playback.types.js'
|
|
5
5
|
import { CLAPPR_VERSION } from '../build.js'
|
|
6
|
-
import { ZeptoResult } from '
|
|
6
|
+
import { ZeptoResult } from '../../utils/types.js'
|
|
7
7
|
|
|
8
8
|
import buttonHtml from '../../../assets/level-selector/button.ejs'
|
|
9
9
|
import listHtml from '../../../assets/level-selector/list.ejs'
|
|
@@ -165,16 +165,9 @@ describe('LevelSelector', () => {
|
|
|
165
165
|
await clock.tickAsync(1)
|
|
166
166
|
levelSelector.$el.find('.gear-option').click()
|
|
167
167
|
await clock.tickAsync(1)
|
|
168
|
-
// levelSelector.$el.find(`.gear-sub-menu_btn[data-id="0"]`).click()
|
|
169
|
-
// await clock.tickAsync(1)
|
|
170
168
|
})
|
|
171
169
|
it('should recognize vertical orientation', () => {
|
|
172
|
-
|
|
173
|
-
// expect(
|
|
174
|
-
// levelSelector.el.textContent
|
|
175
|
-
// ?.replace('/assets/icons/new/arrow-right.svg', '')
|
|
176
|
-
// .replace(/\s+/g, ' '),
|
|
177
|
-
// ).toContain('Quality 360p')
|
|
170
|
+
expect(levelSelector.el.innerHTML).toMatchSnapshot()
|
|
178
171
|
expect(levelSelector.el.innerHTML).toMatchSnapshot()
|
|
179
172
|
})
|
|
180
173
|
it('should properly apply the restriction', () => {
|
|
@@ -138,6 +138,39 @@ exports[`LevelSelector > options.restrictResolution > given vertical video forma
|
|
|
138
138
|
<ul class="gear-sub-menu">
|
|
139
139
|
|
|
140
140
|
|
|
141
|
+
<li class="level-disabled">
|
|
142
|
+
<a href="#" class="gear-sub-menu_btn gcore-skin-text-color" data-id="2">
|
|
143
|
+
<span class="check-icon">/assets/icons/new/check.svg</span>
|
|
144
|
+
1080p
|
|
145
|
+
</a>
|
|
146
|
+
</li>
|
|
147
|
+
|
|
148
|
+
<li class="level-disabled">
|
|
149
|
+
<a href="#" class="gear-sub-menu_btn gcore-skin-text-color" data-id="1">
|
|
150
|
+
<span class="check-icon">/assets/icons/new/check.svg</span>
|
|
151
|
+
720p
|
|
152
|
+
</a>
|
|
153
|
+
</li>
|
|
154
|
+
|
|
155
|
+
<li class="current">
|
|
156
|
+
<a href="#" class="gear-sub-menu_btn gcore-skin-text-color gcore-skin-active" data-id="0">
|
|
157
|
+
<span class="check-icon">/assets/icons/new/check.svg</span>
|
|
158
|
+
360p
|
|
159
|
+
</a>
|
|
160
|
+
</li>
|
|
161
|
+
|
|
162
|
+
</ul>
|
|
163
|
+
"
|
|
164
|
+
`;
|
|
165
|
+
|
|
166
|
+
exports[`LevelSelector > options.restrictResolution > given vertical video format levels > should recognize vertical orientation 2`] = `
|
|
167
|
+
"<button class="gplayer-lite-btn go-back gcore-skin-text-color">
|
|
168
|
+
<span class="arrow-left-icon">/assets/icons/new/arrow-left.svg</span>
|
|
169
|
+
Quality
|
|
170
|
+
</button>
|
|
171
|
+
<ul class="gear-sub-menu">
|
|
172
|
+
|
|
173
|
+
|
|
141
174
|
<li class="level-disabled">
|
|
142
175
|
<a href="#" class="gear-sub-menu_btn gcore-skin-text-color" data-id="2">
|
|
143
176
|
<span class="check-icon">/assets/icons/new/check.svg</span>
|
package/src/plugins/logo/Logo.ts
CHANGED
|
@@ -2,7 +2,7 @@ import { UIContainerPlugin, Events, template as t, Container } from '@clappr/cor
|
|
|
2
2
|
|
|
3
3
|
import { CLAPPR_VERSION } from '../build.js';
|
|
4
4
|
import { calculateSize } from './utils/index.js';
|
|
5
|
-
import { ZeptoResult } from '
|
|
5
|
+
import { ZeptoResult } from '../../utils/types.js';
|
|
6
6
|
|
|
7
7
|
import logoHTML from '../../../assets/logo/templates/logo.ejs';
|
|
8
8
|
import '../../../assets/logo/styles/logo.scss';
|