ultrawidify/js/lib/VideoData.js

41 lines
880 B
JavaScript
Raw Normal View History

2018-05-09 00:03:22 +02:00
class VideoData {
constructor(video){
this.video = video;
// POZOR: VRSTNI RED JE POMEMBEN (arDetect mora bit zadnji)
// NOTE: ORDERING OF OBJ INITIALIZATIONS IS IMPORTANT (arDetect needs to go last)
this.player = new PlayerData(this);
this.resizer = new Resizer(this);
this.arDetector = new ArDetector(this); // this starts Ar detection. needs optional parameter that prevets ardetdctor from starting
2018-05-12 02:51:58 +02:00
// player dimensions need to be in:
// this.player.dimensions
}
initArDetection() {
2018-05-12 02:51:58 +02:00
this.arDetector.init();
}
startArDetection() {
2018-05-12 02:51:58 +02:00
this.arDetector.start();
2018-05-09 00:03:22 +02:00
}
destroy() {
this.arDetector.stop();
}
setLastAr(lastAr){
this.resizer.setLastAr(lastAr);
}
setAr(ar, lastAr){
this.resizer.setAr(ar, lastAr);
}
setStretchMode(stretchMode){
this.resizer.setStretchMode(stretchMode);
}
2018-05-09 00:03:22 +02:00
}