Forgot to save VideoData.js

This commit is contained in:
Tamius Han 2018-05-23 23:58:34 +02:00
parent 8f201e1ee0
commit 0f8f842ec6

View File

@ -52,6 +52,38 @@ class VideoData {
this.video = null;
}
pause(){
this.paused = true;
if(this.arDetector){
this.arDetector.stop();
}
if(this.resizer){
this.resizer.stop();
}
if(this.player){
this.player.stop();
}
}
resume(){
this.paused = false;
try {
this.resizer.start();
this.player.start();
} catch (e) {
if(Debug.debug){
console.log("[VideoData.js::resume] cannot resume for reasons. Will destroy videoData. Error here:", e);
}
this.destroy();
}
}
resumeAutoAr(){
if(this.arDetector){
this.startArDetection();
}
}
setLastAr(lastAr){
this.resizer.setLastAr(lastAr);
}