[video.js]: add player readyState()

This commit is contained in:
Jonathan Viney
2019-02-06 12:22:33 +13:00
parent c807902931
commit a436f6c83f
2 changed files with 16 additions and 0 deletions
+14
View File
@@ -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.
+2
View File
@@ -57,6 +57,8 @@ videojs("example_video_1").ready(function() {
this.height(480);
const readyState: videojs.ReadyState = this.readyState();
this.requestFullscreen();
testEvents(this);