@annoto/widget-api 3.65.0 → 3.66.0
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/CHANGELOG.md +19 -0
- package/dist/build/config/hooks.d.ts +3 -5
- package/dist/build/config/hooks.d.ts.map +1 -1
- package/dist/build/player-adapter/controls-descriptor.d.ts +1 -1
- package/dist/build/player-adapter/index.d.ts +43 -43
- package/dist/build/util.d.ts.map +1 -1
- package/dist/build_esm/config/hooks.d.ts +3 -5
- package/dist/build_esm/config/hooks.d.ts.map +1 -1
- package/dist/build_esm/player-adapter/controls-descriptor.d.ts +1 -1
- package/dist/build_esm/player-adapter/index.d.ts +43 -43
- package/dist/build_esm/util.d.ts.map +1 -1
- package/dist/tsconfig.module.tsbuildinfo +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,25 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
# [3.66.0](https://github.com/Annoto/annoto/compare/v3.66.0-alpha.0...v3.66.0) (2025-07-13)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @annoto/widget-api
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
# [3.66.0-alpha.0](https://github.com/Annoto/annoto/compare/v3.65.1...v3.66.0-alpha.0) (2025-07-09)
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
### Features
|
|
18
|
+
|
|
19
|
+
* update dependencies ([#432](https://github.com/Annoto/annoto/issues/432)) ([5aeece3](https://github.com/Annoto/annoto/commit/5aeece30f7aa343dd83e689f317cf2cb57e08bf9))
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
|
|
6
25
|
# [3.65.0](https://github.com/Annoto/annoto/compare/v3.65.0-alpha.2...v3.65.0) (2025-07-06)
|
|
7
26
|
|
|
8
27
|
**Note:** Version bump only for package @annoto/widget-api
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { IConfig } from '.';
|
|
2
|
-
import { IMediaDetails } from './media-details';
|
|
1
|
+
import { IConfig, IMediaDetails } from '.';
|
|
3
2
|
/**
|
|
4
3
|
* Callback hooks for triggering actions such as auth and getting info
|
|
5
4
|
*/
|
|
@@ -22,7 +21,7 @@ export interface IHooks {
|
|
|
22
21
|
/**
|
|
23
22
|
* Callback that allows to enrich details about the played media.
|
|
24
23
|
* If provided the function is called by the widget to obtain additional details about the media.
|
|
25
|
-
* @param
|
|
24
|
+
* @param params media details obtained from the player
|
|
26
25
|
* @returns additional details about the played media, such as title
|
|
27
26
|
*/
|
|
28
27
|
mediaDetails?(params: {
|
|
@@ -52,8 +51,7 @@ export interface IHooks {
|
|
|
52
51
|
/**
|
|
53
52
|
* Url to the video page and specific playback time of currentTime.
|
|
54
53
|
* If provided will be used by annoto for email notifications, in the dashboard, etc.
|
|
55
|
-
* @param
|
|
56
|
-
* @param mediaSrc the media source of the player
|
|
54
|
+
* @param params current playback time of the player in seconds and media source of the player
|
|
57
55
|
*/
|
|
58
56
|
getMediaDeepLinkUrl?(params: {
|
|
59
57
|
widgetIndex: number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hooks.d.ts","sourceRoot":"","sources":["../../../lib/config/hooks.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"hooks.d.ts","sourceRoot":"","sources":["../../../lib/config/hooks.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,aAAa,EAAE,MAAM,GAAG,CAAC;AAE3C;;GAEG;AACH,MAAM,WAAW,MAAM;IACnB;;;;;;;;;OASG;IACH,KAAK,CAAC,CAAC,MAAM,EAAE;QACX,WAAW,EAAE,MAAM,CAAC;QACpB,MAAM,E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
|
7
|
+
* The parameters describe behavior of the player controls
|
|
8
8
|
* It is used as default controls parameters for correct timeline behavior in overlay
|
|
9
9
|
* and in full screen mode.
|
|
10
10
|
*/
|
|
@@ -24,11 +24,11 @@ export interface ICaptureUIEventCallbackParams {
|
|
|
24
24
|
eventCanceledCb?: () => void;
|
|
25
25
|
}
|
|
26
26
|
/**
|
|
27
|
-
*
|
|
27
|
+
* Annoto Player Adaptor API
|
|
28
28
|
*/
|
|
29
29
|
export interface IPlayerAdaptorApi {
|
|
30
30
|
/**
|
|
31
|
-
*
|
|
31
|
+
* This method is called by Annoto as the first method.
|
|
32
32
|
* Use it to configure the player interface object.
|
|
33
33
|
* If the method returns false, Annoto will retry a number of times with fixed
|
|
34
34
|
* period of time between the retries.
|
|
@@ -42,42 +42,42 @@ export interface IPlayerAdaptorApi {
|
|
|
42
42
|
*/
|
|
43
43
|
init(element: Element, params?: any): boolean | Promise<boolean>;
|
|
44
44
|
/**
|
|
45
|
-
*
|
|
45
|
+
* (OPTIONAL) called by Annoto to release resources when the widget is closing.
|
|
46
46
|
* NOTICE: Although optional this method is highly recommended if you use Annoto API
|
|
47
47
|
* to dynamically load and close the widget.
|
|
48
48
|
* The adaptor implementation should discard the events that were regsitered using the onReady, onPlay, etc. when remove() is called.
|
|
49
49
|
*/
|
|
50
50
|
remove?(): void | Promise<void>;
|
|
51
51
|
/**
|
|
52
|
-
*
|
|
52
|
+
* Start playing the media
|
|
53
53
|
*/
|
|
54
54
|
play(): void | Promise<void>;
|
|
55
55
|
/**
|
|
56
|
-
*
|
|
56
|
+
* Pause the media
|
|
57
57
|
*/
|
|
58
58
|
pause(): void | Promise<void>;
|
|
59
59
|
/**
|
|
60
|
-
*
|
|
60
|
+
* set default text track (captions/subtitles) if available.
|
|
61
61
|
*/
|
|
62
62
|
setDefaultTextTrack?(textTrack?: ITextTrack): void | Promise<void>;
|
|
63
63
|
/**
|
|
64
|
-
*
|
|
64
|
+
* Set the media current time of track (skip/seek to time of the track)
|
|
65
65
|
* @param time - in seconds
|
|
66
66
|
*/
|
|
67
67
|
setCurrentTime(time: number): void | Promise<void>;
|
|
68
68
|
/**
|
|
69
|
-
*
|
|
69
|
+
* (OPTIONAL) Return if the media is a live stream or a VOD.
|
|
70
70
|
* NOTE: if the method is not implemented VOD is assumed.
|
|
71
71
|
* @returns {boolean | Promise<boolean>}
|
|
72
72
|
*/
|
|
73
73
|
isLive?(): boolean | Promise<boolean>;
|
|
74
74
|
/**
|
|
75
|
-
*
|
|
75
|
+
* Get time of current playback position.
|
|
76
76
|
* @returns {Number | Promise<number>} - in seconds. Preferred Floating point precision.
|
|
77
77
|
*/
|
|
78
78
|
currentTime(): number | Promise<number>;
|
|
79
79
|
/**
|
|
80
|
-
*
|
|
80
|
+
* Get the total media track duration in seconds
|
|
81
81
|
* 0 or NaN or 'undefined' values may be returned until media is ready.
|
|
82
82
|
* Note: For live video for best experience return the latest known duration of the stream.
|
|
83
83
|
* (for DVR enabled live stream, it can defer from currentTime)
|
|
@@ -85,38 +85,38 @@ export interface IPlayerAdaptorApi {
|
|
|
85
85
|
*/
|
|
86
86
|
duration(): number | Promise<number>;
|
|
87
87
|
/**
|
|
88
|
-
*
|
|
88
|
+
* Get player playback state (playing or paused)
|
|
89
89
|
* @returns {boolean | Promise<boolean>} - true if pause, false if playing
|
|
90
90
|
*/
|
|
91
91
|
paused(): boolean | Promise<boolean>;
|
|
92
92
|
/**
|
|
93
|
-
*
|
|
93
|
+
* Get currently played media source. The returned value, identifies
|
|
94
94
|
* the current video and must be unique. It can be a full URL or an unique identifier.
|
|
95
95
|
* Notice: this value can be overriden by hooks.mediaDetails widget configuration.
|
|
96
96
|
* @returns {string | Promise<string>}
|
|
97
97
|
*/
|
|
98
98
|
mediaSrc(): string | Promise<string>;
|
|
99
99
|
/**
|
|
100
|
-
*
|
|
100
|
+
* (OPTIONAL) Get Details for the media.
|
|
101
101
|
* Notice: this value can be overriden by hooks.mediaDetails widget configuration.
|
|
102
102
|
* @return {IMediaDetails | Promise<IMediaDetails>}
|
|
103
103
|
*/
|
|
104
104
|
mediaMetadata?(): IMediaDetails | Promise<IMediaDetails>;
|
|
105
105
|
/**
|
|
106
|
-
*
|
|
106
|
+
* (OPTIONAL) Get player autoplay configuration option
|
|
107
107
|
* (if player configured to play on page load)
|
|
108
108
|
* @returns {boolean | Promise<boolean>}
|
|
109
109
|
*/
|
|
110
110
|
autoplay?(): boolean | Promise<boolean>;
|
|
111
111
|
/**
|
|
112
|
-
*
|
|
112
|
+
* (OPTIONAL) Get player full screen state.
|
|
113
113
|
* NOTE: if not supported the function must be undefined.
|
|
114
114
|
* Annoto will use other methods to detect full screen.
|
|
115
115
|
* @returns {boolean}
|
|
116
116
|
*/
|
|
117
117
|
fullScreen?(): boolean;
|
|
118
118
|
/**
|
|
119
|
-
*
|
|
119
|
+
* (OPTIONAL) By default Annoto will try applying a fix
|
|
120
120
|
* To enable Annoto to work when player enters Full screen. The fix is
|
|
121
121
|
* moving annoto-app container as a child of the player element or embeddableElement()
|
|
122
122
|
* annoto-app will be moved only if the player element allows it (is NOT an IFRAME).
|
|
@@ -127,7 +127,7 @@ export interface IPlayerAdaptorApi {
|
|
|
127
127
|
*/
|
|
128
128
|
fixFullScreen?(): boolean;
|
|
129
129
|
/**
|
|
130
|
-
*
|
|
130
|
+
* (OPTIONAL) Get player controls Element for embedding
|
|
131
131
|
* annoto timeline for overlay and full screen mode.
|
|
132
132
|
* NOTE: Although this method is optional it's highly recomended and will make the integration
|
|
133
133
|
* much simpler, imrove performance and provide better User experience.
|
|
@@ -136,28 +136,28 @@ export interface IPlayerAdaptorApi {
|
|
|
136
136
|
*/
|
|
137
137
|
controlsElement?(): Element;
|
|
138
138
|
/**
|
|
139
|
-
*
|
|
139
|
+
* (OPTIONAL) Get player Element for embedding annoto application for full screen state.
|
|
140
140
|
* If not provided the main player Element would be used (the element provided at init()).
|
|
141
141
|
* NOTE: if not supported the function must be undefined.
|
|
142
142
|
* @returns {Element}
|
|
143
143
|
*/
|
|
144
144
|
embeddableElement?(): Element;
|
|
145
145
|
/**
|
|
146
|
-
*
|
|
146
|
+
* (OPTIONAL) Get player width in pixels.
|
|
147
147
|
* NOTE: if not supported the function must be undefined.
|
|
148
148
|
* Annoto will use other methods to detect width of the player.
|
|
149
149
|
* @returns {number | string} if string, may contain 'px'
|
|
150
150
|
*/
|
|
151
151
|
width?(): number | string;
|
|
152
152
|
/**
|
|
153
|
-
*
|
|
153
|
+
* (OPTIONAL) Get player height in pixels.
|
|
154
154
|
* NOTE: if not supported the function must be undefined.
|
|
155
155
|
* Annoto will use other methods to detect height of the player.
|
|
156
156
|
* @returns {number | string} if string, may contain 'px'
|
|
157
157
|
*/
|
|
158
158
|
height?(): number | string;
|
|
159
159
|
/**
|
|
160
|
-
*
|
|
160
|
+
* Feature support flag. If set to true, indicates that
|
|
161
161
|
* the player has support for side panel layout, including for full screen.
|
|
162
162
|
* Player that supports side panel layout, must reserve space for the widget, if requested by the widget.
|
|
163
163
|
* The widget applies number of classes and css variables to the player element:
|
|
@@ -167,70 +167,70 @@ export interface IPlayerAdaptorApi {
|
|
|
167
167
|
*/
|
|
168
168
|
readonly sidePanelSupported?: boolean;
|
|
169
169
|
/**
|
|
170
|
-
*
|
|
170
|
+
* cb should be called when the player is setup and the media metadata is loaded.
|
|
171
171
|
* Note: This method MUST be called as the first event.
|
|
172
172
|
* If your player does not support this event, simulate it by calling the cb manually.
|
|
173
173
|
* @param cb
|
|
174
174
|
*/
|
|
175
175
|
onReady(cb: PlayerEventCallback): void;
|
|
176
176
|
/**
|
|
177
|
-
*
|
|
177
|
+
* cb should be called when the media is played.
|
|
178
178
|
* @param cb
|
|
179
179
|
*/
|
|
180
180
|
onPlay(cb: PlayerEventCallback): void;
|
|
181
181
|
/**
|
|
182
|
-
*
|
|
182
|
+
* cb should be called when the media is paused.
|
|
183
183
|
* @param cb
|
|
184
184
|
*/
|
|
185
185
|
onPause(cb: PlayerEventCallback): void;
|
|
186
186
|
/**
|
|
187
|
-
*
|
|
187
|
+
* cb should be called when the media is seeked
|
|
188
188
|
* (playback position changes after seeking).
|
|
189
189
|
* @param cb
|
|
190
190
|
*/
|
|
191
191
|
onSeek(cb: PlayerEventCallback): void;
|
|
192
192
|
/**
|
|
193
|
-
*
|
|
193
|
+
* cb should be called when the media playback current time is updated.
|
|
194
194
|
* Or when the media duration is changed.
|
|
195
195
|
* can be frequent. 200 msec is a good choice for period.
|
|
196
196
|
* @param cb
|
|
197
197
|
*/
|
|
198
198
|
onTimeUpdate(cb: PlayerEventCallback): void;
|
|
199
199
|
/**
|
|
200
|
-
*
|
|
200
|
+
* cb should be called when the media source changes.
|
|
201
201
|
* @param cb
|
|
202
202
|
*/
|
|
203
203
|
onMediaChange(cb: PlayerEventCallback): void;
|
|
204
204
|
/**
|
|
205
|
-
*
|
|
205
|
+
* (OPTIONAL) cb should be called when media is ended
|
|
206
206
|
* NOTE: if not supported the function must be undefined.
|
|
207
207
|
* Annoto will use other methods to detect media end.
|
|
208
208
|
* @param cb
|
|
209
209
|
*/
|
|
210
210
|
onEnded?(cb: PlayerEventCallback): void;
|
|
211
211
|
/**
|
|
212
|
-
*
|
|
212
|
+
* (OPTIONAL) cb should be called when full screen state of the player changes.
|
|
213
213
|
* NOTE: if not supported the function must be undefined.
|
|
214
214
|
* Annoto will use other methods to detect full screen changes.
|
|
215
215
|
* @param cb the callback may pass non mandatory new full screen state as boolean.
|
|
216
216
|
*/
|
|
217
217
|
onFullScreen?(cb: (isFullScreen?: boolean) => void): void;
|
|
218
218
|
/**
|
|
219
|
-
*
|
|
219
|
+
* (OPTIONAL) cb should be called when player size changes.
|
|
220
220
|
* NOTE: if not supported the function must be undefined.
|
|
221
221
|
* Annoto will use other methods to detect size change.
|
|
222
222
|
* @param cb
|
|
223
223
|
*/
|
|
224
224
|
onSizeChange?(cb: PlayerEventCallback): void;
|
|
225
225
|
/**
|
|
226
|
-
*
|
|
226
|
+
* (OPTIONAL) cb should be called when
|
|
227
227
|
* the media element/player is taken off of a page.
|
|
228
228
|
* Useful for dynamic websites.
|
|
229
229
|
* @param cb
|
|
230
230
|
*/
|
|
231
231
|
onRemove?(cb: PlayerEventCallback): void;
|
|
232
232
|
/**
|
|
233
|
-
*
|
|
233
|
+
* (OPTIONAL) cb should be called when click event captured on player progress bar
|
|
234
234
|
* or keydown event captured on player.
|
|
235
235
|
* Implementation of this callback may improve interactions and fast forwarding limit functionality
|
|
236
236
|
* NOTE: if not supported the function must be undefined.
|
|
@@ -238,13 +238,13 @@ export interface IPlayerAdaptorApi {
|
|
|
238
238
|
*/
|
|
239
239
|
onCaptureUIEvent?(cb: CaptureUIEventCallback): void;
|
|
240
240
|
/**
|
|
241
|
-
*
|
|
241
|
+
* (OPTIONAL) Get player controls description parameters.
|
|
242
242
|
* The parameters describe behavior of the player controls.
|
|
243
243
|
* @returns controls descriptor object
|
|
244
244
|
*/
|
|
245
245
|
controlsDescriptor?(): IControlsDescriptor;
|
|
246
246
|
/**
|
|
247
|
-
*
|
|
247
|
+
* (OPTIONAL) If defined will be called at view refreshes of the widget.
|
|
248
248
|
* Allows the player to perform optional adjustments to the controls descriptor.
|
|
249
249
|
* NOTE: may be called frequently, so no heavy operations should be performed.
|
|
250
250
|
* @param isPhone
|
|
@@ -252,14 +252,14 @@ export interface IPlayerAdaptorApi {
|
|
|
252
252
|
*/
|
|
253
253
|
updateControlsDescriptor?(isPhone: boolean, isFullScreen: boolean): void;
|
|
254
254
|
/**
|
|
255
|
-
*
|
|
255
|
+
* (OPTIONAL) Get player controls hidden state.
|
|
256
256
|
* NOTE: if not supported the function must be undefined.
|
|
257
257
|
* Annoto will use other methods to detect controls state.
|
|
258
258
|
* @returns
|
|
259
259
|
*/
|
|
260
260
|
controlsHidden?(): boolean;
|
|
261
261
|
/**
|
|
262
|
-
*
|
|
262
|
+
* (OPTIONAL) Get player controls height in pixels.
|
|
263
263
|
* If supported it will be used instead of controlsDescriptor values.
|
|
264
264
|
* NOTE: if not supported the function must be undefined.
|
|
265
265
|
* Annoto will use other methods to detect height of the player.
|
|
@@ -267,7 +267,7 @@ export interface IPlayerAdaptorApi {
|
|
|
267
267
|
*/
|
|
268
268
|
controlsHeight?(): number | string;
|
|
269
269
|
/**
|
|
270
|
-
*
|
|
270
|
+
* (OPTIONAL) Get player controls track (progress bar) left margin in pixels.
|
|
271
271
|
* If supported it will be used instead of controlsDescriptor values.
|
|
272
272
|
* NOTE: if not supported the function must be undefined.
|
|
273
273
|
* Annoto will use other methods to detect height of the player.
|
|
@@ -275,7 +275,7 @@ export interface IPlayerAdaptorApi {
|
|
|
275
275
|
*/
|
|
276
276
|
trackMarginLeft?(): number | string;
|
|
277
277
|
/**
|
|
278
|
-
*
|
|
278
|
+
* (OPTIONAL) Get player player controls track (progress bar) right margin in pixels.
|
|
279
279
|
* If supported it will be used instead of controlsDescriptor values.
|
|
280
280
|
* NOTE: if not supported the function must be undefined.
|
|
281
281
|
* Annoto will use other methods to detect height of the player.
|
|
@@ -283,7 +283,7 @@ export interface IPlayerAdaptorApi {
|
|
|
283
283
|
*/
|
|
284
284
|
trackMarginRight?(): number | string;
|
|
285
285
|
/**
|
|
286
|
-
*
|
|
286
|
+
* (OPTIONAL) cb should be called when player controls are shown.
|
|
287
287
|
* If implemented the onControlsHide() method must be implemented as well.
|
|
288
288
|
* If implemented those events will be used instead of mouse tracking
|
|
289
289
|
* and controlsDescriptor.mouse parameters.
|
|
@@ -293,7 +293,7 @@ export interface IPlayerAdaptorApi {
|
|
|
293
293
|
*/
|
|
294
294
|
onControlsShow?(cb: PlayerEventCallback): void;
|
|
295
295
|
/**
|
|
296
|
-
*
|
|
296
|
+
* (OPTIONAL) cb should be called when player controls are hidden.
|
|
297
297
|
* If implemented the onControlsShow() method must be implemented as well.
|
|
298
298
|
* If implemented those events will be used instead of mouse tracking
|
|
299
299
|
* and controlsDescriptor.mouse parameters.
|
|
@@ -303,7 +303,7 @@ export interface IPlayerAdaptorApi {
|
|
|
303
303
|
*/
|
|
304
304
|
onControlsHide?(cb: PlayerEventCallback): void;
|
|
305
305
|
/**
|
|
306
|
-
*
|
|
306
|
+
* (OPTIONAL) Get the ration of width / height of the video frame itself.
|
|
307
307
|
* Note: the ratio shold be of the video frame, not of the player element (it can be differnt).
|
|
308
308
|
* Note: In most cases this method is not required. It is required only if the controls size
|
|
309
309
|
* depends on the video frame size and not on the player element size, for example this is the
|
|
@@ -311,7 +311,7 @@ export interface IPlayerAdaptorApi {
|
|
|
311
311
|
*/
|
|
312
312
|
videoRatio?(): number | null;
|
|
313
313
|
/**
|
|
314
|
-
*
|
|
314
|
+
* (DEPRECATED) cb should be called when mouse enters player controls.
|
|
315
315
|
* If implemented the onControlsLeave() method must be implemented as well.
|
|
316
316
|
* NOTE: In most cases this event is not required.
|
|
317
317
|
* NOTE: if not supported the function must be undefined.
|
|
@@ -323,7 +323,7 @@ export interface IPlayerAdaptorApi {
|
|
|
323
323
|
*/
|
|
324
324
|
onControlsEnter?(cb: PlayerEventCallback): void;
|
|
325
325
|
/**
|
|
326
|
-
*
|
|
326
|
+
* (DEPRECATED) cb should be called when mouse leaves player controls.
|
|
327
327
|
* If implemented the onControlsEnter() method must be implemented as well.
|
|
328
328
|
* NOTE: In most cases this event is not required.
|
|
329
329
|
* NOTE: if not supported the function must be undefined.
|
package/dist/build/util.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"util.d.ts","sourceRoot":"","sources":["../../lib/util.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,MAAM,kBAAkB,CAAC;AAE1D;;GAEG;AACH,MAAM,WAAW,WAAW;IACxB,OAAO,EAAE,MAAM,IAAI,CAAC;CACvB;AAED,eAAO,MAAM,eAAe,
|
|
1
|
+
{"version":3,"file":"util.d.ts","sourceRoot":"","sources":["../../lib/util.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,MAAM,kBAAkB,CAAC;AAE1D;;GAEG;AACH,MAAM,WAAW,WAAW;IACxB,OAAO,EAAE,MAAM,IAAI,CAAC;CACvB;AAED,eAAO,MAAM,eAAe,GAAI,sFAe7B;IACC,mBAAmB,EAAE,WAAW,EAAE,CAAC;IACnC,iBAAiB,EAAE,WAAW,EAAE,CAAC;IACjC,WAAW,EAAE,MAAM,MAAM,CAAC;IAC1B,EAAE,EAAE,sBAAsB,CAAC;IAC3B,WAAW,CAAC,EAAE,MAAM,EAAE,CAAC;IACvB,SAAS,CAAC,EAAE,MAAM,EAAE,CAAC;CACxB,KAAG,WA2CH,CAAC"}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { IConfig } from '.';
|
|
2
|
-
import { IMediaDetails } from './media-details';
|
|
1
|
+
import { IConfig, IMediaDetails } from '.';
|
|
3
2
|
/**
|
|
4
3
|
* Callback hooks for triggering actions such as auth and getting info
|
|
5
4
|
*/
|
|
@@ -22,7 +21,7 @@ export interface IHooks {
|
|
|
22
21
|
/**
|
|
23
22
|
* Callback that allows to enrich details about the played media.
|
|
24
23
|
* If provided the function is called by the widget to obtain additional details about the media.
|
|
25
|
-
* @param
|
|
24
|
+
* @param params media details obtained from the player
|
|
26
25
|
* @returns additional details about the played media, such as title
|
|
27
26
|
*/
|
|
28
27
|
mediaDetails?(params: {
|
|
@@ -52,8 +51,7 @@ export interface IHooks {
|
|
|
52
51
|
/**
|
|
53
52
|
* Url to the video page and specific playback time of currentTime.
|
|
54
53
|
* If provided will be used by annoto for email notifications, in the dashboard, etc.
|
|
55
|
-
* @param
|
|
56
|
-
* @param mediaSrc the media source of the player
|
|
54
|
+
* @param params current playback time of the player in seconds and media source of the player
|
|
57
55
|
*/
|
|
58
56
|
getMediaDeepLinkUrl?(params: {
|
|
59
57
|
widgetIndex: number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hooks.d.ts","sourceRoot":"","sources":["../../../lib/config/hooks.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"hooks.d.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C;IAClB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,YAAY,CAAC,EAAE,MAAM,CAAC;CACzB"}
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
*/
|
|
5
5
|
/**
|
|
6
6
|
* @internal
|
|
7
|
-
*
|
|
7
|
+
* The parameters describe behavior of the player controls
|
|
8
8
|
* It is used as default controls parameters for correct timeline behavior in overlay
|
|
9
9
|
* and in full screen mode.
|
|
10
10
|
*/
|