Put a parent event bus to pageInfo
This commit is contained in:
parent
4b44efe6fc
commit
74fe85f3a2
@ -135,7 +135,7 @@ export default class UWContent {
|
|||||||
if (this.actionHandler) {
|
if (this.actionHandler) {
|
||||||
this.actionHandler.destroy();
|
this.actionHandler.destroy();
|
||||||
}
|
}
|
||||||
this.actionHandler = new ActionHandler(this.pageInfo);
|
this.actionHandler = new ActionHandler(this.pageInfo.eventBus, this.settings, this.logger);
|
||||||
this.actionHandler.init();
|
this.actionHandler.init();
|
||||||
|
|
||||||
this.logger.log('info', 'debug', "[uw.js::setup] ActionHandler initiated.");
|
this.logger.log('info', 'debug', "[uw.js::setup] ActionHandler initiated.");
|
||||||
|
@ -7,6 +7,7 @@ import Logger from '../Logger';
|
|||||||
import Settings from '../Settings';
|
import Settings from '../Settings';
|
||||||
import ExtensionMode from '../../../common/enums/ExtensionMode.enum';
|
import ExtensionMode from '../../../common/enums/ExtensionMode.enum';
|
||||||
import CommsClient from '../comms/CommsClient';
|
import CommsClient from '../comms/CommsClient';
|
||||||
|
import EventBus from '../EventBus';
|
||||||
|
|
||||||
if (process.env.CHANNEL !== 'stable'){
|
if (process.env.CHANNEL !== 'stable'){
|
||||||
console.info("Loading PageInfo");
|
console.info("Loading PageInfo");
|
||||||
@ -51,6 +52,7 @@ class PageInfo {
|
|||||||
logger: Logger;
|
logger: Logger;
|
||||||
settings: Settings;
|
settings: Settings;
|
||||||
comms: CommsClient;
|
comms: CommsClient;
|
||||||
|
eventBus: EventBus;
|
||||||
videos: {videoData: VideoData, element: HTMLVideoElement}[] = [];
|
videos: {videoData: VideoData, element: HTMLVideoElement}[] = [];
|
||||||
//#endregion
|
//#endregion
|
||||||
|
|
||||||
@ -73,6 +75,8 @@ class PageInfo {
|
|||||||
this.extensionMode = extensionMode;
|
this.extensionMode = extensionMode;
|
||||||
this.readOnly = readOnly;
|
this.readOnly = readOnly;
|
||||||
|
|
||||||
|
this.eventBus = new EventBus();
|
||||||
|
|
||||||
if (comms){
|
if (comms){
|
||||||
this.comms = comms;
|
this.comms = comms;
|
||||||
}
|
}
|
||||||
|
@ -90,6 +90,10 @@ class VideoData {
|
|||||||
|
|
||||||
this.eventBus = new EventBus();
|
this.eventBus = new EventBus();
|
||||||
|
|
||||||
|
if (pageInfo.eventBus) {
|
||||||
|
this.eventBus.setUpstreamBus(pageInfo.eventBus);
|
||||||
|
}
|
||||||
|
|
||||||
this.setupStageOne();
|
this.setupStageOne();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user