2018-05-09 00:03:22 +02:00
|
|
|
class VideoData {
|
|
|
|
|
|
|
|
constructor(video){
|
|
|
|
this.video = video;
|
|
|
|
// todo: add ArDetect instance
|
2018-05-13 21:05:11 +02:00
|
|
|
this.arDetector = new ArDetector(video); // this starts Ar detection. needs optional parameter that prevets ardetdctor from starting
|
2018-05-12 02:51:58 +02:00
|
|
|
this.resizer = new Resizer(this);
|
2018-05-13 13:49:25 +02:00
|
|
|
this.player = new PlayerData(this);
|
2018-05-12 02:51:58 +02:00
|
|
|
|
|
|
|
// player dimensions need to be in:
|
|
|
|
// this.player.dimensions
|
|
|
|
}
|
|
|
|
|
|
|
|
initAr() {
|
|
|
|
this.arDetector.init();
|
|
|
|
}
|
|
|
|
|
|
|
|
startAr() {
|
|
|
|
this.arDetector.start();
|
2018-05-09 00:03:22 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
destroy() {
|
|
|
|
this.arDetector.stop();
|
|
|
|
}
|
2018-05-09 00:34:22 +02:00
|
|
|
|
|
|
|
setLastAr(lastAr){
|
|
|
|
this.resizer.setLastAr(lastAr);
|
|
|
|
}
|
|
|
|
|
2018-05-13 21:05:11 +02:00
|
|
|
setAr(ar, lastAr){
|
|
|
|
this.resizer.setAr(ar, lastAr);
|
|
|
|
}
|
|
|
|
|
|
|
|
setStretchMode(stretchMode){
|
|
|
|
this.resizer.setStretchMode(stretchMode);
|
|
|
|
}
|
2018-05-13 13:49:25 +02:00
|
|
|
|
2018-05-09 00:03:22 +02:00
|
|
|
}
|