trigger + audioplayer improvements

This commit is contained in:
_Bastler
2021-04-21 07:44:12 +02:00
parent d55e6e9c84
commit e03cf9dc26
6 changed files with 94 additions and 17 deletions
+46
View File
@@ -852,6 +852,25 @@ ${escapedMessage}
scriptedBubbleSprite.destroy();
}));
this.iframeSubscriptionList.push(iframeListener.unregisterIFrameStream.subscribe(() => {
const allProps = this.gameMap.getCurrentProperties();
if(allProps.get("openWebsite") == null) {
layoutManager.removeActionButton('openWebsite', this.userInputManager);
} else {
const openWebsiteFunction = () => {
coWebsiteManager.loadCoWebsite(allProps.get("openWebsite") as string, this.MapUrlFile, allProps.get('openWebsiteAllowApi') as boolean | undefined, allProps.get('openWebsitePolicy') as string | undefined);
layoutManager.removeActionButton('openWebsite', this.userInputManager);
};
let message = allProps.get(WEBSITE_MESSAGE_PROPERTIES);
if(message === undefined) {
message = 'Press SPACE or touch here to open web site';
}
layoutManager.addActionButton('openWebsite', message.toString(), () => {
openWebsiteFunction();
}, this.userInputManager);
}
}));
}
private getMapDirUrl(): string {
@@ -1456,6 +1475,33 @@ ${escapedMessage}
mediaManager.showGameOverlay();
mediaManager.removeTriggerCloseJitsiFrameButton('close-jisi');
const allProps = this.gameMap.getCurrentProperties();
if(allProps.get("jitsiRoom") === undefined) {
layoutManager.removeActionButton('jitsiRoom', this.userInputManager);
} else {
const openJitsiRoomFunction = () => {
const roomName = jitsiFactory.getRoomName(allProps.get("jitsiRoom") as string, this.instance);
const jitsiUrl = allProps.get("jitsiUrl") as string | undefined;
if(JITSI_PRIVATE_MODE && !jitsiUrl) {
const adminTag = allProps.get("jitsiRoomAdminTag") as string | undefined;
this.connection.emitQueryJitsiJwtMessage(roomName, adminTag);
} else {
this.startJitsi(roomName, undefined);
}
layoutManager.removeActionButton('jitsiRoom', this.userInputManager);
}
let message = allProps.get(JITSI_MESSAGE_PROPERTIES);
if(message === undefined) {
message = 'Press SPACE or touch here to enter Jitsi Meet room';
}
layoutManager.addActionButton('jitsiRoom', message.toString(), () => {
openJitsiRoomFunction();
}, this.userInputManager);
}
}
//todo: put this into an 'orchestrator' scene (EntryScene?)