@tivio/sdk-js 2.1.0-alpha → 2.3.0
Sign up to get free protection for your applications and to get access to all the features.
- package/README.md +9 -1
- package/dist/api.types.d.ts +25 -4
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -1
- package/dist/services/bundleLoader.d.ts +1 -0
- package/dist/services/getProgramTimestamps.d.ts +6 -0
- package/dist/services/playerWrapper.d.ts +7 -8
- package/dist/services/playerWrapperInternal.d.ts +5 -5
- package/package.json +1 -1
package/README.md
CHANGED
@@ -12,10 +12,18 @@ yarn add @tivio/sdk-js
|
|
12
12
|
|
13
13
|
# Changelog
|
14
14
|
|
15
|
-
* 2.
|
15
|
+
* 2.3.0
|
16
|
+
* minor: add optional `calibrationId` parameter to `setSource`
|
17
|
+
* 2.2.1
|
18
|
+
* patch: fix export of `PlayerWrapperEventType`
|
19
|
+
* 2.2.0
|
20
|
+
* minor: add `getProgramTimestamps`
|
21
|
+
* minor: add `addEventListener('markers', ...)` to player wrapper
|
22
|
+
* 2.1.0
|
16
23
|
* minor: better es5 polyfills
|
17
24
|
* patch: add `verbose` to Tivio config type
|
18
25
|
* patch: add `bundleUrlOverride` to Tivio config type
|
26
|
+
* patch: fix of registering player wrapper when `createPlayerWrapper` is called after tivio init
|
19
27
|
* 2.0.0
|
20
28
|
* requires core-js at least 1.13.0
|
21
29
|
* major: remove `createPlayerWrapper` from Tivio API object
|
package/dist/api.types.d.ts
CHANGED
@@ -134,16 +134,33 @@ declare type AdMetadata = {
|
|
134
134
|
totalCount: number | null;
|
135
135
|
skip: () => void;
|
136
136
|
} | null;
|
137
|
+
interface Marker {
|
138
|
+
id: string;
|
139
|
+
from: Date;
|
140
|
+
to: Date;
|
141
|
+
relativeFromMs: number;
|
142
|
+
relativeToMs: number;
|
143
|
+
type: 'AD' | 'AD_SEGMENT' | 'START' | 'END' | 'INTRO';
|
144
|
+
}
|
137
145
|
declare enum PlayerWrapperEventType {
|
138
|
-
adMetadata = "adMetadata"
|
146
|
+
adMetadata = "adMetadata",
|
147
|
+
markers = "markers"
|
139
148
|
}
|
149
|
+
declare type PlayerWrapperEventTypeType = `${PlayerWrapperEventType}`;
|
150
|
+
declare type ListenerAdMetadata = (metadata: AdMetadata) => void;
|
151
|
+
declare type ListenerMarkers = (marker: Marker[] | null) => void;
|
152
|
+
declare type Listener = ListenerAdMetadata | ListenerMarkers;
|
140
153
|
interface TivioPlayerWrapper {
|
141
|
-
addEventListener: (eventType:
|
154
|
+
addEventListener: (eventType: PlayerWrapperEventTypeType, listener: Listener) => void;
|
142
155
|
reportError: (error: Error) => void;
|
143
156
|
reportPlaybackEnded: () => void;
|
144
157
|
reportTimeProgress: (ms: number) => void;
|
145
158
|
seekTo: (ms: number) => void;
|
146
|
-
|
159
|
+
/**
|
160
|
+
* @param {Source} source - source to set
|
161
|
+
* @param {string} calibrationId - id of calibration profile
|
162
|
+
*/
|
163
|
+
setSource: (source: Source | null, calibrationId?: string) => void;
|
147
164
|
}
|
148
165
|
interface PlayerInterfaceForPlayerWrapper {
|
149
166
|
/**
|
@@ -278,5 +295,9 @@ declare type ExposedApi = {
|
|
278
295
|
*/
|
279
296
|
signInWithEmailAndPassword: (email: string, password: string) => Promise<void>;
|
280
297
|
createPlayerWrapper: (playerImplementation: PlayerInterfaceForPlayerWrapper) => TivioPlayerWrapper;
|
298
|
+
getProgramTimestamps: (channelName: string, epgFrom: Date, epgTo: Date) => Promise<{
|
299
|
+
startTimestamp?: number;
|
300
|
+
endTimestamp?: number;
|
301
|
+
} | null>;
|
281
302
|
};
|
282
|
-
export { AdMetadata, AdSource, ExposedApi, LiveTvChannelSource, OtherSource, PlayerInterfaceForPlayerWrapper, PlayerWrapperEventType, Source, TivioPlayerWrapper, TivioVodSource, TvProgramSource, };
|
303
|
+
export { AdMetadata, AdSource, ExposedApi, LiveTvChannelSource, OtherSource, PlayerInterfaceForPlayerWrapper, PlayerWrapperEventType, PlayerWrapperEventTypeType, Source, TivioPlayerWrapper, TivioVodSource, TvProgramSource, Marker, ListenerAdMetadata, ListenerMarkers, Listener, };
|
package/dist/index.d.ts
CHANGED