Youtube videos now refresh metadata 10 seconds before playback starts.
This commit is contained in:
parent
a71f1d6cc0
commit
60cd21d938
4 changed files with 62 additions and 5 deletions
|
|
@ -71,6 +71,7 @@ class player{
|
|||
this.client.socket.on("start", this.start.bind(this));
|
||||
this.client.socket.on("sync", this.sync.bind(this));
|
||||
this.client.socket.on("end", this.end.bind(this));
|
||||
this.client.socket.on("updateCurrentRawFile", this.updateCurrentRawFile.bind(this));
|
||||
}
|
||||
|
||||
start(data){
|
||||
|
|
@ -144,6 +145,17 @@ class player{
|
|||
this.lockSync();
|
||||
}
|
||||
|
||||
updateCurrentRawFile(data){
|
||||
//Grab current item from media handler
|
||||
const currentItem = this.mediaHandler.nowPlaying;
|
||||
|
||||
//Update raw link
|
||||
currentItem.rawLink = data.file;
|
||||
|
||||
//Re-start the item
|
||||
this.start({media: currentItem});
|
||||
}
|
||||
|
||||
lockSync(){
|
||||
//Enable syncing
|
||||
this.syncLock = true;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue