@annoto/widget-api 2.10.0-alpha.3 → 3.0.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.
Files changed (94) hide show
  1. package/CHANGELOG.md +43 -0
  2. package/dist/build/api/device-detector.d.ts +12 -0
  3. package/dist/build/api/device-detector.d.ts.map +1 -0
  4. package/dist/build/api/device-detector.js +3 -0
  5. package/dist/build/api/device-detector.js.map +1 -0
  6. package/dist/build/api/index.d.ts +50 -0
  7. package/dist/build/api/index.d.ts.map +1 -0
  8. package/dist/build/api/index.js +18 -0
  9. package/dist/build/api/index.js.map +1 -0
  10. package/dist/build/api/metadata.d.ts +45 -0
  11. package/dist/build/api/metadata.d.ts.map +1 -0
  12. package/dist/build/api/metadata.js +3 -0
  13. package/dist/build/api/metadata.js.map +1 -0
  14. package/dist/build/config/backend.d.ts +11 -0
  15. package/dist/build/config/backend.d.ts.map +1 -0
  16. package/dist/build/config/backend.js +3 -0
  17. package/dist/build/config/backend.js.map +1 -0
  18. package/dist/build/config/features.d.ts +46 -0
  19. package/dist/build/config/features.d.ts.map +1 -0
  20. package/dist/build/config/features.js +3 -0
  21. package/dist/build/config/features.js.map +1 -0
  22. package/dist/build/config/group-details.d.ts +28 -0
  23. package/dist/build/config/group-details.d.ts.map +1 -0
  24. package/dist/build/config/group-details.js +3 -0
  25. package/dist/build/config/group-details.js.map +1 -0
  26. package/dist/build/config/hooks.d.ts +87 -0
  27. package/dist/build/config/hooks.d.ts.map +1 -0
  28. package/dist/build/config/hooks.js +3 -0
  29. package/dist/build/config/hooks.js.map +1 -0
  30. package/dist/build/config/index.d.ts +88 -0
  31. package/dist/build/config/index.d.ts.map +1 -0
  32. package/dist/build/config/index.js +25 -0
  33. package/dist/build/config/index.js.map +1 -0
  34. package/dist/build/config/launch-source.d.ts +10 -0
  35. package/dist/build/config/launch-source.d.ts.map +1 -0
  36. package/dist/build/config/launch-source.js +3 -0
  37. package/dist/build/config/launch-source.js.map +1 -0
  38. package/dist/build/config/media-details.d.ts +28 -0
  39. package/dist/build/config/media-details.d.ts.map +1 -0
  40. package/dist/build/config/media-details.js +3 -0
  41. package/dist/build/config/media-details.js.map +1 -0
  42. package/dist/build/config/timeline.d.ts +30 -0
  43. package/dist/build/config/timeline.d.ts.map +1 -0
  44. package/dist/build/config/timeline.js +3 -0
  45. package/dist/build/config/timeline.js.map +1 -0
  46. package/dist/build/config/ux.d.ts +153 -0
  47. package/dist/build/config/ux.d.ts.map +1 -0
  48. package/dist/build/config/ux.js +3 -0
  49. package/dist/build/config/ux.js.map +1 -0
  50. package/dist/build/config/widget.d.ts +70 -0
  51. package/dist/build/config/widget.d.ts.map +1 -0
  52. package/dist/build/config/widget.js +3 -0
  53. package/dist/build/config/widget.js.map +1 -0
  54. package/dist/build/events/index.d.ts +8 -0
  55. package/dist/build/events/index.d.ts.map +1 -0
  56. package/dist/build/events/index.js +20 -0
  57. package/dist/build/events/index.js.map +1 -0
  58. package/dist/build/events/my-activity.d.ts +48 -0
  59. package/dist/build/events/my-activity.d.ts.map +1 -0
  60. package/dist/build/events/my-activity.js +3 -0
  61. package/dist/build/events/my-activity.js.map +1 -0
  62. package/dist/build/events/stats-event.d.ts +54 -0
  63. package/dist/build/events/stats-event.d.ts.map +1 -0
  64. package/dist/build/events/stats-event.js +28 -0
  65. package/dist/build/events/stats-event.js.map +1 -0
  66. package/dist/build/events/ux-event.d.ts +5 -0
  67. package/dist/build/events/ux-event.d.ts.map +1 -0
  68. package/dist/build/events/ux-event.js +3 -0
  69. package/dist/build/events/ux-event.js.map +1 -0
  70. package/dist/build/events/video-benchmark-event.d.ts +70 -0
  71. package/dist/build/events/video-benchmark-event.d.ts.map +1 -0
  72. package/dist/build/events/video-benchmark-event.js +3 -0
  73. package/dist/build/events/video-benchmark-event.js.map +1 -0
  74. package/dist/build/index.d.ts +22 -0
  75. package/dist/build/index.d.ts.map +1 -0
  76. package/dist/build/index.js +20 -0
  77. package/dist/build/index.js.map +1 -0
  78. package/dist/build/player-adapter/controls-descriptor.d.ts +174 -0
  79. package/dist/build/player-adapter/controls-descriptor.d.ts.map +1 -0
  80. package/dist/build/player-adapter/controls-descriptor.js +7 -0
  81. package/dist/build/player-adapter/controls-descriptor.js.map +1 -0
  82. package/dist/build/player-adapter/index.d.ts +291 -0
  83. package/dist/build/player-adapter/index.d.ts.map +1 -0
  84. package/dist/build/player-adapter/index.js +17 -0
  85. package/dist/build/player-adapter/index.js.map +1 -0
  86. package/dist/build_esm/api/index.d.ts +11 -1
  87. package/dist/build_esm/api/index.d.ts.map +1 -1
  88. package/dist/build_esm/config/hooks.d.ts +18 -2
  89. package/dist/build_esm/config/hooks.d.ts.map +1 -1
  90. package/dist/build_esm/config/ux.d.ts +6 -6
  91. package/dist/build_esm/config/ux.d.ts.map +1 -1
  92. package/dist/tsconfig.module.tsbuildinfo +1 -1
  93. package/dist/tsconfig.tsbuildinfo +1 -1
  94. package/package.json +2 -2
@@ -0,0 +1,30 @@
1
+ /**
2
+ * Timeline configuration
3
+ */
4
+ export interface ITimelineConfig {
5
+ /**
6
+ * The height of the timeline in pixels
7
+ * @default 32
8
+ */
9
+ height?: number;
10
+ /**
11
+ * If true the timeline will attempt to be embedded in the player controls and overlay video
12
+ * If false the timeline will be docked under the player element
13
+ * @default true
14
+ */
15
+ overlay?: boolean;
16
+ /**
17
+ * If enabled and timeline overlay is disabled, the a margin under the player will be added
18
+ * @default true
19
+ */
20
+ dockMargin?: boolean;
21
+ /**
22
+ * @internal
23
+ */
24
+ scrubberHeight?: number;
25
+ /**
26
+ * @internal
27
+ */
28
+ scrubberColor?: string;
29
+ }
30
+ //# sourceMappingURL=timeline.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"timeline.d.ts","sourceRoot":"","sources":["../../../lib/config/timeline.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,WAAW,eAAe;IAC5B;;;OAGG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB;;;;OAIG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;;;OAGG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB;;OAEG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB;;OAEG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;CAC1B"}
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=timeline.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"timeline.js","sourceRoot":"","sources":["../../../lib/config/timeline.ts"],"names":[],"mappings":""}
@@ -0,0 +1,153 @@
1
+ export interface IUx {
2
+ /**
3
+ * Select the widget theme
4
+ * If set to 'dark', the dark theme will always be used even when widget is not in overlay.
5
+ * @default 'default'
6
+ */
7
+ theme?: ThemeType;
8
+ widget?: IWidgetUx;
9
+ player?: IPlayerUx;
10
+ comments?: ICommentsUx;
11
+ }
12
+ export interface IWidgetUx {
13
+ /**
14
+ * Position the widget on the right or on the left side
15
+ * @default 'right'
16
+ */
17
+ position?: WidgetPositionType;
18
+ /**
19
+ * Load widget in open state on first boot.
20
+ * 'kuku' - widget is loaded closed, and after timeout a kuku is shown promting user to comment.
21
+ * 'open' - load in open state
22
+ * 'closed' - load in closed state with no kuku
23
+ * @default 'kuku'
24
+ */
25
+ loadState?: WidgetLoadStateType;
26
+ /**
27
+ * 'edge' - outside the element right next to it
28
+ * 'overlay' - as an overlay inside the element on it's edge
29
+ * 'fixed' - fixed position on the screen edge instead of relative to the element
30
+ * 'sidePanel' - non dragable side panel layout
31
+ * 'sidePanelOverlay' - non dragable side panel that overlays content including controls
32
+ * @default 'edge'
33
+ * @remarks
34
+ * If align is set to 'edge' or 'sidePanel' and there is no space for the widget, it will fallback to 'overlay'
35
+ */
36
+ layout?: WidgetLayoutType;
37
+ /**
38
+ * Enable/Disable navigation side tabs
39
+ * @default true
40
+ */
41
+ tabs?: boolean;
42
+ /**
43
+ * If povided will limit the responsive widget width.
44
+ * Has effect when widget is positioned outside of the player.
45
+ * Has no effect when widget is overlay inside the player.
46
+ * @default 460
47
+ */
48
+ maxWidth?: number;
49
+ /**
50
+ * Disable Floating action button that opens the widget
51
+ * If disabled, a custom button should be implemented for the close/open actions
52
+ * @default false
53
+ */
54
+ fabDisable?: boolean;
55
+ /**
56
+ * side panel layout preferences
57
+ */
58
+ sidePanel?: ISidePanelUx;
59
+ /**
60
+ * if set to true widget position will be fixed and user won't be able to drag it.
61
+ * @default false
62
+ */
63
+ draggableDisabled?: boolean;
64
+ }
65
+ export interface ISidePanelUx {
66
+ /**
67
+ * Enables side panel ux for player fullscreen. by default overlay is used in fullscreen.
68
+ * @default false
69
+ */
70
+ fullScreenEnable?: boolean;
71
+ /**
72
+ * Width of the side panel in player fullscreen in pixels
73
+ * @default 400
74
+ */
75
+ fullScreenWidth?: number;
76
+ /**
77
+ * Width of the overlay side panel
78
+ * @default 350
79
+ */
80
+ width?: number;
81
+ }
82
+ export interface ICommentsUx {
83
+ /**
84
+ * If set to true comments start will be at the top instead of bottom.
85
+ * @default false
86
+ */
87
+ topToBottom?: boolean;
88
+ /**
89
+ * If set to true, when widget is loaded all the replies to comments will be shown.
90
+ * @default false
91
+ */
92
+ showReplies?: boolean;
93
+ /**
94
+ * The default sorting to use on startup.
95
+ * @default 'most_recent'
96
+ */
97
+ sort?: CommentsSortType;
98
+ }
99
+ export interface IPlayerUx {
100
+ /**
101
+ * Triggers that will automatically pause the player.
102
+ * All true by default.
103
+ * > For live video, the player is never paused.
104
+ */
105
+ pauseTriggers?: IPlayerPauseTriggers;
106
+ /**
107
+ * Triggers that will automatically play the player.
108
+ * All false by default.
109
+ */
110
+ playTriggers?: IPlayerPlayTriggers;
111
+ }
112
+ export interface IPlayerPauseTriggers {
113
+ /**
114
+ * Pause when user starts to comment
115
+ * @default true
116
+ */
117
+ comment?: boolean;
118
+ /**
119
+ * Pause when user starts to add new note
120
+ * @default true
121
+ */
122
+ note?: boolean;
123
+ /**
124
+ * Pause when user is prompted to login/signup
125
+ * @default true
126
+ */
127
+ authPrompt?: boolean;
128
+ /**
129
+ * On mobile when widget is open it overlays the player.
130
+ * Pause when widget is open on mobile devices, so the video is not played in the background.
131
+ * > when opening in interactive mode (kuku/mini widget that do not overlay all the video), the player will not be paused.
132
+ * @default true
133
+ */
134
+ openOnPhone?: boolean;
135
+ }
136
+ export interface IPlayerPlayTriggers {
137
+ /**
138
+ * Play video after user adds new comment
139
+ * @default false
140
+ */
141
+ comment?: boolean;
142
+ /**
143
+ * Play video after user adds new note
144
+ * @default false
145
+ */
146
+ note?: boolean;
147
+ }
148
+ export declare type ThemeType = 'default' | 'dark';
149
+ export declare type WidgetPositionType = 'right' | 'right:top' | 'right:bottom' | 'left' | 'left:top' | 'left:bottom';
150
+ export declare type WidgetLayoutType = 'edge' | 'overlay' | 'fixed' | 'sidePanel' | 'sidePanelOverlay';
151
+ export declare type WidgetLoadStateType = 'kuku' | 'open' | 'closed';
152
+ export declare type CommentsSortType = 'most_recent' | 'top_rated' | 'by_timetag';
153
+ //# sourceMappingURL=ux.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ux.d.ts","sourceRoot":"","sources":["../../../lib/config/ux.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,GAAG;IAChB;;;;OAIG;IACH,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,MAAM,CAAC,EAAE,SAAS,CAAC;IACnB,MAAM,CAAC,EAAE,SAAS,CAAC;IACnB,QAAQ,CAAC,EAAE,WAAW,CAAC;CAC1B;AAED,MAAM,WAAW,SAAS;IACtB;;;OAGG;IACH,QAAQ,CAAC,EAAE,kBAAkB,CAAC;IAC9B;;;;;;OAMG;IACH,SAAS,CAAC,EAAE,mBAAmB,CAAC;IAChC;;;;;;;;;OASG;IACH,MAAM,CAAC,EAAE,gBAAgB,CAAC;IAC1B;;;OAGG;IACH,IAAI,CAAC,EAAE,OAAO,CAAC;IACf;;;;;OAKG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB;;;;OAIG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB;;OAEG;IACH,SAAS,CAAC,EAAE,YAAY,CAAC;IACzB;;;OAGG;IACH,iBAAiB,CAAC,EAAE,OAAO,CAAC;CAC/B;AAED,MAAM,WAAW,YAAY;IACzB;;;OAGG;IACH,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B;;;OAGG;IACH,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,WAAW,WAAW;IACxB;;;OAGG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB;;;OAGG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB;;;OAGG;IACH,IAAI,CAAC,EAAE,gBAAgB,CAAC;CAC3B;AAED,MAAM,WAAW,SAAS;IACtB;;;;OAIG;IACH,aAAa,CAAC,EAAE,oBAAoB,CAAC;IACrC;;;OAGG;IACH,YAAY,CAAC,EAAE,mBAAmB,CAAC;CACtC;AAED,MAAM,WAAW,oBAAoB;IACjC;;;OAGG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;;;OAGG;IACH,IAAI,CAAC,EAAE,OAAO,CAAC;IACf;;;OAGG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB;;;;;OAKG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;CACzB;AAED,MAAM,WAAW,mBAAmB;IAChC;;;OAGG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;;;OAGG;IACH,IAAI,CAAC,EAAE,OAAO,CAAC;CAClB;AAED,oBAAY,SAAS,GAAG,SAAS,GAAG,MAAM,CAAC;AAC3C,oBAAY,kBAAkB,GAAG,OAAO,GAAG,WAAW,GAAG,cAAc,GAAG,MAAM,GAAG,UAAU,GAAG,aAAa,CAAC;AAC9G,oBAAY,gBAAgB,GAAG,MAAM,GAAG,SAAS,GAAG,OAAO,GAAG,WAAW,GAAG,kBAAkB,CAAC;AAC/F,oBAAY,mBAAmB,GAAG,MAAM,GAAG,MAAM,GAAG,QAAQ,CAAC;AAC7D,oBAAY,gBAAgB,GAAG,aAAa,GAAG,WAAW,GAAG,YAAY,CAAC"}
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=ux.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ux.js","sourceRoot":"","sources":["../../../lib/config/ux.ts"],"names":[],"mappings":""}
@@ -0,0 +1,70 @@
1
+ import { IFeatures } from './features';
2
+ import { IPlayerAdaptorApi } from '../player-adapter';
3
+ import { ITimelineConfig } from './timeline';
4
+ import { IWidgetUx } from './ux';
5
+ export interface IWidgetConfig<F = IFeatures> {
6
+ /**
7
+ * Player setup
8
+ */
9
+ player: IPlayerConfig;
10
+ /**
11
+ * If provided, the widget will be positioned relative to this element instead of the player element
12
+ */
13
+ positionElement?: string | HTMLElement;
14
+ /**
15
+ * Configuration options that affect the user experience.
16
+ * Overrides any backend and {@link IConfig} ux settings.
17
+ */
18
+ ux?: IWidgetUx;
19
+ /**
20
+ * Enable/disable and configure features
21
+ * Modifying the features will override the backend and {@link IConfig} features.
22
+ * @remarks
23
+ * If Feature is not enabled on backend it cannot be enabled via this api.
24
+ */
25
+ features?: F;
26
+ /**
27
+ * If provided the discusion widget will be embedded inside the host element instead of as overlay
28
+ * The size of the widget will be responsive and set to 100% width and height of the host element.
29
+ */
30
+ host?: string | HTMLElement;
31
+ /**
32
+ * @internal
33
+ * Timeline configuration
34
+ */
35
+ timeline?: ITimelineConfig;
36
+ /**
37
+ * @internal
38
+ */
39
+ stats?: IStatsConfig;
40
+ }
41
+ export interface IPlayerConfig {
42
+ /**
43
+ * One of the player types
44
+ */
45
+ type: PlayerType;
46
+ /**
47
+ * dom element of the player or selector string to be used in document.querySelector()
48
+ */
49
+ element: string | HTMLElement;
50
+ /**
51
+ * Player adaptor API required for the `custom` player type
52
+ */
53
+ adaptorApi?: IPlayerAdaptorApi;
54
+ /**
55
+ * @internal
56
+ */
57
+ wide?: boolean;
58
+ /**
59
+ * @internal
60
+ */
61
+ params?: unknown;
62
+ }
63
+ /**
64
+ * @internal
65
+ */
66
+ export interface IStatsConfig {
67
+ host: HTMLElement;
68
+ }
69
+ export declare type PlayerType = 'html5' | 'youtube' | 'jw6' | 'jw7' | 'jw' | 'videojs' | 'kaltura' | 'vimeo' | 'flowplayer' | 'h5p' | 'wistia' | 'openedx' | 'page' | 'kplaykit' | 'custom';
70
+ //# sourceMappingURL=widget.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"widget.d.ts","sourceRoot":"","sources":["../../../lib/config/widget.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AACvC,OAAO,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AACtD,OAAO,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAC7C,OAAO,EAAE,SAAS,EAAE,MAAM,MAAM,CAAC;AAEjC,MAAM,WAAW,aAAa,CAAC,CAAC,GAAG,SAAS;IACxC;;OAEG;IACH,MAAM,EAAE,aAAa,CAAC;IACtB;;OAEG;IACH,eAAe,CAAC,EAAE,MAAM,GAAG,WAAW,CAAC;IACvC;;;OAGG;IACH,EAAE,CAAC,EAAE,SAAS,CAAC;IACf;;;;;OAKG;IACH,QAAQ,CAAC,EAAE,CAAC,CAAC;IACb;;;OAGG;IACH,IAAI,CAAC,EAAE,MAAM,GAAG,WAAW,CAAC;IAC5B;;;OAGG;IACH,QAAQ,CAAC,EAAE,eAAe,CAAC;IAC3B;;OAEG;IACH,KAAK,CAAC,EAAE,YAAY,CAAC;CACxB;AAED,MAAM,WAAW,aAAa;IAC1B;;OAEG;IACH,IAAI,EAAE,UAAU,CAAC;IACjB;;OAEG;IACH,OAAO,EAAE,MAAM,GAAG,WAAW,CAAC;IAC9B;;OAEG;IACH,UAAU,CAAC,EAAE,iBAAiB,CAAC;IAC/B;;OAEG;IACH,IAAI,CAAC,EAAE,OAAO,CAAC;IACf;;OAEG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC;CACpB;AAED;;GAEG;AACH,MAAM,WAAW,YAAY;IACzB,IAAI,EAAE,WAAW,CAAC;CACrB;AAED,oBAAY,UAAU,GAAG,OAAO,GAAG,SAAS,GAAG,KAAK,GAAG,KAAK,GAAG,IAAI,GAAG,SAAS,GAAG,SAAS,GAAG,OAAO,GAAG,YAAY,GAAG,KAAK,GAAG,QAAQ,GAAG,SAAS,GAAG,MAAM,GAAG,UAAU,GAAG,QAAQ,CAAC"}
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=widget.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"widget.js","sourceRoot":"","sources":["../../../lib/config/widget.ts"],"names":[],"mappings":""}
@@ -0,0 +1,8 @@
1
+ /**
2
+ * @module Events
3
+ */
4
+ export * from './stats-event';
5
+ export * from './ux-event';
6
+ export * from './video-benchmark-event';
7
+ export * from './my-activity';
8
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../lib/events/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,cAAc,eAAe,CAAA;AAC7B,cAAc,YAAY,CAAC;AAC3B,cAAc,yBAAyB,CAAC;AACxC,cAAc,eAAe,CAAC"}
@@ -0,0 +1,20 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
5
+ }) : (function(o, m, k, k2) {
6
+ if (k2 === undefined) k2 = k;
7
+ o[k2] = m[k];
8
+ }));
9
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
10
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
11
+ };
12
+ Object.defineProperty(exports, "__esModule", { value: true });
13
+ /**
14
+ * @module Events
15
+ */
16
+ __exportStar(require("./stats-event"), exports);
17
+ __exportStar(require("./ux-event"), exports);
18
+ __exportStar(require("./video-benchmark-event"), exports);
19
+ __exportStar(require("./my-activity"), exports);
20
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../lib/events/index.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA;;GAEG;AACH,gDAA6B;AAC7B,6CAA2B;AAC3B,0DAAwC;AACxC,gDAA8B"}
@@ -0,0 +1,48 @@
1
+ import { IVideoBenchmarkHeatmap } from './video-benchmark-event';
2
+ export interface IMyActivity {
3
+ /**
4
+ * Quantity of comments
5
+ */
6
+ comments: number;
7
+ /**
8
+ * Quantity of replies
9
+ */
10
+ replies: number;
11
+ /**
12
+ * acc_completion from {@link IVideoBenchmarkEvent}
13
+ */
14
+ completion: number;
15
+ /**
16
+ * acc_heatmap from {@link IVideoBenchmarkEvent}
17
+ */
18
+ heatmap: IVideoBenchmarkHeatmap;
19
+ /**
20
+ * acc_watch_time from {@link IVideoBenchmarkEvent}
21
+ */
22
+ watch_time: number;
23
+ /**
24
+ * User sso id
25
+ */
26
+ sso_id?: string;
27
+ /**
28
+ * The group Id provided on {@link MediaDetails}
29
+ */
30
+ group_id?: string;
31
+ /**
32
+ * Media source
33
+ */
34
+ media_src: string;
35
+ /**
36
+ * index of the widget
37
+ */
38
+ widget_index: number;
39
+ /**
40
+ * Unique visitor identifier
41
+ */
42
+ visitor_id: string;
43
+ /**
44
+ * Unique session identifier
45
+ */
46
+ session_id: string;
47
+ }
48
+ //# sourceMappingURL=my-activity.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"my-activity.d.ts","sourceRoot":"","sources":["../../../lib/events/my-activity.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,MAAM,yBAAyB,CAAC;AAEjE,MAAM,WAAW,WAAW;IACxB;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;IACjB;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;IAChB;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;IACnB;;OAEG;IACH,OAAO,EAAE,sBAAsB,CAAC;IAChC;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;IACnB;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;IAClB;;OAEG;IACH,YAAY,EAAE,MAAM,CAAC;IACrB;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;IACnB;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;CACtB"}
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=my-activity.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"my-activity.js","sourceRoot":"","sources":["../../../lib/events/my-activity.ts"],"names":[],"mappings":""}
@@ -0,0 +1,54 @@
1
+ export declare enum StatsTypeEnum {
2
+ firstPlay = 1,
3
+ commentTimetagTap = 2,
4
+ showReplyTap = 3,
5
+ noteTimetagTap = 4,
6
+ vote = 5,
7
+ threadSort = 6,
8
+ threadFollow = 7,
9
+ commentKukuTap = 8,
10
+ commentTap = 9,
11
+ noteKukuTap = 10,
12
+ noteTap = 11,
13
+ timelineUgcTap = 12,
14
+ syncTap = 13,
15
+ comment = 14,
16
+ reply = 15,
17
+ note = 16,
18
+ commentEdit = 17,
19
+ commentDelete = 18,
20
+ noteEdit = 19,
21
+ noteDelete = 20,
22
+ groupFollow = 21
23
+ }
24
+ export interface IStatsEvent {
25
+ /**
26
+ * The type of the event
27
+ */
28
+ type: StatsTypeEnum;
29
+ /**
30
+ * The group Id provided on {@link MediaDetails}
31
+ */
32
+ group_id?: string;
33
+ /**
34
+ * Media source
35
+ */
36
+ media_src: string;
37
+ /**
38
+ * Video timestamp in seconds
39
+ */
40
+ ps?: number;
41
+ /**
42
+ * index of the widget
43
+ */
44
+ widget_index: number;
45
+ /**
46
+ * Unique visitor identifier
47
+ */
48
+ visitor_id: string;
49
+ /**
50
+ * Unique session identifier
51
+ */
52
+ session_id: string;
53
+ }
54
+ //# sourceMappingURL=stats-event.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"stats-event.d.ts","sourceRoot":"","sources":["../../../lib/events/stats-event.ts"],"names":[],"mappings":"AAAA,oBAAY,aAAa;IACrB,SAAS,IAAI;IACb,iBAAiB,IAAA;IACjB,YAAY,IAAA;IACZ,cAAc,IAAA;IACd,IAAI,IAAA;IACJ,UAAU,IAAA;IACV,YAAY,IAAA;IACZ,cAAc,IAAA;IACd,UAAU,IAAA;IACV,WAAW,KAAA;IACX,OAAO,KAAA;IACP,cAAc,KAAA;IACd,OAAO,KAAA;IACP,OAAO,KAAA;IACP,KAAK,KAAA;IACL,IAAI,KAAA;IACJ,WAAW,KAAA;IACX,aAAa,KAAA;IACb,QAAQ,KAAA;IACR,UAAU,KAAA;IACV,WAAW,KAAA;CACd;AAED,MAAM,WAAW,WAAW;IACxB;;OAEG;IACH,IAAI,EAAE,aAAa,CAAC;IACpB;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;IAClB;;OAEG;IACH,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ;;OAEG;IACH,YAAY,EAAE,MAAM,CAAC;IACrB;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;IACnB;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;CACtB"}
@@ -0,0 +1,28 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.StatsTypeEnum = void 0;
4
+ var StatsTypeEnum;
5
+ (function (StatsTypeEnum) {
6
+ StatsTypeEnum[StatsTypeEnum["firstPlay"] = 1] = "firstPlay";
7
+ StatsTypeEnum[StatsTypeEnum["commentTimetagTap"] = 2] = "commentTimetagTap";
8
+ StatsTypeEnum[StatsTypeEnum["showReplyTap"] = 3] = "showReplyTap";
9
+ StatsTypeEnum[StatsTypeEnum["noteTimetagTap"] = 4] = "noteTimetagTap";
10
+ StatsTypeEnum[StatsTypeEnum["vote"] = 5] = "vote";
11
+ StatsTypeEnum[StatsTypeEnum["threadSort"] = 6] = "threadSort";
12
+ StatsTypeEnum[StatsTypeEnum["threadFollow"] = 7] = "threadFollow";
13
+ StatsTypeEnum[StatsTypeEnum["commentKukuTap"] = 8] = "commentKukuTap";
14
+ StatsTypeEnum[StatsTypeEnum["commentTap"] = 9] = "commentTap";
15
+ StatsTypeEnum[StatsTypeEnum["noteKukuTap"] = 10] = "noteKukuTap";
16
+ StatsTypeEnum[StatsTypeEnum["noteTap"] = 11] = "noteTap";
17
+ StatsTypeEnum[StatsTypeEnum["timelineUgcTap"] = 12] = "timelineUgcTap";
18
+ StatsTypeEnum[StatsTypeEnum["syncTap"] = 13] = "syncTap";
19
+ StatsTypeEnum[StatsTypeEnum["comment"] = 14] = "comment";
20
+ StatsTypeEnum[StatsTypeEnum["reply"] = 15] = "reply";
21
+ StatsTypeEnum[StatsTypeEnum["note"] = 16] = "note";
22
+ StatsTypeEnum[StatsTypeEnum["commentEdit"] = 17] = "commentEdit";
23
+ StatsTypeEnum[StatsTypeEnum["commentDelete"] = 18] = "commentDelete";
24
+ StatsTypeEnum[StatsTypeEnum["noteEdit"] = 19] = "noteEdit";
25
+ StatsTypeEnum[StatsTypeEnum["noteDelete"] = 20] = "noteDelete";
26
+ StatsTypeEnum[StatsTypeEnum["groupFollow"] = 21] = "groupFollow";
27
+ })(StatsTypeEnum = exports.StatsTypeEnum || (exports.StatsTypeEnum = {}));
28
+ //# sourceMappingURL=stats-event.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"stats-event.js","sourceRoot":"","sources":["../../../lib/events/stats-event.ts"],"names":[],"mappings":";;;AAAA,IAAY,aAsBX;AAtBD,WAAY,aAAa;IACrB,2DAAa,CAAA;IACb,2EAAiB,CAAA;IACjB,iEAAY,CAAA;IACZ,qEAAc,CAAA;IACd,iDAAI,CAAA;IACJ,6DAAU,CAAA;IACV,iEAAY,CAAA;IACZ,qEAAc,CAAA;IACd,6DAAU,CAAA;IACV,gEAAW,CAAA;IACX,wDAAO,CAAA;IACP,sEAAc,CAAA;IACd,wDAAO,CAAA;IACP,wDAAO,CAAA;IACP,oDAAK,CAAA;IACL,kDAAI,CAAA;IACJ,gEAAW,CAAA;IACX,oEAAa,CAAA;IACb,0DAAQ,CAAA;IACR,8DAAU,CAAA;IACV,gEAAW,CAAA;AACf,CAAC,EAtBW,aAAa,GAAb,qBAAa,KAAb,qBAAa,QAsBxB"}
@@ -0,0 +1,5 @@
1
+ export interface IUxEvent {
2
+ name: 'widget:hide' | 'widget:show' | 'widget:minimise' | 'timeline:hide' | 'timeline:show' | 'timeline:focusin' | 'timeline:focusout';
3
+ widget_id: number;
4
+ }
5
+ //# sourceMappingURL=ux-event.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ux-event.d.ts","sourceRoot":"","sources":["../../../lib/events/ux-event.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,QAAQ;IACrB,IAAI,EAAE,aAAa,GAAG,aAAa,GAAG,iBAAiB,GAAG,eAAe,GAAG,eAAe,GAAG,kBAAkB,GAAG,mBAAmB,CAAC;IACvI,SAAS,EAAE,MAAM,CAAC;CACrB"}
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=ux-event.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ux-event.js","sourceRoot":"","sources":["../../../lib/events/ux-event.ts"],"names":[],"mappings":""}
@@ -0,0 +1,70 @@
1
+ /**
2
+ * Each video divided into segments based on viewer watch pattern
3
+ * x timestamp in seconds of the segment end, y is view intencity.
4
+ * single full segment view is y = 1.
5
+ */
6
+ export interface IVideoBenchmarkHeatmap {
7
+ series: {
8
+ x: number;
9
+ y: number;
10
+ }[];
11
+ }
12
+ export interface IVideoBenchmarkEvent {
13
+ /**
14
+ * The group Id provided on {@link MediaDetails}
15
+ */
16
+ group_id?: string;
17
+ /**
18
+ * Media source
19
+ */
20
+ media_src: string;
21
+ /**
22
+ * index of the widget
23
+ */
24
+ widget_index: number;
25
+ /**
26
+ * Video duration
27
+ */
28
+ duration: number;
29
+ /**
30
+ * Start of watched video segment in seconds
31
+ */
32
+ segment_start: number;
33
+ /**
34
+ * End of watched video segment in seconds
35
+ */
36
+ segment_end: number;
37
+ /**
38
+ * 0 - 100 percentage per session
39
+ */
40
+ completion: number;
41
+ /**
42
+ * watch time in seconds per session
43
+ */
44
+ watch_time: number;
45
+ /**
46
+ * View heatmap for the session
47
+ */
48
+ heatmap?: IVideoBenchmarkHeatmap;
49
+ /**
50
+ * all time accumulated 0 - 100 percentage
51
+ */
52
+ acc_completion: number;
53
+ /**
54
+ * all time accumulated watch time in seconds
55
+ */
56
+ acc_watch_time: number;
57
+ /**
58
+ * all time accumalted heatmap
59
+ */
60
+ acc_heatmap?: IVideoBenchmarkHeatmap;
61
+ /**
62
+ * Unique visitor identifier
63
+ */
64
+ visitor_id: string;
65
+ /**
66
+ * Unique session identifier
67
+ */
68
+ session_id: string;
69
+ }
70
+ //# sourceMappingURL=video-benchmark-event.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"video-benchmark-event.d.ts","sourceRoot":"","sources":["../../../lib/events/video-benchmark-event.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,MAAM,WAAW,sBAAsB;IACnC,MAAM,EAAE;QAAE,CAAC,EAAE,MAAM,CAAC;QAAC,CAAC,EAAE,MAAM,CAAA;KAAE,EAAE,CAAC;CACtC;AAGD,MAAM,WAAW,oBAAoB;IACjC;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;IAClB;;OAEG;IACH,YAAY,EAAE,MAAM,CAAC;IACrB;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;IACjB;;OAEG;IACH,aAAa,EAAE,MAAM,CAAC;IACtB;;OAEG;IACH,WAAW,EAAE,MAAM,CAAC;IACpB;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;IACnB;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;IACnB;;OAEG;IACH,OAAO,CAAC,EAAE,sBAAsB,CAAC;IACjC;;OAEG;IACH,cAAc,EAAE,MAAM,CAAC;IACvB;;OAEG;IACH,cAAc,EAAE,MAAM,CAAC;IACvB;;OAEG;IACH,WAAW,CAAC,EAAE,sBAAsB,CAAC;IACrC;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;IACnB;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;CACtB"}
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=video-benchmark-event.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"video-benchmark-event.js","sourceRoot":"","sources":["../../../lib/events/video-benchmark-event.ts"],"names":[],"mappings":""}
@@ -0,0 +1,22 @@
1
+ /**
2
+ * @module Annoto
3
+ */
4
+ import { IConfig } from './config';
5
+ import { IUxEvent, IStatsEvent, IVideoBenchmarkEvent, IMyActivity } from './events';
6
+ import { IAnnotoApi, IMetadata } from './api';
7
+ export declare type AnnotoEventType = 'ready' | 'metadata' | 'ux' | 'stats_events' | 'video_benchmark' | 'my_activity';
8
+ export declare type AnnotoReadyCallback = (api: IAnnotoApi) => void;
9
+ export declare type AnnotoMetadataCallback = (metadata: IMetadata) => void;
10
+ export declare type AnnotoUxEventCallback = (uxEvent: IUxEvent) => void;
11
+ export declare type AnnotoStatsEventCallback = (statsEvent: IStatsEvent) => void;
12
+ export declare type AnnotoVideoBenchmarkCallback = (uxEvent: IVideoBenchmarkEvent) => void;
13
+ export declare type AnnotoMyActivityCallback = (uxEvent: IMyActivity) => void;
14
+ export interface Annoto {
15
+ on(event: AnnotoEventType, cb: AnnotoReadyCallback | AnnotoMetadataCallback | AnnotoUxEventCallback | AnnotoStatsEventCallback | AnnotoVideoBenchmarkCallback | AnnotoMyActivityCallback): void;
16
+ boot(config: IConfig): void;
17
+ }
18
+ export * from './config';
19
+ export * from './api';
20
+ export * from './events';
21
+ export * from './player-adapter';
22
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../lib/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,UAAU,CAAC;AACnC,OAAO,EAAE,QAAQ,EAAE,WAAW,EAAE,oBAAoB,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AACpF,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAE9C,oBAAY,eAAe,GAAG,OAAO,GAAG,UAAU,GAAG,IAAI,GAAG,cAAc,GAAG,iBAAiB,GAAG,aAAa,CAAC;AAC/G,oBAAY,mBAAmB,GAAG,CAAC,GAAG,EAAE,UAAU,KAAK,IAAI,CAAC;AAC5D,oBAAY,sBAAsB,GAAG,CAAC,QAAQ,EAAE,SAAS,KAAK,IAAI,CAAC;AACnE,oBAAY,qBAAqB,GAAG,CAAC,OAAO,EAAE,QAAQ,KAAK,IAAI,CAAC;AAChE,oBAAY,wBAAwB,GAAG,CAAC,UAAU,EAAE,WAAW,KAAK,IAAI,CAAC;AACzE,oBAAY,4BAA4B,GAAG,CAAC,OAAO,EAAE,oBAAoB,KAAK,IAAI,CAAC;AACnF,oBAAY,wBAAwB,GAAG,CAAC,OAAO,EAAE,WAAW,KAAK,IAAI,CAAC;AAEtE,MAAM,WAAW,MAAM;IACnB,EAAE,CAAC,KAAK,EAAE,eAAe,EAAE,EAAE,EAAE,mBAAmB,GAAG,sBAAsB,GAAG,qBAAqB,GAAG,wBAAwB,GAAG,4BAA4B,GAAG,wBAAwB,GAAG,IAAI,CAAC;IAChM,IAAI,CAAC,MAAM,EAAE,OAAO,GAAG,IAAI,CAAC;CAC/B;AAED,cAAc,UAAU,CAAC;AACzB,cAAc,OAAO,CAAC;AACtB,cAAc,UAAU,CAAC;AACzB,cAAc,kBAAkB,CAAC"}
@@ -0,0 +1,20 @@
1
+ "use strict";
2
+ /**
3
+ * @module Annoto
4
+ */
5
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
6
+ if (k2 === undefined) k2 = k;
7
+ Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
8
+ }) : (function(o, m, k, k2) {
9
+ if (k2 === undefined) k2 = k;
10
+ o[k2] = m[k];
11
+ }));
12
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
13
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
14
+ };
15
+ Object.defineProperty(exports, "__esModule", { value: true });
16
+ __exportStar(require("./config"), exports);
17
+ __exportStar(require("./api"), exports);
18
+ __exportStar(require("./events"), exports);
19
+ __exportStar(require("./player-adapter"), exports);
20
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../lib/index.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;AAmBH,2CAAyB;AACzB,wCAAsB;AACtB,2CAAyB;AACzB,mDAAiC"}