-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.d.ts
68 lines (66 loc) · 2.25 KB
/
index.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
export class IovPlayer {
}
/**
* Internet of Video client. This module uses the MediaSource API to
* deliver video content streamed through CLSP from distributed sources.
*/
export class Iov {
on(eventName: string, action: any);
trigger(eventName: string, value: any);
metric(eventName: string, value: any);
onConnectionChange();
onVisibilityChange():Promise<void>;
generatePlayerLogId(): string;
showNextStream();
cancelChangeSrc(id: string);
play(iovPlayer?: IovPlayer):Promise<void>;
stop(iovPlayer?: IovPlayer):Promise<void>;
restart(iovPlayer?: IovPlayer):Promise<void>;
enterFullscreen(iovPlayer?: IovPlayer):Promise<void>;
exitFullscreen(iovPlayer?: IovPlayer):Promise<void>;
toggleFullscreen(iovPlayer?: IovPlayer):Promise<void>;
changeSrc(url: string, showOnFirstFrame?: boolean);
clone(streamConfiguration?);
onPlayerError(error);
/**
* Dereference the necessary properties, clear any intervals and timeouts, and
* remove any listeners. Will also destroy the player.
*/
destroy();
}
/**
* The Iov Collection is meant to be a singleton, and is meant to manage all
* Iovs in a given browser window/document. There are certain centralized
* functions it is meant to perform, such as generating the guids that are
* needed to establish a connection to a unique topic on the SFS, and to listen
* to window messages and route the relevant messages to the appropriate Iov
* instance.
*/
export class IovCollection {
static asSingleton():IovCollection;
/**
* Create an Iov for a specific stream, and add it to this collection.
*/
create(videoElementId: string): Promise<Iov>;
/**
* Add an Iov instance to this collection. It can then be accessed by its id.
*/
add(iov: Iov);
/**
* Determine whether or not an iov with the passed id exists in this
* collection.
*/
has(iovId: string):boolean;
/**
* Get an iov with the passed id from this collection.
*/
get(iovId: string):Iov | undefined;
/**
* Remove an iov instance from this collection and destroy it.
*/
remove(iovId: string):this;
/**
* Destroy this collection and destroy all iov instances in this collection.
*/
destroy();
}