-
Notifications
You must be signed in to change notification settings - Fork 15
Expand file tree
/
Copy pathHTMLMediaElement.java
More file actions
36 lines (30 loc) · 929 Bytes
/
HTMLMediaElement.java
File metadata and controls
36 lines (30 loc) · 929 Bytes
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
package snap.webapi;
/**
* This class is a wrapper for Web API HTMLMediaElement (https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement).
*/
public class HTMLMediaElement extends HTMLElement {
/**
* Constructor.
*/
public HTMLMediaElement(Object jsObj)
{
super(jsObj);
}
/**
* Attempts to begin playback of the media.
*/
public void play() { call("play"); }
/**
* Pause playback of the media
*/
public void pause() { call("pause"); }
/**
* Resets the media element to its initial state and begins the process of selecting a media source and loading
* the media in preparation for playback to begin at the beginning.
*/
public void load() { call("load"); }
/**
* Property indicates whether the media element has ended playback.
*/
public boolean isEnded() { return getMemberBoolean("ended"); }
}