@gcorevideo/player 2.22.15 → 2.22.17

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 (124) hide show
  1. package/assets/clips/clips.ejs +1 -0
  2. package/assets/clips/clips.scss +23 -3
  3. package/assets/level-selector/list.ejs +9 -3
  4. package/assets/media-control/media-control.ejs +1 -9
  5. package/assets/media-control/media-control.scss +0 -25
  6. package/assets/media-control/width370.scss +4 -4
  7. package/dist/core.js +6 -8
  8. package/dist/index.css +855 -855
  9. package/dist/index.js +609 -664
  10. package/dist/player.d.ts +426 -302
  11. package/dist/plugins/index.css +551 -551
  12. package/dist/plugins/index.js +648 -703
  13. package/docs/api/{player.audioselector.md → player.audiotracks.md} +3 -3
  14. package/docs/api/player.clapprstats.exportmetrics.md +1 -1
  15. package/docs/api/player.clapprstats.md +5 -15
  16. package/docs/api/player.clapprstatssettings.md +13 -0
  17. package/docs/api/{player.contextmenupluginsettings.preventshowcontextmenu.md → player.clips.destroy.md} +7 -3
  18. package/docs/api/{player.contextmenupluginsettings.label.md → player.clips.disable.md} +7 -3
  19. package/docs/api/player.clips.enable.md +18 -0
  20. package/docs/api/player.clips.md +170 -0
  21. package/docs/api/player.clips.render.md +18 -0
  22. package/docs/api/player.clips.supportedversion.md +16 -0
  23. package/docs/api/player.clips.version.md +14 -0
  24. package/docs/api/player.clipspluginsettings.md +2 -2
  25. package/docs/api/player.clipspluginsettings.text.md +1 -1
  26. package/docs/api/player.contextmenu.md +2 -0
  27. package/docs/api/player.contextmenupluginsettings.md +2 -40
  28. package/docs/api/{player.contextmenupluginsettings.url.md → player.contextmenupluginsettings.options.md} +3 -3
  29. package/docs/api/player.md +101 -37
  30. package/docs/api/player.mediacontrol.md +9 -15
  31. package/docs/api/{player.mediacontrol.getelement.md → player.mediacontrol.mount.md} +20 -7
  32. package/docs/api/player.mediacontrolelement.md +4 -2
  33. package/docs/api/player.mediacontrollayerelement.md +16 -0
  34. package/docs/api/player.mediacontrolleftelement.md +16 -0
  35. package/docs/api/player.mediacontrolrightelement.md +16 -0
  36. package/docs/api/player.mediacontrolsettings.md +23 -0
  37. package/docs/api/player.menuoption.md +21 -0
  38. package/docs/api/{player.clapprnerdstats._constructor_.md → player.nerdstats._constructor_.md} +3 -3
  39. package/docs/api/{player.clapprnerdstats.md → player.nerdstats.md} +5 -5
  40. package/docs/api/player.playbackrate.md +1 -1
  41. package/docs/api/player.playerconfig.md +1 -1
  42. package/docs/api/player.playerconfig.playbacktype.md +1 -1
  43. package/docs/api/player.qualitylevel.height.md +1 -1
  44. package/docs/api/player.qualitylevel.level.md +1 -1
  45. package/docs/api/player.qualitylevel.md +4 -4
  46. package/docs/api/player.qualitylevel.width.md +1 -1
  47. package/docs/api/{player.levelselector.events.md → player.qualitylevels.events.md} +2 -2
  48. package/docs/api/{player.levelselector.md → player.qualitylevels.md} +6 -6
  49. package/docs/api/{player.levelselectorpluginsettings.labels.md → player.qualitylevelspluginsettings.labels.md} +2 -2
  50. package/docs/api/{player.levelselectorpluginsettings.md → player.qualitylevelspluginsettings.md} +6 -6
  51. package/docs/api/{player.levelselectorpluginsettings.restrictresolution.md → player.qualitylevelspluginsettings.restrictresolution.md} +2 -2
  52. package/docs/api/player.timeposition.current.md +1 -1
  53. package/docs/api/player.timeposition.md +2 -2
  54. package/docs/api/player.timeposition.total.md +1 -1
  55. package/docs/api/player.timeprogress.md +6 -4
  56. package/docs/api/player.timevalue.md +1 -1
  57. package/lib/index.plugins.d.ts +2 -1
  58. package/lib/index.plugins.d.ts.map +1 -1
  59. package/lib/index.plugins.js +2 -1
  60. package/lib/playback/dash-playback/DashPlayback.d.ts.map +1 -1
  61. package/lib/playback/dash-playback/DashPlayback.js +5 -7
  62. package/lib/playback.types.d.ts +22 -9
  63. package/lib/playback.types.d.ts.map +1 -1
  64. package/lib/plugins/clappr-nerd-stats/ClapprNerdStats.d.ts +4 -0
  65. package/lib/plugins/clappr-nerd-stats/ClapprNerdStats.d.ts.map +1 -1
  66. package/lib/plugins/clappr-nerd-stats/ClapprNerdStats.js +20 -23
  67. package/lib/plugins/clappr-nerd-stats/NerdStats.d.ts +83 -0
  68. package/lib/plugins/clappr-nerd-stats/NerdStats.d.ts.map +1 -0
  69. package/lib/plugins/clappr-nerd-stats/NerdStats.js +339 -0
  70. package/lib/plugins/clappr-stats/ClapprStats.d.ts +27 -32
  71. package/lib/plugins/clappr-stats/ClapprStats.d.ts.map +1 -1
  72. package/lib/plugins/clappr-stats/ClapprStats.js +94 -202
  73. package/lib/plugins/clappr-stats/types.d.ts +65 -24
  74. package/lib/plugins/clappr-stats/types.d.ts.map +1 -1
  75. package/lib/plugins/clappr-stats/types.js +37 -2
  76. package/lib/plugins/clappr-stats/utils.d.ts.map +1 -1
  77. package/lib/plugins/clappr-stats/utils.js +1 -2
  78. package/lib/plugins/clips/Clips.d.ts +21 -16
  79. package/lib/plugins/clips/Clips.d.ts.map +1 -1
  80. package/lib/plugins/clips/Clips.js +96 -98
  81. package/lib/plugins/clips/types.d.ts +19 -0
  82. package/lib/plugins/clips/types.d.ts.map +1 -0
  83. package/lib/plugins/clips/types.js +1 -0
  84. package/lib/plugins/clips/utils.d.ts +4 -0
  85. package/lib/plugins/clips/utils.d.ts.map +1 -0
  86. package/lib/plugins/clips/utils.js +36 -0
  87. package/lib/plugins/media-control/MediaControl.d.ts +4 -7
  88. package/lib/plugins/media-control/MediaControl.d.ts.map +1 -1
  89. package/lib/plugins/media-control/MediaControl.js +19 -31
  90. package/lib/plugins/utils.d.ts +9 -1
  91. package/lib/plugins/utils.d.ts.map +1 -1
  92. package/lib/plugins/utils.js +9 -10
  93. package/lib/plugins/vast-ads/loaderxml.js +2 -2
  94. package/lib/testUtils.d.ts +2 -1
  95. package/lib/testUtils.d.ts.map +1 -1
  96. package/lib/testUtils.js +5 -7
  97. package/package.json +1 -1
  98. package/src/index.plugins.ts +2 -1
  99. package/src/playback/dash-playback/DashPlayback.ts +5 -8
  100. package/src/playback.types.ts +23 -8
  101. package/src/plugins/clappr-nerd-stats/{ClapprNerdStats.ts → NerdStats.ts} +25 -30
  102. package/src/plugins/clappr-stats/ClapprStats.ts +242 -306
  103. package/src/plugins/clappr-stats/__tests__/ClapprStats.test.ts +133 -0
  104. package/src/plugins/clappr-stats/types.ts +72 -25
  105. package/src/plugins/clappr-stats/utils.ts +1 -2
  106. package/src/plugins/clips/Clips.ts +116 -135
  107. package/src/plugins/clips/__tests__/Clips.test.ts +72 -0
  108. package/src/plugins/clips/__tests__/__snapshots__/Clips.test.ts.snap +14 -0
  109. package/src/plugins/clips/types.ts +22 -0
  110. package/src/plugins/clips/utils.ts +54 -0
  111. package/src/plugins/error-screen/__tests__/ErrorScreen.test.ts +3 -4
  112. package/src/plugins/level-selector/__tests__/__snapshots__/QualityLevels.test.ts.snap +18 -18
  113. package/src/plugins/media-control/MediaControl.ts +31 -58
  114. package/src/plugins/media-control/__tests__/__snapshots__/MediaControl.test.ts.snap +7 -35
  115. package/src/plugins/subtitles/__tests__/ClosedCaptions.test.ts +1 -0
  116. package/src/plugins/utils.ts +9 -7
  117. package/src/plugins/vast-ads/loaderxml.ts +2 -2
  118. package/src/testUtils.ts +5 -7
  119. package/temp/player.api.json +693 -471
  120. package/tsconfig.tsbuildinfo +1 -1
  121. package/docs/api/player.clapprstats.setupdatemetrics.md +0 -56
  122. package/docs/api/player.clipsplugin.gettext.md +0 -58
  123. package/docs/api/player.clipsplugin.md +0 -59
  124. package/docs/api/player.mediacontrol.handlecustomarea.md +0 -52
@@ -1,8 +1,8 @@
1
1
  <!-- Do not edit this file. It is automatically generated by API Documenter. -->
2
2
 
3
- [Home](./index.md) &gt; [@gcorevideo/player](./player.md) &gt; [AudioSelector](./player.audioselector.md)
3
+ [Home](./index.md) &gt; [@gcorevideo/player](./player.md) &gt; [AudioTracks](./player.audiotracks.md)
4
4
 
5
- ## AudioSelector class
5
+ ## AudioTracks class
6
6
 
7
7
  > This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
8
8
  >
@@ -12,7 +12,7 @@
12
12
  **Signature:**
13
13
 
14
14
  ```typescript
15
- export declare class AudioSelector extends UICorePlugin
15
+ export declare class AudioTracks extends UICorePlugin
16
16
  ```
17
17
  **Extends:** UICorePlugin
18
18
 
@@ -18,5 +18,5 @@ exportMetrics(): Metrics;
18
18
 
19
19
  Metrics
20
20
 
21
- Currently collected metrics
21
+ Measurements collected so far
22
22
 
@@ -7,7 +7,7 @@
7
7
  > This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
8
8
  >
9
9
 
10
- `PLUGIN` that collects useful statistics about playback performance.
10
+ `PLUGIN` that measures data about playback, which can be useful for analyzing performance and UX.
11
11
 
12
12
  **Signature:**
13
13
 
@@ -20,6 +20,10 @@ export declare class ClapprStats extends ContainerPlugin
20
20
 
21
21
  This plugin does not render anything and is supposed to be extended or used together with other plugins that actually render something.
22
22
 
23
+ Configuration options - [ClapprStatsSettings](./player.clapprstatssettings.md)
24
+
25
+ Events -
26
+
23
27
  ## Constructors
24
28
 
25
29
  <table><thead><tr><th>
@@ -85,19 +89,5 @@ Description
85
89
  **_(BETA)_** Returns the collected metrics.
86
90
 
87
91
 
88
- </td></tr>
89
- <tr><td>
90
-
91
- [setUpdateMetrics(updateMetricsFn)](./player.clapprstats.setupdatemetrics.md)
92
-
93
-
94
- </td><td>
95
-
96
-
97
- </td><td>
98
-
99
- **_(BETA)_** Registers a callback to receive the metrics.
100
-
101
-
102
92
  </td></tr>
103
93
  </tbody></table>
@@ -0,0 +1,13 @@
1
+ <!-- Do not edit this file. It is automatically generated by API Documenter. -->
2
+
3
+ [Home](./index.md) &gt; [@gcorevideo/player](./player.md) &gt; [ClapprStatsSettings](./player.clapprstatssettings.md)
4
+
5
+ ## ClapprStatsSettings type
6
+
7
+ **Signature:**
8
+
9
+ ```typescript
10
+ export type ClapprStatsSettings = {
11
+ runEach?: number;
12
+ };
13
+ ```
@@ -1,8 +1,8 @@
1
1
  <!-- Do not edit this file. It is automatically generated by API Documenter. -->
2
2
 
3
- [Home](./index.md) &gt; [@gcorevideo/player](./player.md) &gt; [ContextMenuPluginSettings](./player.contextmenupluginsettings.md) &gt; [preventShowContextMenu](./player.contextmenupluginsettings.preventshowcontextmenu.md)
3
+ [Home](./index.md) &gt; [@gcorevideo/player](./player.md) &gt; [Clips](./player.clips.md) &gt; [destroy](./player.clips.destroy.md)
4
4
 
5
- ## ContextMenuPluginSettings.preventShowContextMenu property
5
+ ## Clips.destroy() method
6
6
 
7
7
  > This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
8
8
  >
@@ -10,5 +10,9 @@
10
10
  **Signature:**
11
11
 
12
12
  ```typescript
13
- preventShowContextMenu?: boolean;
13
+ destroy(): import("@clappr/core").UIObject;
14
14
  ```
15
+ **Returns:**
16
+
17
+ import("@clappr/core").UIObject
18
+
@@ -1,8 +1,8 @@
1
1
  <!-- Do not edit this file. It is automatically generated by API Documenter. -->
2
2
 
3
- [Home](./index.md) &gt; [@gcorevideo/player](./player.md) &gt; [ContextMenuPluginSettings](./player.contextmenupluginsettings.md) &gt; [label](./player.contextmenupluginsettings.label.md)
3
+ [Home](./index.md) &gt; [@gcorevideo/player](./player.md) &gt; [Clips](./player.clips.md) &gt; [disable](./player.clips.disable.md)
4
4
 
5
- ## ContextMenuPluginSettings.label property
5
+ ## Clips.disable() method
6
6
 
7
7
  > This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
8
8
  >
@@ -10,5 +10,9 @@
10
10
  **Signature:**
11
11
 
12
12
  ```typescript
13
- label?: string;
13
+ disable(): void;
14
14
  ```
15
+ **Returns:**
16
+
17
+ void
18
+
@@ -0,0 +1,18 @@
1
+ <!-- Do not edit this file. It is automatically generated by API Documenter. -->
2
+
3
+ [Home](./index.md) &gt; [@gcorevideo/player](./player.md) &gt; [Clips](./player.clips.md) &gt; [enable](./player.clips.enable.md)
4
+
5
+ ## Clips.enable() method
6
+
7
+ > This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
8
+ >
9
+
10
+ **Signature:**
11
+
12
+ ```typescript
13
+ enable(): void;
14
+ ```
15
+ **Returns:**
16
+
17
+ void
18
+
@@ -0,0 +1,170 @@
1
+ <!-- Do not edit this file. It is automatically generated by API Documenter. -->
2
+
3
+ [Home](./index.md) &gt; [@gcorevideo/player](./player.md) &gt; [Clips](./player.clips.md)
4
+
5
+ ## Clips class
6
+
7
+ > This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
8
+ >
9
+
10
+ `PLUGIN` that allows marking up the timeline of the video
11
+
12
+ **Signature:**
13
+
14
+ ```typescript
15
+ export declare class Clips extends UICorePlugin
16
+ ```
17
+ **Extends:** UICorePlugin
18
+
19
+ ## Remarks
20
+
21
+ The plugin decorates the seekbar with notches to indicate the clips of the video and displays current clip text in the left panel
22
+
23
+ Depends on:
24
+
25
+ - [MediaControl](./player.mediacontrol.md)
26
+
27
+ Configuration options - [ClipsPluginSettings](./player.clipspluginsettings.md)
28
+
29
+ ## Properties
30
+
31
+ <table><thead><tr><th>
32
+
33
+ Property
34
+
35
+
36
+ </th><th>
37
+
38
+ Modifiers
39
+
40
+
41
+ </th><th>
42
+
43
+ Type
44
+
45
+
46
+ </th><th>
47
+
48
+ Description
49
+
50
+
51
+ </th></tr></thead>
52
+ <tbody><tr><td>
53
+
54
+ [supportedVersion](./player.clips.supportedversion.md)
55
+
56
+
57
+ </td><td>
58
+
59
+ `readonly`
60
+
61
+
62
+ </td><td>
63
+
64
+ { min: string; }
65
+
66
+
67
+ </td><td>
68
+
69
+ **_(BETA)_**
70
+
71
+
72
+ </td></tr>
73
+ <tr><td>
74
+
75
+ [version](./player.clips.version.md)
76
+
77
+
78
+ </td><td>
79
+
80
+ `readonly`
81
+
82
+
83
+ </td><td>
84
+
85
+ string
86
+
87
+
88
+ </td><td>
89
+
90
+ **_(BETA)_**
91
+
92
+
93
+ </td></tr>
94
+ </tbody></table>
95
+
96
+ ## Methods
97
+
98
+ <table><thead><tr><th>
99
+
100
+ Method
101
+
102
+
103
+ </th><th>
104
+
105
+ Modifiers
106
+
107
+
108
+ </th><th>
109
+
110
+ Description
111
+
112
+
113
+ </th></tr></thead>
114
+ <tbody><tr><td>
115
+
116
+ [destroy()](./player.clips.destroy.md)
117
+
118
+
119
+ </td><td>
120
+
121
+
122
+ </td><td>
123
+
124
+ **_(BETA)_**
125
+
126
+
127
+ </td></tr>
128
+ <tr><td>
129
+
130
+ [disable()](./player.clips.disable.md)
131
+
132
+
133
+ </td><td>
134
+
135
+
136
+ </td><td>
137
+
138
+ **_(BETA)_**
139
+
140
+
141
+ </td></tr>
142
+ <tr><td>
143
+
144
+ [enable()](./player.clips.enable.md)
145
+
146
+
147
+ </td><td>
148
+
149
+
150
+ </td><td>
151
+
152
+ **_(BETA)_**
153
+
154
+
155
+ </td></tr>
156
+ <tr><td>
157
+
158
+ [render()](./player.clips.render.md)
159
+
160
+
161
+ </td><td>
162
+
163
+
164
+ </td><td>
165
+
166
+ **_(BETA)_**
167
+
168
+
169
+ </td></tr>
170
+ </tbody></table>
@@ -0,0 +1,18 @@
1
+ <!-- Do not edit this file. It is automatically generated by API Documenter. -->
2
+
3
+ [Home](./index.md) &gt; [@gcorevideo/player](./player.md) &gt; [Clips](./player.clips.md) &gt; [render](./player.clips.render.md)
4
+
5
+ ## Clips.render() method
6
+
7
+ > This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
8
+ >
9
+
10
+ **Signature:**
11
+
12
+ ```typescript
13
+ render(): this;
14
+ ```
15
+ **Returns:**
16
+
17
+ this
18
+
@@ -0,0 +1,16 @@
1
+ <!-- Do not edit this file. It is automatically generated by API Documenter. -->
2
+
3
+ [Home](./index.md) &gt; [@gcorevideo/player](./player.md) &gt; [Clips](./player.clips.md) &gt; [supportedVersion](./player.clips.supportedversion.md)
4
+
5
+ ## Clips.supportedVersion property
6
+
7
+ > This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
8
+ >
9
+
10
+ **Signature:**
11
+
12
+ ```typescript
13
+ get supportedVersion(): {
14
+ min: string;
15
+ };
16
+ ```
@@ -0,0 +1,14 @@
1
+ <!-- Do not edit this file. It is automatically generated by API Documenter. -->
2
+
3
+ [Home](./index.md) &gt; [@gcorevideo/player](./player.md) &gt; [Clips](./player.clips.md) &gt; [version](./player.clips.version.md)
4
+
5
+ ## Clips.version property
6
+
7
+ > This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
8
+ >
9
+
10
+ **Signature:**
11
+
12
+ ```typescript
13
+ get version(): string;
14
+ ```
@@ -7,7 +7,7 @@
7
7
  > This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
8
8
  >
9
9
 
10
- Configuration options for the [clips](./player.clipsplugin.md) plugin.
10
+ Configuration options for the plugin.
11
11
 
12
12
  **Signature:**
13
13
 
@@ -53,7 +53,7 @@ string
53
53
 
54
54
  </td><td>
55
55
 
56
- **_(BETA)_** The text to display over the seekbar.
56
+ **_(BETA)_** The compiled text of the clips description, one clip per line in format : `HH:MM:SS text` or `MM:SS text` or `SS text`
57
57
 
58
58
 
59
59
  </td></tr>
@@ -7,7 +7,7 @@
7
7
  > This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
8
8
  >
9
9
 
10
- The text to display over the seekbar.
10
+ The compiled text of the clips description, one clip per line in format : `HH:MM:SS text` or `MM:SS text` or `SS text`
11
11
 
12
12
  **Signature:**
13
13
 
@@ -20,6 +20,8 @@ export declare class ContextMenu extends UIContainerPlugin
20
20
 
21
21
  Configuration options - [ContextMenuPluginSettings](./player.contextmenupluginsettings.md)
22
22
 
23
+ Should not be used together with [ClickToPause](./player.clicktopause.md) plugin
24
+
23
25
  ## Constructors
24
26
 
25
27
  <table><thead><tr><th>
@@ -40,7 +40,7 @@ Description
40
40
  </th></tr></thead>
41
41
  <tbody><tr><td>
42
42
 
43
- [label?](./player.contextmenupluginsettings.label.md)
43
+ [options?](./player.contextmenupluginsettings.options.md)
44
44
 
45
45
 
46
46
  </td><td>
@@ -48,45 +48,7 @@ Description
48
48
 
49
49
  </td><td>
50
50
 
51
- string
52
-
53
-
54
- </td><td>
55
-
56
- **_(BETA)_** _(Optional)_
57
-
58
-
59
- </td></tr>
60
- <tr><td>
61
-
62
- [preventShowContextMenu?](./player.contextmenupluginsettings.preventshowcontextmenu.md)
63
-
64
-
65
- </td><td>
66
-
67
-
68
- </td><td>
69
-
70
- boolean
71
-
72
-
73
- </td><td>
74
-
75
- **_(BETA)_** _(Optional)_
76
-
77
-
78
- </td></tr>
79
- <tr><td>
80
-
81
- [url?](./player.contextmenupluginsettings.url.md)
82
-
83
-
84
- </td><td>
85
-
86
-
87
- </td><td>
88
-
89
- string
51
+ [MenuOption](./player.menuoption.md)<!-- -->\[\]
90
52
 
91
53
 
92
54
  </td><td>
@@ -1,8 +1,8 @@
1
1
  <!-- Do not edit this file. It is automatically generated by API Documenter. -->
2
2
 
3
- [Home](./index.md) &gt; [@gcorevideo/player](./player.md) &gt; [ContextMenuPluginSettings](./player.contextmenupluginsettings.md) &gt; [url](./player.contextmenupluginsettings.url.md)
3
+ [Home](./index.md) &gt; [@gcorevideo/player](./player.md) &gt; [ContextMenuPluginSettings](./player.contextmenupluginsettings.md) &gt; [options](./player.contextmenupluginsettings.options.md)
4
4
 
5
- ## ContextMenuPluginSettings.url property
5
+ ## ContextMenuPluginSettings.options property
6
6
 
7
7
  > This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
8
8
  >
@@ -10,5 +10,5 @@
10
10
  **Signature:**
11
11
 
12
12
  ```typescript
13
- url?: string;
13
+ options?: MenuOption[];
14
14
  ```