this should be included in "re-add legacy aard" commit
This commit is contained in:
parent
f5e308c5b4
commit
baa7c79f6c
@ -17,6 +17,7 @@ import ExtensionMode from '../../../common/enums/ExtensionMode.enum';
|
|||||||
import { ExtensionEnvironment } from '../../../common/interfaces/SettingsInterface';
|
import { ExtensionEnvironment } from '../../../common/interfaces/SettingsInterface';
|
||||||
import { LogAggregator } from '../logging/LogAggregator';
|
import { LogAggregator } from '../logging/LogAggregator';
|
||||||
import { ComponentLogger } from '../logging/ComponentLogger';
|
import { ComponentLogger } from '../logging/ComponentLogger';
|
||||||
|
import { AardLegacy } from '../aard/AardLegacy';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* VideoData — handles CSS for the video element.
|
* VideoData — handles CSS for the video element.
|
||||||
@ -73,7 +74,7 @@ class VideoData {
|
|||||||
player: PlayerData;
|
player: PlayerData;
|
||||||
resizer: Resizer;
|
resizer: Resizer;
|
||||||
|
|
||||||
aard: Aard;
|
aard: Aard | AardLegacy;
|
||||||
|
|
||||||
eventBus: EventBus;
|
eventBus: EventBus;
|
||||||
extensionStatus: ExtensionStatus;
|
extensionStatus: ExtensionStatus;
|
||||||
@ -259,7 +260,7 @@ class VideoData {
|
|||||||
this.resizer = new Resizer(this);
|
this.resizer = new Resizer(this);
|
||||||
|
|
||||||
try {
|
try {
|
||||||
this.aard = new Aard(this); // this starts Ar detection. needs optional parameter that prevents ArDetector from starting
|
this.aard = this.settings.active.aard.useLegacy ? new AardLegacy(this) : new Aard(this); // this starts Ar detection. needs optional parameter that prevents ArDetector from starting
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
console.error('Failed to start Aard!', e);
|
console.error('Failed to start Aard!', e);
|
||||||
}
|
}
|
||||||
@ -702,7 +703,7 @@ class VideoData {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (! this.aard){
|
if (! this.aard){
|
||||||
this.aard = new Aard(this);
|
this.aard = this.settings.active.aard.useLegacy ? new AardLegacy(this): new Aard(this);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user