cowebsite
navigation sound player extraction
This commit is contained in:
parent
ea04dd5303
commit
540e5783b6
8 changed files with 1297 additions and 113 deletions
35
front/src/Api/iframe/Navigation.ts
Normal file
35
front/src/Api/iframe/Navigation.ts
Normal 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();
|
Loading…
Add table
Add a link
Reference in a new issue