@gcorevideo/player 2.23.1 → 2.23.3

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.
Files changed (33) hide show
  1. package/assets/bottom-gear/bottomgear.ejs +5 -2
  2. package/dist/core.js +1 -1
  3. package/dist/index.css +1501 -1501
  4. package/dist/index.js +53 -25
  5. package/dist/player.d.ts +67 -53
  6. package/docs/api/{player.mediacontrol.putelement.md → player.clips.gettext.md} +10 -23
  7. package/docs/api/player.clips.md +14 -0
  8. package/docs/api/player.md +9 -0
  9. package/docs/api/player.mediacontrol.md +0 -14
  10. package/docs/api/player.poster.md +2 -10
  11. package/docs/api/player.posterpluginsettings.md +16 -0
  12. package/docs/api/player.thumbnails._constructor_.md +50 -0
  13. package/docs/api/player.thumbnails.md +73 -0
  14. package/docs/api/player.thumbnails.render.md +18 -0
  15. package/docs/api/player.thumbnailspluginsettings.md +4 -4
  16. package/lib/plugins/bottom-gear/BottomGear.d.ts +6 -3
  17. package/lib/plugins/bottom-gear/BottomGear.d.ts.map +1 -1
  18. package/lib/plugins/bottom-gear/BottomGear.js +48 -17
  19. package/lib/plugins/thumbnails/Thumbnails.d.ts.map +1 -1
  20. package/lib/plugins/thumbnails/Thumbnails.js +3 -6
  21. package/lib/testUtils.d.ts +1 -0
  22. package/lib/testUtils.d.ts.map +1 -1
  23. package/lib/testUtils.js +3 -0
  24. package/package.json +1 -1
  25. package/src/plugins/bottom-gear/BottomGear.ts +52 -24
  26. package/src/plugins/bottom-gear/__tests__/BottomGear.test.ts +122 -48
  27. package/src/plugins/bottom-gear/__tests__/__snapshots__/BottomGear.test.ts.snap +4 -4
  28. package/src/plugins/thumbnails/Thumbnails.ts +3 -6
  29. package/src/plugins/thumbnails/__tests__/Thumbnails.test.ts +20 -3
  30. package/src/plugins/thumbnails/__tests__/__snapshots__/Thumbnails.test.ts.snap +1 -1
  31. package/src/testUtils.ts +3 -0
  32. package/temp/player.api.json +144 -70
  33. package/tsconfig.tsbuildinfo +1 -1
@@ -2,9 +2,14 @@ import { MockedFunction, beforeEach, describe, expect, it, vi } from 'vitest'
2
2
 
3
3
  import { BottomGear, GearEvents } from '../BottomGear'
4
4
  import { createMockCore, createMockMediaControl } from '../../../testUtils'
5
- import { Events } from '@clappr/core'
5
+ import { $, Events } from '@clappr/core'
6
6
  import { ExtendedEvents } from '../../media-control/MediaControl'
7
7
 
8
+ // import { LogTracer, Logger, setTracer } from '@gcorevideo/utils'
9
+
10
+ // Logger.enable('*')
11
+ // setTracer(new LogTracer('BottomGear.test'))
12
+
8
13
  describe('BottomGear', () => {
9
14
  let mediaControl: any
10
15
  let core: any
@@ -18,66 +23,135 @@ describe('BottomGear', () => {
18
23
  .mockImplementation((name) =>
19
24
  name === 'media_control' ? mediaControl : null,
20
25
  )
21
- bottomGear = new BottomGear(core)
22
- onGearRendered = vi.fn()
23
- bottomGear.on(GearEvents.RENDERED, onGearRendered, null)
24
- bottomGear.render()
25
- core.emit(Events.CORE_READY)
26
- })
27
- it('should render', () => {
28
- expect(bottomGear.el.innerHTML).toMatchSnapshot()
29
- })
30
- it('should emit event in the next cycle', async () => {
31
- expect(onGearRendered).not.toHaveBeenCalled()
32
- await new Promise((resolve) => setTimeout(resolve, 0))
33
- expect(onGearRendered).toHaveBeenCalled()
34
26
  })
35
- it('should render the gear menu hidden', () => {
36
- expect(bottomGear.$el.find('#gear-options-wrapper').css('display')).toBe(
37
- 'none',
38
- )
39
- })
40
- describe('until media control is rendered', () => {
41
- it('should not attach to media control', () => {
42
- expect(mediaControl.mount).not.toHaveBeenCalledWith(
43
- 'gear',
44
- expect.anything(),
27
+ describe('basically', () => {
28
+ beforeEach(() => {
29
+ bottomGear = new BottomGear(core)
30
+ onGearRendered = vi.fn()
31
+ bottomGear.on(GearEvents.RENDERED, onGearRendered, null)
32
+ core.emit(Events.CORE_READY)
33
+ bottomGear.addItem('test', null).html('<button>test</button>')
34
+ })
35
+ it('should render', () => {
36
+ expect(bottomGear.el.innerHTML).toMatchSnapshot()
37
+ })
38
+ it('should render the gear menu hidden', () => {
39
+ expect(bottomGear.$el.find('#gear-options-wrapper').css('display')).toBe(
40
+ 'none',
45
41
  )
46
42
  })
47
- })
48
- describe('when media control is rendered', () => {
49
- beforeEach(() => {
50
- mediaControl.trigger(Events.MEDIACONTROL_RENDERED)
43
+ it('should emit event in the next render cycle', async () => {
44
+ expect(onGearRendered).not.toHaveBeenCalled()
45
+ await new Promise((resolve) => setTimeout(resolve, 0))
46
+ expect(onGearRendered).toHaveBeenCalled()
51
47
  })
52
- it('should attach to media control', () => {
53
- expect(mediaControl.mount).toHaveBeenCalledWith('gear', bottomGear.$el)
48
+ it('should render the gear menu hidden', () => {
49
+ expect(bottomGear.$el.find('#gear-options-wrapper').css('display')).toBe(
50
+ 'none',
51
+ )
52
+ })
53
+ describe('until media control is rendered', () => {
54
+ it('should not attach to media control', () => {
55
+ expect(mediaControl.mount).not.toHaveBeenCalledWith(
56
+ 'gear',
57
+ expect.anything(),
58
+ )
59
+ })
60
+ })
61
+ describe('when media control is rendered', () => {
62
+ beforeEach(() => {
63
+ mediaControl.trigger(Events.MEDIACONTROL_RENDERED)
64
+ })
65
+ it('should attach to media control', () => {
66
+ expect(mediaControl.mount).toHaveBeenCalledWith('gear', bottomGear.$el)
67
+ })
68
+ })
69
+ describe('when clicked', () => {
70
+ beforeEach(() => {
71
+ bottomGear.$el.find('#gear-button').click()
72
+ })
73
+ it('should open the gear menu', () => {
74
+ expect(
75
+ bottomGear.$el.find('#gear-options-wrapper').css('display'),
76
+ ).not.toBe('none')
77
+ expect(bottomGear.$el.find('#gear-button').attr('aria-expanded')).toBe(
78
+ 'true',
79
+ )
80
+ })
81
+ it('should trigger media control menu collapse', () => {
82
+ expect(mediaControl.trigger).toHaveBeenCalledWith(
83
+ ExtendedEvents.MEDIACONTROL_MENU_COLLAPSE,
84
+ 'bottom_gear',
85
+ )
86
+ })
87
+ })
88
+ describe('when clicked twice', () => {
89
+ beforeEach(() => {
90
+ bottomGear.$el.find('#gear-button').click()
91
+ bottomGear.$el.find('#gear-button').click()
92
+ })
93
+ it('should collapse the gear menu', () => {
94
+ expect(
95
+ bottomGear.$el.find('#gear-options-wrapper').css('display'),
96
+ ).toBe('none')
97
+ expect(bottomGear.$el.find('#gear-button').attr('aria-expanded')).toBe(
98
+ 'false',
99
+ )
100
+ })
54
101
  })
55
102
  })
56
- describe('when clicked', () => {
103
+ describe('when there are no items', () => {
57
104
  beforeEach(() => {
58
- bottomGear.$el.find('#gear-button').click()
105
+ bottomGear = new BottomGear(core)
106
+ core.emit(Events.CORE_READY)
59
107
  })
60
- it('should open the gear menu', () => {
61
- expect(
62
- bottomGear.$el.find('#gear-options-wrapper').css('display'),
63
- ).not.toBe('none')
108
+ it('should render hidden', () => {
109
+ expect(bottomGear.$el.css('display')).toBe('none')
64
110
  })
65
- it('should trigger media control menu collapse', () => {
66
- expect(mediaControl.trigger).toHaveBeenCalledWith(
67
- ExtendedEvents.MEDIACONTROL_MENU_COLLAPSE,
68
- 'bottom_gear',
69
- )
111
+ it('should show button after item is added', () => {
112
+ bottomGear.addItem('test', null).html('<button>test</button>')
113
+ expect(bottomGear.$el.css('display')).not.toBe('none')
70
114
  })
71
115
  })
72
- describe('when clicked twice', () => {
73
- beforeEach(() => {
74
- bottomGear.$el.find('#gear-button').click()
116
+ describe('when container is clicked', () => {
117
+ beforeEach(async () => {
118
+ bottomGear = new BottomGear(core)
119
+ core.emit(Events.CORE_READY)
120
+ bottomGear
121
+ .addItem('test', $('<ul id="test-options"><li>Item</li></ul>'))
122
+ .html('<button id="test-button">test</button>')
75
123
  bottomGear.$el.find('#gear-button').click()
76
124
  })
77
- it('should collapse the gear menu', () => {
78
- expect(bottomGear.$el.find('#gear-options-wrapper').css('display')).toBe(
79
- 'none',
80
- )
125
+ describe('basically', () => {
126
+ beforeEach(async () => {
127
+ mediaControl.container.trigger(Events.CONTAINER_CLICK)
128
+ await new Promise((resolve) => setTimeout(resolve, 0))
129
+ })
130
+ it('should collapse the gear menu', () => {
131
+ expect(bottomGear.$el.find('#gear-options-wrapper').css('display')).toBe(
132
+ 'none',
133
+ )
134
+ expect(bottomGear.$el.find('#gear-button').attr('aria-expanded')).toBe(
135
+ 'false',
136
+ )
137
+ expect(bottomGear.$el.find('#test-options').css('display')).toBe('none')
138
+ })
139
+ })
140
+ describe('when submenu is open', () => {
141
+ beforeEach(async () => {
142
+ // bottomGear.$el.find('#test-submenu').click()
143
+ bottomGear.$el.find('#test-options').show(); // as if it was clicked
144
+ await new Promise((resolve) => setTimeout(resolve, 0))
145
+ mediaControl.container.trigger(Events.CONTAINER_CLICK)
146
+ })
147
+ it('should collapse it as well', () => {
148
+ expect(bottomGear.$el.find('#test-options').css('display')).toBe(
149
+ 'none',
150
+ )
151
+ expect(bottomGear.$el.find('#gear-options').css('display')).not.toBe(
152
+ 'none',
153
+ )
154
+ })
81
155
  })
82
156
  })
83
157
  })
@@ -1,11 +1,11 @@
1
1
  // Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
2
2
 
3
- exports[`BottomGear > should render 1`] = `
4
- "<button class="media-control-button gplayer-lite-btn gcore-skin-button-color gear-icon" id="gear-button">
3
+ exports[`BottomGear > basically > should render 1`] = `
4
+ "<button class="media-control-button gplayer-lite-btn gcore-skin-button-color gear-icon" id="gear-button" aria-expanded="false" aria-controls="gear-options">
5
5
  /assets/icons/new/gear.svg
6
6
  </button>
7
- <div class="gear-wrapper gcore-skin-bg-color" id="gear-options-wrapper" style="display:none">
8
- <ul class="gear-options-list" id="gear-options" role="menu"></ul>
7
+ <div class="gear-wrapper gcore-skin-bg-color" id="gear-options-wrapper" style="display: none;">
8
+ <ul class="gear-options-list" id="gear-options" role="menu"><li data-test=""><button>test</button></li></ul>
9
9
  </div>
10
10
  "
11
11
  `;
@@ -261,11 +261,9 @@ export class Thumbnails extends UICorePlugin {
261
261
  }
262
262
 
263
263
  private onMouseMoveSeekbar(_: MouseEvent, pos: number) {
264
- if (Math.abs(pos - this.hoverPosition) >= 0.01) {
265
- this.hoverPosition = pos
266
- this.showing = true
267
- this.update()
268
- }
264
+ this.hoverPosition = pos
265
+ this.showing = true
266
+ this.update()
269
267
  }
270
268
 
271
269
  private onMouseLeave() {
@@ -415,7 +413,6 @@ export class Thumbnails extends UICorePlugin {
415
413
  const thumbIndex = this.getThumbIndexForTime(hoverTime)
416
414
  const thumb = this.thumbs[thumbIndex]
417
415
 
418
- // update thumbnail
419
416
  const $spotlight = this.$el.find('#thumbnails-spotlight')
420
417
 
421
418
  this.buildThumbImage(
@@ -8,7 +8,7 @@ import { createMockCore, createMockMediaControl } from '../../../testUtils'
8
8
  import { Thumbnails } from '../Thumbnails'
9
9
  import { loadImageDimensions } from '../utils'
10
10
 
11
- import { Logger, LogTracer, setTracer } from '@gcorevideo/utils'
11
+ // import { Logger, LogTracer, setTracer } from '@gcorevideo/utils'
12
12
 
13
13
  // Logger.enable('*')
14
14
  // setTracer(new LogTracer('Thumbnails.test'))
@@ -30,11 +30,11 @@ describe('Thumbnails', () => {
30
30
  vtt: `
31
31
  1
32
32
  00:00:00.000 --> 00:00:01.000
33
- sprite.png#xywh=100,100,100,100
33
+ sprite.png#xywh=0,0,100,100
34
34
 
35
35
  2
36
36
  00:00:01.000 --> 00:00:02.000
37
- sprite.png#xywh=200,200,100,100
37
+ sprite.png#xywh=100,0,100,100
38
38
  `,
39
39
  },
40
40
  })
@@ -69,4 +69,21 @@ sprite.png#xywh=200,200,100,100
69
69
  expect(thumbnails.$el.hasClass('hidden')).toBe(true)
70
70
  })
71
71
  })
72
+ describe('update', () => {
73
+ describe('when mouse pointer is over the scrubber', () => {
74
+ beforeEach(async () => {
75
+ core.emit(Events.CORE_READY)
76
+ await new Promise(resolve => setTimeout(resolve, 1))
77
+ mediaControl.container.getDuration.mockReturnValue(5)
78
+ vi.spyOn(thumbnails.$el, 'width').mockReturnValue(300)
79
+ mediaControl.trigger(Events.MEDIACONTROL_MOUSEMOVE_SEEKBAR, {}, 0.5)
80
+ })
81
+ it('should show thumbnails', () => {
82
+ expect(thumbnails.$el.hasClass('hidden')).toBe(false)
83
+ })
84
+ it('should show the matching spotlight thumbnail', () => {
85
+ expect(thumbnails.$el.find('#thumbnails-spotlight .thumbnail-container').css('background-position')).toBe('-100px 0px')
86
+ })
87
+ })
88
+ })
72
89
  })
@@ -3,7 +3,7 @@
3
3
  exports[`Thumbnails > loading > should render 1`] = `
4
4
  "<div class="thumbnails-text" id="thumbnails-text"></div>
5
5
  <div class="backdrop" id="thumbnails-backdrop" style="height: 100px;">
6
- <div class="carousel" id="thumbnails-carousel"><div class="thumbnail-container" style="width: 100px; height: 100px; background-image: url(&quot;https://example.com/sprite.png&quot;); background-size: 600px 900px; background-position: -100px -100px;"></div><div class="thumbnail-container" style="width: 100px; height: 100px; background-image: url(&quot;https://example.com/sprite.png&quot;); background-size: 600px 900px; background-position: -200px -200px;"></div></div>
6
+ <div class="carousel" id="thumbnails-carousel"><div class="thumbnail-container" style="width: 100px; height: 100px; background-image: url(&quot;https://example.com/sprite.png&quot;); background-size: 600px 900px; background-position: 0px 0px;"></div><div class="thumbnail-container" style="width: 100px; height: 100px; background-image: url(&quot;https://example.com/sprite.png&quot;); background-size: 600px 900px; background-position: -100px 0px;"></div></div>
7
7
  </div>
8
8
  <div class="spotlight" id="thumbnails-spotlight" style="height: 100px;"></div>
9
9
  "
package/src/testUtils.ts CHANGED
@@ -98,6 +98,7 @@ export function createMockContainer(
98
98
  getDuration: vi.fn().mockReturnValue(0),
99
99
  getPlugin: vi.fn(),
100
100
  getPlaybackType: vi.fn(),
101
+ getStartTimeOffset: vi.fn().mockReturnValue(0),
101
102
  isDvrInUse: vi.fn().mockReturnValue(false),
102
103
  isDvrEnabled: vi.fn().mockReturnValue(false),
103
104
  isHighDefinitionInUse: vi.fn().mockReturnValue(false),
@@ -121,6 +122,8 @@ export function createMockMediaControl(core: any) {
121
122
  // @ts-ignore
122
123
  mediaControl.mount = vi.fn()
123
124
  // @ts-ignore
125
+ mediaControl.container = core.activeContainer
126
+ // @ts-ignore
124
127
  mediaControl.toggleElement = vi.fn()
125
128
  vi.spyOn(mediaControl, 'trigger')
126
129
  core.$el.append(mediaControl.$el)
@@ -1293,6 +1293,55 @@
1293
1293
  "isAbstract": false,
1294
1294
  "name": "enable"
1295
1295
  },
1296
+ {
1297
+ "kind": "Method",
1298
+ "canonicalReference": "@gcorevideo/player!Clips#getText:member(1)",
1299
+ "docComment": "/**\n * Get the text of the clip at the given time\n *\n * @param time - The time to get the text for\n *\n * @returns The text of the clip at the given time\n */\n",
1300
+ "excerptTokens": [
1301
+ {
1302
+ "kind": "Content",
1303
+ "text": "getText(time: "
1304
+ },
1305
+ {
1306
+ "kind": "Reference",
1307
+ "text": "TimeValue",
1308
+ "canonicalReference": "@gcorevideo/player!TimeValue:type"
1309
+ },
1310
+ {
1311
+ "kind": "Content",
1312
+ "text": "): "
1313
+ },
1314
+ {
1315
+ "kind": "Content",
1316
+ "text": "string | undefined"
1317
+ },
1318
+ {
1319
+ "kind": "Content",
1320
+ "text": ";"
1321
+ }
1322
+ ],
1323
+ "isStatic": false,
1324
+ "returnTypeTokenRange": {
1325
+ "startIndex": 3,
1326
+ "endIndex": 4
1327
+ },
1328
+ "releaseTag": "Beta",
1329
+ "isProtected": false,
1330
+ "overloadIndex": 1,
1331
+ "parameters": [
1332
+ {
1333
+ "parameterName": "time",
1334
+ "parameterTypeTokenRange": {
1335
+ "startIndex": 1,
1336
+ "endIndex": 2
1337
+ },
1338
+ "isOptional": false
1339
+ }
1340
+ ],
1341
+ "isOptional": false,
1342
+ "isAbstract": false,
1343
+ "name": "getText"
1344
+ },
1296
1345
  {
1297
1346
  "kind": "Method",
1298
1347
  "canonicalReference": "@gcorevideo/player!Clips#render:member(1)",
@@ -3459,72 +3508,6 @@
3459
3508
  "isProtected": false,
3460
3509
  "isAbstract": false
3461
3510
  },
3462
- {
3463
- "kind": "Method",
3464
- "canonicalReference": "@gcorevideo/player!MediaControl#putElement:member(1)",
3465
- "docComment": "/**\n * @deprecated\n *\n * Use {@link MediaControl.mount} instead\n *\n * @param name - \n *\n * @param element - \n */\n",
3466
- "excerptTokens": [
3467
- {
3468
- "kind": "Content",
3469
- "text": "putElement(name: "
3470
- },
3471
- {
3472
- "kind": "Reference",
3473
- "text": "MediaControlElement",
3474
- "canonicalReference": "@gcorevideo/player!MediaControlElement:type"
3475
- },
3476
- {
3477
- "kind": "Content",
3478
- "text": ", element: "
3479
- },
3480
- {
3481
- "kind": "Reference",
3482
- "text": "ZeptoResult",
3483
- "canonicalReference": "@gcorevideo/player!ZeptoResult:type"
3484
- },
3485
- {
3486
- "kind": "Content",
3487
- "text": "): "
3488
- },
3489
- {
3490
- "kind": "Content",
3491
- "text": "void"
3492
- },
3493
- {
3494
- "kind": "Content",
3495
- "text": ";"
3496
- }
3497
- ],
3498
- "isStatic": false,
3499
- "returnTypeTokenRange": {
3500
- "startIndex": 5,
3501
- "endIndex": 6
3502
- },
3503
- "releaseTag": "Beta",
3504
- "isProtected": false,
3505
- "overloadIndex": 1,
3506
- "parameters": [
3507
- {
3508
- "parameterName": "name",
3509
- "parameterTypeTokenRange": {
3510
- "startIndex": 1,
3511
- "endIndex": 2
3512
- },
3513
- "isOptional": false
3514
- },
3515
- {
3516
- "parameterName": "element",
3517
- "parameterTypeTokenRange": {
3518
- "startIndex": 3,
3519
- "endIndex": 4
3520
- },
3521
- "isOptional": false
3522
- }
3523
- ],
3524
- "isOptional": false,
3525
- "isAbstract": false,
3526
- "name": "putElement"
3527
- },
3528
3511
  {
3529
3512
  "kind": "Method",
3530
3513
  "canonicalReference": "@gcorevideo/player!MediaControl#setInitialVolume:member(1)",
@@ -6903,7 +6886,7 @@
6903
6886
  {
6904
6887
  "kind": "Class",
6905
6888
  "canonicalReference": "@gcorevideo/player!Poster:class",
6906
- "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",
6889
+ "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 or not yet started, the media control UI is disabled and hidden. Media control gets activated once the metadata is loaded after playback is initiated. This plugin displays a big play button on top of the poster image to allow user to start playback. 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 - {@link PosterPluginSettings}\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",
6907
6890
  "excerptTokens": [
6908
6891
  {
6909
6892
  "kind": "Content",
@@ -6994,6 +6977,32 @@
6994
6977
  },
6995
6978
  "implementsTokenRanges": []
6996
6979
  },
6980
+ {
6981
+ "kind": "TypeAlias",
6982
+ "canonicalReference": "@gcorevideo/player!PosterPluginSettings:type",
6983
+ "docComment": "",
6984
+ "excerptTokens": [
6985
+ {
6986
+ "kind": "Content",
6987
+ "text": "export type PosterPluginSettings = "
6988
+ },
6989
+ {
6990
+ "kind": "Content",
6991
+ "text": "{\n custom?: string;\n showForNoOp?: boolean;\n url?: string;\n showOnVideoEnd?: boolean;\n}"
6992
+ },
6993
+ {
6994
+ "kind": "Content",
6995
+ "text": ";"
6996
+ }
6997
+ ],
6998
+ "fileUrlPath": "src/plugins/poster/Poster.ts",
6999
+ "releaseTag": "Public",
7000
+ "name": "PosterPluginSettings",
7001
+ "typeTokenRange": {
7002
+ "startIndex": 1,
7003
+ "endIndex": 2
7004
+ }
7005
+ },
6997
7006
  {
6998
7007
  "kind": "Interface",
6999
7008
  "canonicalReference": "@gcorevideo/player!QualityLevel:interface",
@@ -8938,7 +8947,7 @@
8938
8947
  {
8939
8948
  "kind": "Class",
8940
8949
  "canonicalReference": "@gcorevideo/player!Thumbnails:class",
8941
- "docComment": "/**\n * `PLUGIN` that displays the thumbnails of the video when available.\n *\n * @example\n * ```ts\n * import { Thumbnails } from '@gcorevideo/player'\n *\n * Player.registerPlugin(Thumbnails)\n *\n * new Player({\n * thumbnails: {\n * backdropHeight: 200,\n * backdropMinOpacity: 0.9,\n * backdropMaxOpacity: 0.99,\n * spotlightHeight: 100,\n * vtt: '1\\n00:00:00,000 --> 00:00:10,000\\n3dk4NsRt6vWsffEr_sprite.jpg#xywh=0,0,100,56\\n\\n2\\n00:00:10,000 --> 00:00:20,000\\n3dk4NsRt6vWsffEr_sprite.jpg#xywh=100,0,100,56\\n\\n3\\n00:00:20,000 --> 00:00:30,000\\n3dk4NsRt6vWsffEr_sprite.jpg#xywh=200,0,100,56\\n\\n4\\n00:00:30,000 --> 00:00:40,000\\n3dk4NsRt6vWsffEr_sprite.jpg#xywh=300,0,100,56\\n\\n5\\n00:00:40,000 --> 00:00:50,000\\n3dk4NsRt6vWsffEr_sprite.jpg#xywh=400,0,100,56\\n\\n6\\n00:00:50,000 --> 00:01:00,000\\n3dk4NsRt6vWsffEr_sprite.jpg#xywh=500,0,100,56\\n\\n7\\n00:01:00,000 --> 00:01:10,000\\n3dk4NsRt6vWsffEr_sprite.jpg#xywh=600,0,100,56\\n\\n8\\n00:01:10,000 --> 00:01:20,000\\n3dk4NsRt6vWsffEr_sprite.jpg#xywh=0,56,100,56\\n\\n9\\n00:01:20,000 --> 00:01:30,000\\n3dk4NsRt6vWsffEr_sprite.jpg#xywh=100,56,100,56\\n\\n10\\n00:01:30,000 --> 00:01:40,000\\n3dk4NsRt6vWsffEr_sprite.jpg#xywh=200,56,100,56\\n\\n11\\n00:01:40,000 --> 00:01:50,000\\n3dk4NsRt6vWsffEr_sprite.jpg#xywh=300,56,100,56\\n\\n12\\n00:01:50,000 --> 00:02:00,000\\n3dk4NsRt6vWsffEr_sprite.jpg#xywh=400,56,100,56\\n\\n13\\n00:02:00,000 --> 00:02:10,000\\n3dk4NsRt6vWsffEr_sprite.jpg#xywh=500,56,100,56\\n\\n14\\n00:02:10,000 --> 00:02:20,000\\n3dk4NsRt6vWsffEr_sprite.jpg#xywh=600,56,100,56\\n\\n15\\n00:02:20,000 --> 00:02:30,000\\n3dk4NsRt6vWsffEr_sprite.jpg#xywh=0,112,100,56\\n\\n16\\n00:02:30,000 --> 00:02:40,000\\n3dk4NsRt6vWsffEr_sprite.jpg#xywh=100,112,100,56\\n\\n17\\n00:02:40,000 --> 00:02:50,000\\n3dk4NsRt6vWsffEr_sprite.jpg#xywh=200,112,100,56\\n\\n18\\n00:02:50,000 --> 00:03:00,000\\n3dk4NsRt6vWsffEr_sprite.jpg#xywh=300,112,100,56\\n\\n19\\n00:03:00,000 --> 00:03:10,000\\n3dk4NsRt6vWsffEr_sprite.jpg#xywh=400,112,100,56\\n\\n20\\n00:03:10,000 --> 00:03:20,000\\n3dk4NsRt6vWsffEr_sprite.jpg#xywh=500,112,100,56\\n\\n21\\n00:03:20,000 --> 00:03:30,000\\n3dk4NsRt6vWsffEr_sprite.jpg#xywh=600,112,100,56\\n\\n22\\n00:03:30,000 --> 00:03:40,000\\n3dk4NsRt6vWsffEr_sprite.jpg#xywh=0,168,100,56\\n\\n23\\n00:03:40,000 --> 00:03:50,000\\n3dk4NsRt6vWsffEr_sprite.jpg#xywh=100,168,100,56\\n\\n24\\n00:03:50,000 --> 00:04:00,000\\n3dk4NsRt6vWsffEr_sprite.jpg#xywh=200,168,100,56\\n\\n25\\n00:04:00,000 --> 00:04:10,000\\n3dk4NsRt6vWsffEr_sprite.jpg#xywh=300,168,100,56\\n\\n26\\n00:04:10,000 --> 00:04:20,000\\n3dk4NsRt6vWsffEr_sprite.jpg#xywh=400,168,100,56\\n\\n27\\n00:04:20,000 --> 00:04:30,000\\n3dk4NsRt6vWsffEr_sprite.jpg#xywh=500,168,100,56\\n\\n28\\n00:04:30,000 --> 00:04:40,000\\n3dk4NsRt6vWsffEr_sprite.jpg#xywh=600,168,100,56\\n\\n29\\n00:04:40,000 --> 00:04:50,000\\n3dk4NsRt6vWsffEr_sprite.jpg#xywh=0,224,100,56\\n\\n30\\n00:04:50,000 --> 00:05:00,000\\n3dk4NsRt6vWsffEr_sprite.jpg#xywh=100,224,100,56\\n\\n31\\n00:05:00,000 --> 00:05:10,000\\n3dk4NsRt6vWsffEr_sprite.jpg#xywh=200,224,100,56\\n\\n32\\n00:05:10,000 --> 00:05:20,000\\n3dk4NsRt6vWsffEr_sprite.jpg#xywh=300,224,100,56\\n\\n33\\n00:05:20,000 --> 00:05:30,000\\n3dk4NsRt6vWsffEr_sprite.jpg#xywh=400,224,100,56\\n\\n34\\n00:05:30,000 --> 00:05:40,000\\n3dk4NsRt6vWsffEr_sprite.jpg#xywh=500,224,100,56\\n\\n35\\n00:05:40,000 --> 00:05:50,000\\n3dk4NsRt6vWsffEr_sprite.jpg#xywh=600,224,100,56\\n\\n36\\n00:05:50,000 --> 00:06:00,000\\n3dk4NsRt6vWsffEr_sprite.jpg#xywh=0,280,100,56\\n\\n37\\n00:06:00,000 --> 00:06:10,000\\n3dk4NsRt6vWsffEr_sprite.jpg#xywh=100,280,100,56\\n\\n38\\n00:06:10,000 --> 00:06:20,000\\n3dk4NsRt6vWsffEr_sprite.jpg#xywh=200,280,100,56\\n\\n39\\n00:06:20,000 --> 00:06:30,000\\n3dk4NsRt6vWsffEr_sprite.jpg#xywh=300,280,100,56\\n\\n40\\n00:06:30,000 --> 00:06:40,000\\n3dk4NsRt6vWsffEr_sprite.jpg#xywh=400,280,100,56\\n\\n41\\n00:06:40,000 --> 00:06:50,000\\n3dk4NsRt6vWsffEr_sprite.jpg#xywh=500,280,100,56\\n\\n42\\n00:06:50,000 --> 00:07:00,000\\n3dk4NsRt6vWsffEr_sprite.jpg#xywh=600,280,100,56\\n\\n43\\n00:07:00,000 --> 00:07:10,000\\n3dk4NsRt6vWsffEr_sprite.jpg#xywh=0,336,100,56\\n\\n44\\n00:07:10,000 --> 00:07:20,000\\n3dk4NsRt6vWsffEr_sprite.jpg#xywh=100,336,100,56\\n\\n45\\n00:07:20,000 --> 00:07:30,000\\n3dk4NsRt6vWsffEr_sprite.jpg#xywh=200,336,100,56\\n\\n46\\n00:07:30,000 --> 00:07:40,000\\n3dk4NsRt6vWsffEr_sprite.jpg#xywh=300,336,100,56\\n\\n47\\n00:07:40,000 --> 00:07:50,000\\n3dk4NsRt6vWsffEr_sprite.jpg#xywh=400,336,100,56\\n\\n48\\n00:07:50,000 --> 00:08:00,000\\n3dk4NsRt6vWsffEr_sprite.jpg#xywh=500,336,100,56\\n\\n49\\n00:08:00,000 --> 00:08:10,000\\n3dk4NsRt6vWsffEr_sprite.jpg#xywh=600,336,100,56\\n',\n * sprite:\n * 'https://static.gvideo.co/videoplatform/sprites/2675/2452164_3dk4NsRt6vWsffEr.mp4_sprite.jpg',\n * },\n * })\n * ```\n *\n * @beta\n */\n",
8950
+ "docComment": "/**\n * `PLUGIN` that displays the thumbnails of the video when available.\n *\n * @remarks\n *\n * The plugin needs specially crafted VTT file with a thumbnail sprite sheet to work. The VTT consist of timestamp records followed by a thumbnail area\n *\n * Configuration options - {@link ThumbnailsPluginSettings}\n *\n * @example\n * ```ts\n * import { Thumbnails } from '@gcorevideo/player'\n *\n * Player.registerPlugin(Thumbnails)\n *\n * new Player({\n * thumbnails: {\n * backdropHeight: 200,\n * backdropMinOpacity: 0.9,\n * backdropMaxOpacity: 0.99,\n * spotlightHeight: 100,\n * vtt: '1\\n00:00:00,000 --> 00:00:10,000\\n3dk4NsRt6vWsffEr_sprite.jpg#xywh=0,0,100,56\\n\\n2\\n00:00:10,000 --> 00:00:20,000\\n3dk4NsRt6vWsffEr_sprite.jpg#xywh=100,0,100,56\\n\\n3\\n00:00:20,000 --> 00:00:30,000\\n3dk4NsRt6vWsffEr_sprite.jpg#xywh=200,0,100,56\\n\\n4\\n00:00:30,000 --> 00:00:40,000\\n3dk4NsRt6vWsffEr_sprite.jpg#xywh=300,0,100,56\\n\\n5\\n00:00:40,000 --> 00:00:50,000\\n3dk4NsRt6vWsffEr_sprite.jpg#xywh=400,0,100,56\\n\\n6\\n00:00:50,000 --> 00:01:00,000\\n3dk4NsRt6vWsffEr_sprite.jpg#xywh=500,0,100,56\\n\\n7\\n00:01:00,000 --> 00:01:10,000\\n3dk4NsRt6vWsffEr_sprite.jpg#xywh=600,0,100,56\\n\\n8\\n00:01:10,000 --> 00:01:20,000\\n3dk4NsRt6vWsffEr_sprite.jpg#xywh=0,56,100,56\\n\\n9\\n00:01:20,000 --> 00:01:30,000\\n3dk4NsRt6vWsffEr_sprite.jpg#xywh=100,56,100,56\\n\\n10\\n00:01:30,000 --> 00:01:40,000\\n3dk4NsRt6vWsffEr_sprite.jpg#xywh=200,56,100,56\\n\\n11\\n00:01:40,000 --> 00:01:50,000\\n3dk4NsRt6vWsffEr_sprite.jpg#xywh=300,56,100,56\\n\\n12\\n00:01:50,000 --> 00:02:00,000\\n3dk4NsRt6vWsffEr_sprite.jpg#xywh=400,56,100,56\\n\\n13\\n00:02:00,000 --> 00:02:10,000\\n3dk4NsRt6vWsffEr_sprite.jpg#xywh=500,56,100,56\\n\\n14\\n00:02:10,000 --> 00:02:20,000\\n3dk4NsRt6vWsffEr_sprite.jpg#xywh=600,56,100,56\\n\\n15\\n00:02:20,000 --> 00:02:30,000\\n3dk4NsRt6vWsffEr_sprite.jpg#xywh=0,112,100,56\\n\\n16\\n00:02:30,000 --> 00:02:40,000\\n3dk4NsRt6vWsffEr_sprite.jpg#xywh=100,112,100,56\\n\\n17\\n00:02:40,000 --> 00:02:50,000\\n3dk4NsRt6vWsffEr_sprite.jpg#xywh=200,112,100,56\\n\\n18\\n00:02:50,000 --> 00:03:00,000\\n3dk4NsRt6vWsffEr_sprite.jpg#xywh=300,112,100,56\\n\\n19\\n00:03:00,000 --> 00:03:10,000\\n3dk4NsRt6vWsffEr_sprite.jpg#xywh=400,112,100,56\\n\\n20\\n00:03:10,000 --> 00:03:20,000\\n3dk4NsRt6vWsffEr_sprite.jpg#xywh=500,112,100,56\\n\\n21\\n00:03:20,000 --> 00:03:30,000\\n3dk4NsRt6vWsffEr_sprite.jpg#xywh=600,112,100,56\\n\\n22\\n00:03:30,000 --> 00:03:40,000\\n3dk4NsRt6vWsffEr_sprite.jpg#xywh=0,168,100,56\\n\\n23\\n00:03:40,000 --> 00:03:50,000\\n3dk4NsRt6vWsffEr_sprite.jpg#xywh=100,168,100,56\\n\\n24\\n00:03:50,000 --> 00:04:00,000\\n3dk4NsRt6vWsffEr_sprite.jpg#xywh=200,168,100,56\\n\\n25\\n00:04:00,000 --> 00:04:10,000\\n3dk4NsRt6vWsffEr_sprite.jpg#xywh=300,168,100,56\\n\\n26\\n00:04:10,000 --> 00:04:20,000\\n3dk4NsRt6vWsffEr_sprite.jpg#xywh=400,168,100,56\\n\\n27\\n00:04:20,000 --> 00:04:30,000\\n3dk4NsRt6vWsffEr_sprite.jpg#xywh=500,168,100,56\\n\\n28\\n00:04:30,000 --> 00:04:40,000\\n3dk4NsRt6vWsffEr_sprite.jpg#xywh=600,168,100,56\\n\\n29\\n00:04:40,000 --> 00:04:50,000\\n3dk4NsRt6vWsffEr_sprite.jpg#xywh=0,224,100,56\\n\\n30\\n00:04:50,000 --> 00:05:00,000\\n3dk4NsRt6vWsffEr_sprite.jpg#xywh=100,224,100,56\\n\\n31\\n00:05:00,000 --> 00:05:10,000\\n3dk4NsRt6vWsffEr_sprite.jpg#xywh=200,224,100,56\\n\\n32\\n00:05:10,000 --> 00:05:20,000\\n3dk4NsRt6vWsffEr_sprite.jpg#xywh=300,224,100,56\\n\\n33\\n00:05:20,000 --> 00:05:30,000\\n3dk4NsRt6vWsffEr_sprite.jpg#xywh=400,224,100,56\\n\\n34\\n00:05:30,000 --> 00:05:40,000\\n3dk4NsRt6vWsffEr_sprite.jpg#xywh=500,224,100,56\\n\\n35\\n00:05:40,000 --> 00:05:50,000\\n3dk4NsRt6vWsffEr_sprite.jpg#xywh=600,224,100,56\\n\\n36\\n00:05:50,000 --> 00:06:00,000\\n3dk4NsRt6vWsffEr_sprite.jpg#xywh=0,280,100,56\\n\\n37\\n00:06:00,000 --> 00:06:10,000\\n3dk4NsRt6vWsffEr_sprite.jpg#xywh=100,280,100,56\\n\\n38\\n00:06:10,000 --> 00:06:20,000\\n3dk4NsRt6vWsffEr_sprite.jpg#xywh=200,280,100,56\\n\\n39\\n00:06:20,000 --> 00:06:30,000\\n3dk4NsRt6vWsffEr_sprite.jpg#xywh=300,280,100,56\\n\\n40\\n00:06:30,000 --> 00:06:40,000\\n3dk4NsRt6vWsffEr_sprite.jpg#xywh=400,280,100,56\\n\\n41\\n00:06:40,000 --> 00:06:50,000\\n3dk4NsRt6vWsffEr_sprite.jpg#xywh=500,280,100,56\\n\\n42\\n00:06:50,000 --> 00:07:00,000\\n3dk4NsRt6vWsffEr_sprite.jpg#xywh=600,280,100,56\\n\\n43\\n00:07:00,000 --> 00:07:10,000\\n3dk4NsRt6vWsffEr_sprite.jpg#xywh=0,336,100,56\\n\\n44\\n00:07:10,000 --> 00:07:20,000\\n3dk4NsRt6vWsffEr_sprite.jpg#xywh=100,336,100,56\\n\\n45\\n00:07:20,000 --> 00:07:30,000\\n3dk4NsRt6vWsffEr_sprite.jpg#xywh=200,336,100,56\\n\\n46\\n00:07:30,000 --> 00:07:40,000\\n3dk4NsRt6vWsffEr_sprite.jpg#xywh=300,336,100,56\\n\\n47\\n00:07:40,000 --> 00:07:50,000\\n3dk4NsRt6vWsffEr_sprite.jpg#xywh=400,336,100,56\\n\\n48\\n00:07:50,000 --> 00:08:00,000\\n3dk4NsRt6vWsffEr_sprite.jpg#xywh=500,336,100,56\\n\\n49\\n00:08:00,000 --> 00:08:10,000\\n3dk4NsRt6vWsffEr_sprite.jpg#xywh=600,336,100,56\\n',\n * sprite:\n * 'https://static.gvideo.co/videoplatform/sprites/2675/2452164_3dk4NsRt6vWsffEr.mp4_sprite.jpg',\n * },\n * })\n * ```\n *\n * @beta\n */\n",
8942
8951
  "excerptTokens": [
8943
8952
  {
8944
8953
  "kind": "Content",
@@ -8959,7 +8968,72 @@
8959
8968
  "isAbstract": false,
8960
8969
  "name": "Thumbnails",
8961
8970
  "preserveMemberOrder": false,
8962
- "members": [],
8971
+ "members": [
8972
+ {
8973
+ "kind": "Constructor",
8974
+ "canonicalReference": "@gcorevideo/player!Thumbnails:constructor(1)",
8975
+ "docComment": "/**\n * Constructs a new instance of the `Thumbnails` class\n */\n",
8976
+ "excerptTokens": [
8977
+ {
8978
+ "kind": "Content",
8979
+ "text": "constructor(core: "
8980
+ },
8981
+ {
8982
+ "kind": "Reference",
8983
+ "text": "Core",
8984
+ "canonicalReference": "@clappr/core!default:class"
8985
+ },
8986
+ {
8987
+ "kind": "Content",
8988
+ "text": ");"
8989
+ }
8990
+ ],
8991
+ "releaseTag": "Beta",
8992
+ "isProtected": false,
8993
+ "overloadIndex": 1,
8994
+ "parameters": [
8995
+ {
8996
+ "parameterName": "core",
8997
+ "parameterTypeTokenRange": {
8998
+ "startIndex": 1,
8999
+ "endIndex": 2
9000
+ },
9001
+ "isOptional": false
9002
+ }
9003
+ ]
9004
+ },
9005
+ {
9006
+ "kind": "Method",
9007
+ "canonicalReference": "@gcorevideo/player!Thumbnails#render:member(1)",
9008
+ "docComment": "",
9009
+ "excerptTokens": [
9010
+ {
9011
+ "kind": "Content",
9012
+ "text": "render(): "
9013
+ },
9014
+ {
9015
+ "kind": "Content",
9016
+ "text": "this"
9017
+ },
9018
+ {
9019
+ "kind": "Content",
9020
+ "text": ";"
9021
+ }
9022
+ ],
9023
+ "isStatic": false,
9024
+ "returnTypeTokenRange": {
9025
+ "startIndex": 1,
9026
+ "endIndex": 2
9027
+ },
9028
+ "releaseTag": "Beta",
9029
+ "isProtected": false,
9030
+ "overloadIndex": 1,
9031
+ "parameters": [],
9032
+ "isOptional": false,
9033
+ "isAbstract": false,
9034
+ "name": "render"
9035
+ }
9036
+ ],
8963
9037
  "extendsTokenRange": {
8964
9038
  "startIndex": 1,
8965
9039
  "endIndex": 2
@@ -8977,7 +9051,7 @@
8977
9051
  },
8978
9052
  {
8979
9053
  "kind": "Content",
8980
- "text": "{\n backdropHeight: number;\n backdropMaxOpacity: number;\n backdropMinOpacity: number;\n spotlightHeight: number;\n sprite: string;\n vtt: string;\n}"
9054
+ "text": "{\n backdropHeight?: number;\n backdropMaxOpacity?: number;\n backdropMinOpacity?: number;\n spotlightHeight?: number;\n sprite: string;\n vtt: string;\n}"
8981
9055
  },
8982
9056
  {
8983
9057
  "kind": "Content",