@tivio/sdk-js 2.0.0 → 2.2.1
Sign up to get free protection for your applications and to get access to all the features.
- package/README.md +11 -0
- package/dist/api.types.d.ts +20 -3
- package/dist/conf.d.ts +8 -0
- package/dist/index.d.ts +2 -1
- 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 +6 -7
- package/dist/services/playerWrapperInternal.d.ts +4 -4
- package/dist/types.d.ts +1 -1
- package/package.json +3 -2
package/README.md
CHANGED
@@ -12,6 +12,17 @@ yarn add @tivio/sdk-js
|
|
12
12
|
|
13
13
|
# Changelog
|
14
14
|
|
15
|
+
* 2.2.1
|
16
|
+
* patch: fix export of `PlayerWrapperEventType`
|
17
|
+
* 2.2.0
|
18
|
+
* minor: add `getProgramTimestamps`
|
19
|
+
* minor: add `addEventListener('markers', ...)` to player wrapper
|
20
|
+
* minor: add optional `calibrationId` parameter to `setSource`
|
21
|
+
* 2.1.0
|
22
|
+
* minor: better es5 polyfills
|
23
|
+
* patch: add `verbose` to Tivio config type
|
24
|
+
* patch: add `bundleUrlOverride` to Tivio config type
|
25
|
+
* patch: fix of registering player wrapper when `createPlayerWrapper` is called after tivio init
|
15
26
|
* 2.0.0
|
16
27
|
* requires core-js at least 1.13.0
|
17
28
|
* major: remove `createPlayerWrapper` from Tivio API object
|
package/dist/api.types.d.ts
CHANGED
@@ -134,11 +134,24 @@ 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;
|
@@ -278,5 +291,9 @@ declare type ExposedApi = {
|
|
278
291
|
*/
|
279
292
|
signInWithEmailAndPassword: (email: string, password: string) => Promise<void>;
|
280
293
|
createPlayerWrapper: (playerImplementation: PlayerInterfaceForPlayerWrapper) => TivioPlayerWrapper;
|
294
|
+
getProgramTimestamps: (channelName: string, epgFrom: Date, epgTo: Date) => Promise<{
|
295
|
+
startTimestamp?: number;
|
296
|
+
endTimestamp?: number;
|
297
|
+
} | null>;
|
281
298
|
};
|
282
|
-
export { AdMetadata, AdSource, ExposedApi, LiveTvChannelSource, OtherSource, PlayerInterfaceForPlayerWrapper, PlayerWrapperEventType, Source, TivioPlayerWrapper, TivioVodSource, TvProgramSource, };
|
299
|
+
export { AdMetadata, AdSource, ExposedApi, LiveTvChannelSource, OtherSource, PlayerInterfaceForPlayerWrapper, PlayerWrapperEventType, PlayerWrapperEventTypeType, Source, TivioPlayerWrapper, TivioVodSource, TvProgramSource, Marker, ListenerAdMetadata, ListenerMarkers, Listener, };
|
package/dist/conf.d.ts
CHANGED
@@ -11,6 +11,10 @@ export interface PlayerCapability {
|
|
11
11
|
protocol: 'dash' | 'hls';
|
12
12
|
}
|
13
13
|
export declare type InternalConf = {
|
14
|
+
/**
|
15
|
+
* @private URL of remote code bundle to be fetched directly (without using resolver)
|
16
|
+
*/
|
17
|
+
bundleUrlOverride?: string;
|
14
18
|
/**
|
15
19
|
* Tells Tivio which technologies/protocols etc. is the device capable to play.
|
16
20
|
* If not provided, Tivio will try to guess it (based on the browser).
|
@@ -43,6 +47,10 @@ export declare type InternalConf = {
|
|
43
47
|
* Can turn off Tivio's Sentry logging, defaults to true.
|
44
48
|
*/
|
45
49
|
enableSentry?: boolean;
|
50
|
+
/**
|
51
|
+
* Can turn on Tivio's console logging, defaults to false.
|
52
|
+
*/
|
53
|
+
verbose?: boolean;
|
46
54
|
};
|
47
55
|
export declare const defaultConf: {
|
48
56
|
resolverUrl: string;
|
package/dist/index.d.ts
CHANGED
@@ -1,6 +1,7 @@
|
|
1
1
|
import 'whatwg-fetch';
|
2
|
-
import '
|
2
|
+
import 'core-js/actual';
|
3
3
|
export * from './services/bundleLoader';
|
4
|
+
export * from './services/getProgramTimestamps';
|
4
5
|
export * from './types';
|
5
6
|
export * from './api.types';
|
6
7
|
export { createPlayerWrapper } from './services/playerWrapper';
|