forked from capricorn86/happy-dom
-
Notifications
You must be signed in to change notification settings - Fork 0
/
IHTMLMediaElement.ts
62 lines (54 loc) · 1.75 KB
/
IHTMLMediaElement.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
import IHTMLElement from '../html-element/IHTMLElement';
/**
* HTML Media Element.
*
* Reference:
* https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement.
*/
export default interface IHTMLMediaElement extends IHTMLElement {
readonly currentSrc: string;
readonly duration: number;
autoplay: boolean;
controls: boolean;
loop: boolean;
muted: boolean;
paused: boolean;
volume: number | string;
src: string;
crossOrigin: string; // Only anonymus and 'use-credentials' is valid
currentTime: number | string;
playbackRate: number | string;
defaultPlaybackRate: number | string;
// AddTextTrack;
// Buffered; // TODO tameranges
// CaptureStream; // TODO
// ControlsList: string; // TODO
// DefaultMuted: boolean; // TODO
// DisableRemotePlayback: boolean; // TODO
// Ended: boolean; // TODO readonly
// Error; // TODO object
// NetworkState; // TODO
// Played: // TODO timeranges
/**
* The HTMLMediaElement.pause() method will pause playback of the media, if the media is already in a paused state this method will have no effect.
*/
pause(): void;
/**
* The HTMLMediaElement play() method attempts to begin playback of the media. It returns a Promise which is resolved when playback has been successfully started.
*/
play(): Promise<void>;
/**
* The HTMLMediaElement method canPlayType() reports how likely it is that the current browser will be able to play media of a given MIME type.
* Https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/canPlayType
* possible return value: "" | "probably" | "maybe".
*/
canPlayType(_type: string): string;
/**
* Clones a node.
*
* @override
* @param [deep=false] "true" to clone deep.
* @returns Cloned node.
*/
cloneNode(deep: boolean): IHTMLMediaElement;
}