[video.js]: add player networkState

This commit is contained in:
Jonathan Viney
2019-02-07 10:21:26 +13:00
parent a6718933ba
commit 536174e4b3
2 changed files with 16 additions and 0 deletions
+14
View File
@@ -3721,6 +3721,13 @@ declare namespace videojs {
HaveEnoughData = 4
}
enum NetworkState {
Empty = 0,
Idle = 1,
Loading = 2,
NoSource = 3
}
/**
* An instance of the `Player` class is created when any of the Video.js setup methods
* are used to initialize a video.
@@ -4257,6 +4264,13 @@ declare namespace videojs {
muted(): boolean;
/**
* Returns the current state of network activity for the element
*
* @return The current network state
*/
networkState(): NetworkState;
/**
* Pause the video playback
* @check
+2
View File
@@ -61,6 +61,8 @@ videojs("example_video_1").ready(function() {
this.requestFullscreen();
const networkState: videojs.NetworkState = this.networkState();
testEvents(this);
testComponents(this);