cowebsite

navigation
sound
player
extraction
This commit is contained in:
jonny 2021-05-28 01:14:10 +02:00
parent ea04dd5303
commit 540e5783b6
8 changed files with 1297 additions and 113 deletions

View file

@ -0,0 +1,35 @@
import type { GoToPageEvent } from '../Events/GoToPageEvent';
import type { OpenTabEvent } from '../Events/OpenTabEvent';
import { IframeApiContribution, sendToWorkadventure } from './IframeApiContribution';
class WorkadventureNavigationCommands extends IframeApiContribution<WorkadventureNavigationCommands> {
readonly subObjectIdentifier = "nav"
readonly addMethodsAtRoot = true
callbacks = []
openTab(url: string): void {
sendToWorkadventure({
"type": 'openTab',
"data": {
url
} as OpenTabEvent
});
}
goToPage(url: string): void {
sendToWorkadventure({
"type": 'goToPage',
"data": {
url
} as GoToPageEvent
});
}
}
export default new WorkadventureNavigationCommands();