@gcorevideo/player 2.19.12 → 2.19.14
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 +16 -11
- package/dist/index.css +1405 -1405
- package/dist/index.js +1239 -1088
- package/dist/player.d.ts +209 -45
- package/dist/plugins/index.css +1461 -1461
- package/dist/plugins/index.js +4005 -3858
- package/docs/api/player.bottomgear.md +3 -289
- package/docs/api/player.dvrcontrols._constructor_.md +3 -0
- package/docs/api/player.dvrcontrols.md +10 -201
- package/docs/api/player.levelselector.md +8 -140
- package/docs/api/player.md +9 -5
- package/docs/api/player.mediacontrol.disable.md +2 -0
- package/docs/api/player.mediacontrol.disabledcontrolbutton.md +1 -1
- package/docs/api/player.mediacontrol.enable.md +2 -0
- package/docs/api/player.mediacontrol.enablecontrolbutton.md +1 -1
- package/docs/api/player.mediacontrol.getelement.md +19 -1
- package/docs/api/player.mediacontrol.md +17 -281
- package/docs/api/player.mediacontrol.volume.md +2 -2
- package/docs/api/player.mediacontrolelement.md +2 -1
- package/docs/api/player.poster.disable.md +5 -0
- package/docs/api/player.poster.enable.md +5 -0
- package/docs/api/player.poster.md +25 -183
- package/lib/Player.d.ts +1 -0
- package/lib/Player.d.ts.map +1 -1
- package/lib/Player.js +15 -10
- package/lib/index.d.ts +1 -0
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +1 -0
- package/lib/plugins/audio-selector/AudioSelector.js +2 -2
- package/lib/plugins/big-mute-button/BigMuteButton.d.ts.map +1 -1
- package/lib/plugins/big-mute-button/BigMuteButton.js +2 -1
- package/lib/plugins/bottom-gear/BottomGear.d.ts +38 -7
- package/lib/plugins/bottom-gear/BottomGear.d.ts.map +1 -1
- package/lib/plugins/bottom-gear/BottomGear.js +53 -33
- package/lib/plugins/clappr-nerd-stats/ClapprNerdStats.d.ts +1 -1
- package/lib/plugins/clappr-nerd-stats/ClapprNerdStats.d.ts.map +1 -1
- package/lib/plugins/clappr-nerd-stats/ClapprNerdStats.js +20 -24
- package/lib/plugins/clappr-stats/ClapprStats.js +1 -1
- package/lib/plugins/click-to-pause/ClickToPause.js +1 -1
- package/lib/plugins/clips/Clips.js +2 -2
- package/lib/plugins/context-menu/ContextMenu.js +1 -1
- package/lib/plugins/disable-controls/DisableControls.js +1 -1
- package/lib/plugins/dvr-controls/DvrControls.d.ts +30 -4
- package/lib/plugins/dvr-controls/DvrControls.d.ts.map +1 -1
- package/lib/plugins/dvr-controls/DvrControls.js +39 -11
- package/lib/plugins/error-screen/ErrorScreen.d.ts.map +1 -1
- package/lib/plugins/error-screen/ErrorScreen.js +2 -1
- package/lib/plugins/favicon/Favicon.js +1 -1
- package/lib/plugins/google-analytics/GoogleAnalytics.js +1 -1
- package/lib/plugins/level-selector/LevelSelector.d.ts +25 -6
- package/lib/plugins/level-selector/LevelSelector.d.ts.map +1 -1
- package/lib/plugins/level-selector/LevelSelector.js +33 -12
- package/lib/plugins/logo/Logo.js +1 -1
- package/lib/plugins/media-control/MediaControl.d.ts +66 -22
- package/lib/plugins/media-control/MediaControl.d.ts.map +1 -1
- package/lib/plugins/media-control/MediaControl.js +72 -35
- package/lib/plugins/multi-camera/MultiCamera.js +3 -3
- package/lib/plugins/picture-in-picture/PictureInPicture.js +3 -3
- package/lib/plugins/playback-rate/PlaybackRate.d.ts.map +1 -1
- package/lib/plugins/playback-rate/PlaybackRate.js +3 -3
- package/lib/plugins/poster/Poster.d.ts +57 -3
- package/lib/plugins/poster/Poster.d.ts.map +1 -1
- package/lib/plugins/poster/Poster.js +57 -9
- package/lib/plugins/seek-time/SeekTime.js +2 -2
- package/lib/plugins/share/Share.js +2 -2
- package/lib/plugins/skip-time/SkipTime.js +1 -1
- package/lib/plugins/source-controller/SourceController.js +1 -1
- package/lib/plugins/spinner-three-bounce/SpinnerThreeBounce.js +1 -1
- package/lib/plugins/statistics/Statistics.js +1 -1
- package/lib/plugins/subtitles/Subtitles.js +3 -3
- package/lib/plugins/thumbnails/Thumbnails.js +3 -3
- package/lib/plugins/types.d.ts +1 -7
- package/lib/plugins/types.d.ts.map +1 -1
- package/lib/plugins/vast-ads/VastAds.d.ts +1 -0
- package/lib/plugins/vast-ads/VastAds.d.ts.map +1 -1
- package/lib/plugins/vast-ads/VastAds.js +6 -3
- package/package.json +2 -1
- package/src/Player.ts +15 -9
- package/src/__tests__/Player.test.ts +15 -76
- package/src/index.ts +1 -0
- package/src/plugins/audio-selector/AudioSelector.ts +2 -2
- package/src/plugins/big-mute-button/BigMuteButton.ts +2 -1
- package/src/plugins/bottom-gear/BottomGear.ts +67 -42
- package/src/plugins/clappr-nerd-stats/ClapprNerdStats.ts +21 -26
- package/src/plugins/clappr-stats/ClapprStats.ts +1 -1
- package/src/plugins/click-to-pause/ClickToPause.ts +1 -1
- package/src/plugins/clips/Clips.ts +2 -2
- package/src/plugins/context-menu/ContextMenu.ts +1 -1
- package/src/plugins/disable-controls/DisableControls.ts +1 -1
- package/src/plugins/dvr-controls/DvrControls.ts +42 -14
- package/src/plugins/error-screen/ErrorScreen.ts +2 -1
- package/src/plugins/favicon/Favicon.ts +1 -1
- package/src/plugins/google-analytics/GoogleAnalytics.ts +1 -1
- package/src/plugins/level-selector/LevelSelector.ts +34 -14
- package/src/plugins/level-selector/__tests__/LevelSelector.test.ts +22 -2
- package/src/plugins/logo/Logo.ts +1 -1
- package/src/plugins/media-control/MediaControl.ts +83 -44
- package/src/plugins/multi-camera/MultiCamera.ts +3 -3
- package/src/plugins/picture-in-picture/PictureInPicture.ts +3 -3
- package/src/plugins/playback-rate/PlaybackRate.ts +3 -4
- package/src/plugins/poster/Poster.ts +59 -12
- package/src/plugins/seek-time/SeekTime.ts +2 -2
- package/src/plugins/share/Share.ts +2 -2
- package/src/plugins/skip-time/SkipTime.ts +1 -1
- package/src/plugins/source-controller/SourceController.ts +1 -1
- package/src/plugins/source-controller/__tests__/SourceController.test.ts +5 -0
- package/src/plugins/spinner-three-bounce/SpinnerThreeBounce.ts +1 -1
- package/src/plugins/statistics/Statistics.ts +1 -1
- package/src/plugins/subtitles/Subtitles.ts +3 -3
- package/src/plugins/thumbnails/Thumbnails.ts +3 -3
- package/src/plugins/types.ts +1 -0
- package/src/plugins/vast-ads/VastAds.ts +6 -6
- package/temp/player.api.json +3301 -5030
- package/tsconfig.tsbuildinfo +1 -1
- package/docs/api/player.bottomgear.attributes.md +0 -17
- package/docs/api/player.bottomgear.bindevents.md +0 -18
- package/docs/api/player.bottomgear.container.md +0 -14
- package/docs/api/player.bottomgear.events.md +0 -16
- package/docs/api/player.bottomgear.hide.md +0 -18
- package/docs/api/player.bottomgear.name.md +0 -14
- package/docs/api/player.bottomgear.refresh.md +0 -18
- package/docs/api/player.bottomgear.reload.md +0 -18
- package/docs/api/player.bottomgear.render.md +0 -18
- package/docs/api/player.bottomgear.supportedversion.md +0 -16
- package/docs/api/player.bottomgear.template.md +0 -14
- package/docs/api/player.bottomgear.togglegearmenu.md +0 -18
- package/docs/api/player.bottomgear.unbindevents.md +0 -18
- package/docs/api/player.bottomgear.version.md +0 -14
- package/docs/api/player.dvrcontrols.attributes.md +0 -14
- package/docs/api/player.dvrcontrols.bindevents.md +0 -15
- package/docs/api/player.dvrcontrols.click.md +0 -15
- package/docs/api/player.dvrcontrols.events.md +0 -13
- package/docs/api/player.dvrcontrols.name.md +0 -11
- package/docs/api/player.dvrcontrols.render.md +0 -15
- package/docs/api/player.dvrcontrols.settingsupdate.md +0 -15
- package/docs/api/player.dvrcontrols.shouldrender.md +0 -15
- package/docs/api/player.dvrcontrols.supportedversion.md +0 -13
- package/docs/api/player.dvrcontrols.template.md +0 -11
- package/docs/api/player.levelselector.attributes.md +0 -17
- package/docs/api/player.levelselector.bindevents.md +0 -18
- package/docs/api/player.levelselector.name.md +0 -14
- package/docs/api/player.levelselector.render.md +0 -18
- package/docs/api/player.levelselector.supportedversion.md +0 -16
- package/docs/api/player.levelselector.version.md +0 -14
- package/docs/api/player.mediacontrol.attributes.md +0 -17
- package/docs/api/player.mediacontrol.bindcontainerevents.md +0 -18
- package/docs/api/player.mediacontrol.bindevents.md +0 -18
- package/docs/api/player.mediacontrol.container.md +0 -14
- package/docs/api/player.mediacontrol.destroy.md +0 -18
- package/docs/api/player.mediacontrol.disabled.md +0 -14
- package/docs/api/player.mediacontrol.events.md +0 -40
- package/docs/api/player.mediacontrol.getexternalinterface.md +0 -21
- package/docs/api/player.mediacontrol.name.md +0 -14
- package/docs/api/player.mediacontrol.pause.md +0 -20
- package/docs/api/player.mediacontrol.play.md +0 -20
- package/docs/api/player.mediacontrol.playback.md +0 -14
- package/docs/api/player.mediacontrol.render.md +0 -18
- package/docs/api/player.mediacontrol.setmuted.md +0 -52
- package/docs/api/player.mediacontrol.stop.md +0 -20
- package/docs/api/player.mediacontrol.supportedversion.md +0 -16
- package/docs/api/player.poster.attributes.md +0 -14
- package/docs/api/player.poster.bindevents.md +0 -15
- package/docs/api/player.poster.destroy.md +0 -15
- package/docs/api/player.poster.events.md +0 -13
- package/docs/api/player.poster.name.md +0 -11
- package/docs/api/player.poster.render.md +0 -15
- package/docs/api/player.poster.shouldrender.md +0 -11
- package/docs/api/player.poster.showonvideoend.md +0 -11
- package/docs/api/player.poster.supportedversion.md +0 -13
- package/docs/api/player.poster.template.md +0 -11
- package/src/plugins/build.ts +0 -1
|
@@ -75,6 +75,7 @@ describe('SourceController', () => {
|
|
|
75
75
|
})
|
|
76
76
|
const _ = new SourceController(core)
|
|
77
77
|
core.emit('core:ready')
|
|
78
|
+
core.emit('core:active:container:changed')
|
|
78
79
|
core.activePlayback.emit('playback:error', { code: PlaybackErrorCode.MediaSourceUnavailable })
|
|
79
80
|
nextPlayback = new _MockPlayback({} as any, {} as any)
|
|
80
81
|
vi.spyOn(nextPlayback, 'consent')
|
|
@@ -111,6 +112,7 @@ describe('SourceController', () => {
|
|
|
111
112
|
}
|
|
112
113
|
})
|
|
113
114
|
core.emit('core:ready')
|
|
115
|
+
core.emit('core:active:container:changed')
|
|
114
116
|
})
|
|
115
117
|
it('should disable the poster', async () => {
|
|
116
118
|
expect(poster.disable).toHaveBeenCalled()
|
|
@@ -134,6 +136,7 @@ describe('SourceController', () => {
|
|
|
134
136
|
})
|
|
135
137
|
const _ = new SourceController(core)
|
|
136
138
|
core.emit('core:ready')
|
|
139
|
+
core.emit('core:active:container:changed')
|
|
137
140
|
core.activePlayback.emit('playback:error', { code: PlaybackErrorCode.MediaSourceUnavailable })
|
|
138
141
|
nextPlayback = new _MockPlayback({} as any, {} as any)
|
|
139
142
|
vi.spyOn(nextPlayback, 'consent')
|
|
@@ -157,6 +160,7 @@ describe('SourceController', () => {
|
|
|
157
160
|
})
|
|
158
161
|
const _ = new SourceController(core)
|
|
159
162
|
core.emit('core:ready')
|
|
163
|
+
core.emit('core:active:container:changed')
|
|
160
164
|
core.activePlayback.emit('playback:error', { code: PlaybackErrorCode.MediaSourceUnavailable })
|
|
161
165
|
await clock.tickAsync(1000)
|
|
162
166
|
nextPlayback = new _MockPlayback({} as any, {} as any)
|
|
@@ -172,6 +176,7 @@ describe('SourceController', () => {
|
|
|
172
176
|
}
|
|
173
177
|
})
|
|
174
178
|
core.emit('core:ready')
|
|
179
|
+
core.emit('core:active:container:changed')
|
|
175
180
|
nextPlayback.emit('playback:play')
|
|
176
181
|
})
|
|
177
182
|
it('should enable the poster', async () => {
|
|
@@ -9,7 +9,7 @@ import { trace } from '@gcorevideo/utils';
|
|
|
9
9
|
import spinnerHTML from '../../../assets/spinner-three-bounce/spinner.ejs';
|
|
10
10
|
import '../../../assets/spinner-three-bounce/spinner.scss';
|
|
11
11
|
import { TimerId } from '../../utils/types.js';
|
|
12
|
-
import { CLAPPR_VERSION } from '
|
|
12
|
+
import { CLAPPR_VERSION } from '../../build.js';
|
|
13
13
|
|
|
14
14
|
const T = 'plugins.spinner'
|
|
15
15
|
|
|
@@ -5,7 +5,7 @@ import type { PlaybackType } from '../..//types'
|
|
|
5
5
|
import { reportError } from '@gcorevideo/utils'
|
|
6
6
|
import assert from 'assert'
|
|
7
7
|
|
|
8
|
-
import { CLAPPR_VERSION } from '
|
|
8
|
+
import { CLAPPR_VERSION } from '../../build.js'
|
|
9
9
|
|
|
10
10
|
const CUSTOM_EVENTS_CONTAINER_START = 'container:start'
|
|
11
11
|
|
|
@@ -11,7 +11,7 @@ import { type TimeValue } from '../../playback.types.js'
|
|
|
11
11
|
import { reportError } from '@gcorevideo/utils'
|
|
12
12
|
import assert from 'assert'
|
|
13
13
|
|
|
14
|
-
import { CLAPPR_VERSION } from '
|
|
14
|
+
import { CLAPPR_VERSION } from '../../build.js'
|
|
15
15
|
|
|
16
16
|
import '../../../assets/subtitles/style.scss'
|
|
17
17
|
import subtitlesOffIcon from '../../../assets/icons/new/subtitles-off.svg'
|
|
@@ -26,7 +26,7 @@ const VERSION: string = '0.0.1'
|
|
|
26
26
|
|
|
27
27
|
const LOCAL_STORAGE_SUBTITLES_ID = 'subtitles_select'
|
|
28
28
|
|
|
29
|
-
const T = 'plugins.
|
|
29
|
+
const T = 'plugins.media_control_subtitles'
|
|
30
30
|
|
|
31
31
|
type TextTrackInfo = {
|
|
32
32
|
language: string
|
|
@@ -53,7 +53,7 @@ export class Subtitles extends UICorePlugin {
|
|
|
53
53
|
private $string: ZeptoResult | undefined
|
|
54
54
|
|
|
55
55
|
get name() {
|
|
56
|
-
return '
|
|
56
|
+
return 'media_control_subtitles'
|
|
57
57
|
}
|
|
58
58
|
|
|
59
59
|
get supportedVersion() {
|
|
@@ -4,7 +4,7 @@ import parseSRT, { type ParsedSRT } from 'parse-srt';
|
|
|
4
4
|
|
|
5
5
|
import { TimeValue } from '../../playback.types.js';
|
|
6
6
|
|
|
7
|
-
import { CLAPPR_VERSION } from '
|
|
7
|
+
import { CLAPPR_VERSION } from '../../build.js';
|
|
8
8
|
|
|
9
9
|
import pluginHtml from '../../../assets/thumbnails/scrub-thumbnails.ejs';
|
|
10
10
|
import '../../../assets/thumbnails/style.scss';
|
|
@@ -31,7 +31,7 @@ type Thumb = {
|
|
|
31
31
|
imageH?: number;
|
|
32
32
|
}
|
|
33
33
|
|
|
34
|
-
const T = 'plugins.
|
|
34
|
+
const T = 'plugins.media_control_thumbnails';
|
|
35
35
|
|
|
36
36
|
export class Thumbnails extends UICorePlugin {
|
|
37
37
|
private _$spotlight: ZeptoResult | null = null;
|
|
@@ -61,7 +61,7 @@ export class Thumbnails extends UICorePlugin {
|
|
|
61
61
|
private _thumbs: Thumb[] = [];
|
|
62
62
|
|
|
63
63
|
get name() {
|
|
64
|
-
return '
|
|
64
|
+
return 'media_control_thumbnails';
|
|
65
65
|
}
|
|
66
66
|
|
|
67
67
|
get supportedVersion() {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type TemplateFunction = (data: Record<string, unknown>) => string
|
|
@@ -15,7 +15,7 @@ import { reportError } from '@gcorevideo/utils'
|
|
|
15
15
|
import assert from 'assert'
|
|
16
16
|
import { TimePosition } from '../../playback.types.js'
|
|
17
17
|
|
|
18
|
-
import { CLAPPR_VERSION } from '
|
|
18
|
+
import { CLAPPR_VERSION } from '../../build.js'
|
|
19
19
|
import { TimerId, ZeptoResult } from '../../utils/types.js'
|
|
20
20
|
import RollManager from './rollmanager.js'
|
|
21
21
|
import SCTEManager from './sctemanager.js'
|
|
@@ -817,7 +817,7 @@ export class VastAds extends UICorePlugin {
|
|
|
817
817
|
setTimeout(async () => {
|
|
818
818
|
if (currentRoll === 'scteroll') {
|
|
819
819
|
this.options.mute = this.core.options.mute
|
|
820
|
-
this.
|
|
820
|
+
this.setMuted(this.core.options.mute)
|
|
821
821
|
this.core.mediaControl.setInitialVolume()
|
|
822
822
|
}
|
|
823
823
|
|
|
@@ -882,7 +882,7 @@ export class VastAds extends UICorePlugin {
|
|
|
882
882
|
}
|
|
883
883
|
await this.playback?.play()
|
|
884
884
|
this.options.mute = this.core.options.mute
|
|
885
|
-
this.
|
|
885
|
+
this.setMuted(this.core.options.mute)
|
|
886
886
|
this.core.mediaControl.setInitialVolume()
|
|
887
887
|
}
|
|
888
888
|
}, 0)
|
|
@@ -909,7 +909,7 @@ export class VastAds extends UICorePlugin {
|
|
|
909
909
|
return this
|
|
910
910
|
}
|
|
911
911
|
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
912
|
+
private setMuted(muted: boolean) {
|
|
913
|
+
this.core.activeContainer.options.mute = muted
|
|
914
|
+
}
|
|
915
915
|
}
|