mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-10-06 15:57:13 +00:00
[video.js]: add player readyState()
This commit is contained in:
Vendored
+14
@@ -3713,6 +3713,14 @@ declare namespace videojs {
|
||||
new (player: Player, options?: ComponentOptions): MouseTimeDisplay
|
||||
};
|
||||
|
||||
enum ReadyState {
|
||||
HaveNothing = 0,
|
||||
HaveMetadata = 1,
|
||||
HaveCurrentData = 2,
|
||||
HaveFutureData = 3,
|
||||
HaveEnoughData = 4
|
||||
}
|
||||
|
||||
/**
|
||||
* An instance of the `Player` class is created when any of the Video.js setup methods
|
||||
* are used to initialize a video.
|
||||
@@ -4342,6 +4350,12 @@ declare namespace videojs {
|
||||
*/
|
||||
preload(value?: boolean): string;
|
||||
|
||||
/**
|
||||
* Returns a value that expresses the current state of the element
|
||||
* with respect to rendering the current playback position.
|
||||
*/
|
||||
readyState(): ReadyState;
|
||||
|
||||
/**
|
||||
* Calculates how much time is left in the video. Not part
|
||||
* of the native video API.
|
||||
|
||||
@@ -57,6 +57,8 @@ videojs("example_video_1").ready(function() {
|
||||
|
||||
this.height(480);
|
||||
|
||||
const readyState: videojs.ReadyState = this.readyState();
|
||||
|
||||
this.requestFullscreen();
|
||||
|
||||
testEvents(this);
|
||||
|
||||
Reference in New Issue
Block a user