@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.
@@ -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>;
@@ -0,0 +1,6 @@
1
+ declare type Result = Promise<{
2
+ startTimestamp?: number;
3
+ endTimestamp?: number;
4
+ } | null>;
5
+ export declare const getProgramTimestamps: (channelName: string, epgFrom: Date, epgTo: Date) => Result;
6
+ export {};
@@ -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: PlayerWrapperEventType.adMetadata, listener: (metadata: AdMetadata) => void): void;
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
- * Public method accessible in SDK.
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 { AdMetadata, PlayerInterfaceForPlayerWrapper, PlayerWrapperEventType, Source, TivioPlayerWrapper } from '../api.types';
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: PlayerWrapperEventType.adMetadata;
13
- listener: (metadata: AdMetadata) => void;
12
+ eventType: PlayerWrapperEventTypeType;
13
+ listener: Listener;
14
14
  }[];
15
15
  constructor(playerImplementation: PlayerInterfaceForPlayerWrapper, id: string);
16
- addEventListener(eventType: PlayerWrapperEventType.adMetadata, listener: (metadata: AdMetadata) => void): void;
16
+ addEventListener(eventType: PlayerWrapperEventTypeType, listener: Listener): void;
17
17
  reportError(error: Error): void;
18
18
  reportPlaybackEnded(): void;
19
19
  reportTimeProgress(ms: number): void;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tivio/sdk-js",
3
- "version": "2.1.0",
3
+ "version": "2.2.0",
4
4
  "main": "dist/index.js",
5
5
  "typings": "dist/index.d.ts",
6
6
  "source": "src/index.ts",