@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
@@ -25,4 +25,5 @@ export declare const fetchBundleViaResolver: (conf: InternalConf) => Promise<str
|
|
25
25
|
* Fetch & load CommonJS remote module.
|
26
26
|
*/
|
27
27
|
export declare const createRemotePackageLoader: () => (conf: InternalConf) => Promise<TivioBundle>;
|
28
|
+
export declare let tivioBundle: RemoteBundleState | null;
|
28
29
|
export declare const createTivio: () => (conf: Conf) => Promise<RemoteBundleState>;
|
@@ -1,5 +1,5 @@
|
|
1
|
-
import { AdMetadata, PlayerInterfaceForPlayerWrapper, PlayerWrapperEventType, Source, TivioPlayerWrapper } from '../api.types';
|
2
1
|
import { InternalPlayerWrapper } from './playerWrapperInternal';
|
2
|
+
import type { ListenerAdMetadata, ListenerMarkers, PlayerInterfaceForPlayerWrapper, Source, TivioPlayerWrapper } from '../api.types';
|
3
3
|
import type { CreatePlayerWrapperType } from './playerWrapperInternal';
|
4
4
|
/**
|
5
5
|
* Player wrapper which instances are exposed to SDK user.
|
@@ -7,23 +7,22 @@ import type { CreatePlayerWrapperType } from './playerWrapperInternal';
|
|
7
7
|
export declare class PlayerWrapper implements TivioPlayerWrapper {
|
8
8
|
private internalPlayerWrapper;
|
9
9
|
constructor(internalPlayerWrapper: InternalPlayerWrapper);
|
10
|
-
addEventListener(eventType:
|
10
|
+
addEventListener(eventType: 'adMetadata', listener: ListenerAdMetadata): void;
|
11
|
+
addEventListener(eventType: 'markers', listener: ListenerMarkers): void;
|
11
12
|
reportError(error: Error): void;
|
12
13
|
reportPlaybackEnded(): void;
|
13
14
|
reportTimeProgress(ms: number): void;
|
14
15
|
seekTo(ms: number): void;
|
15
|
-
setSource(source: Source | null): void;
|
16
|
+
setSource(source: Source | null, calibrationId?: string): void;
|
16
17
|
}
|
17
18
|
/**
|
18
19
|
* Called when tivio is initialized (remote bundle is ready).
|
19
20
|
*
|
20
|
-
* @param {CreatePlayerWrapperType}
|
21
|
+
* @param {CreatePlayerWrapperType} createPlayerWrapperFromCoreJs - functions which creates player wrapper in core-js
|
21
22
|
*/
|
22
|
-
export declare const onCreatePlayerWrapperReady: (
|
23
|
+
export declare const onCreatePlayerWrapperReady: (createPlayerWrapperFromCoreJs: CreatePlayerWrapperType) => void;
|
23
24
|
/**
|
24
|
-
*
|
25
|
-
*
|
26
|
-
* @param {PlayerInterfaceForPlayerWrapper} playerImplementation - player implementation from SDK user
|
25
|
+
* @param {PlayerInterfaceForPlayerWrapper} playerImplementation - player implementation
|
27
26
|
* @returns player wrapper instance
|
28
27
|
*/
|
29
28
|
export declare const createPlayerWrapper: (playerImplementation: PlayerInterfaceForPlayerWrapper) => PlayerWrapper;
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import {
|
1
|
+
import type { Listener, PlayerInterfaceForPlayerWrapper, PlayerWrapperEventTypeType, Source, TivioPlayerWrapper } from '../api.types';
|
2
2
|
export declare type CreatePlayerWrapperType = (playerImplementation: PlayerInterfaceForPlayerWrapper) => TivioPlayerWrapper;
|
3
3
|
/**
|
4
4
|
* Responsible for handling of all player wrapper methods (it's called through PlayerWrapper).
|
@@ -9,16 +9,16 @@ export declare class InternalPlayerWrapper implements TivioPlayerWrapper {
|
|
9
9
|
private id;
|
10
10
|
corePlayerWrapperInstance: TivioPlayerWrapper | null;
|
11
11
|
listenersWaitingToRegister: {
|
12
|
-
eventType:
|
13
|
-
listener:
|
12
|
+
eventType: PlayerWrapperEventTypeType;
|
13
|
+
listener: Listener;
|
14
14
|
}[];
|
15
15
|
constructor(playerImplementation: PlayerInterfaceForPlayerWrapper, id: string);
|
16
|
-
addEventListener(eventType:
|
16
|
+
addEventListener(eventType: PlayerWrapperEventTypeType, listener: Listener): void;
|
17
17
|
reportError(error: Error): void;
|
18
18
|
reportPlaybackEnded(): void;
|
19
19
|
reportTimeProgress(ms: number): void;
|
20
20
|
seekTo(ms: number): void;
|
21
|
-
setSource(source: Source | null): void;
|
21
|
+
setSource(source: Source | null, calibrationId?: string): void;
|
22
22
|
/**
|
23
23
|
* Set instance of the real player wrapper (from core-js).
|
24
24
|
*
|