@tivio/sdk-js 2.1.0 → 2.2.0
Sign up to get free protection for your applications and to get access to all the features.
- package/README.md +4 -0
- package/dist/api.types.d.ts +20 -3
- 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 +4 -5
- package/dist/services/playerWrapperInternal.d.ts +4 -4
- 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,7 +7,8 @@ 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;
|
@@ -21,9 +22,7 @@ export declare class PlayerWrapper implements TivioPlayerWrapper {
|
|
21
22
|
*/
|
22
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,11 +9,11 @@ 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;
|