Merge pull request #1017 from thecodingmachine/change_xxxplayercontrol_name

Renaming restorePlayerControls/disablePlayerControls
This commit is contained in:
David Négrier 2021-05-10 12:35:34 +02:00 committed by GitHub
commit d2bab4e7ef
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 15 additions and 15 deletions

View File

@ -25,8 +25,8 @@ export type IframeEventMap = {
goToPage: GoToPageEvent
openCoWebSite: OpenCoWebSiteEvent
closeCoWebSite: null
disablePlayerControl: null
restorePlayerControl: null
disablePlayerControls: null
restorePlayerControls: null
displayBubble: null
removeBubble: null
}

View File

@ -96,10 +96,10 @@ class IframeListener {
else if (payload.type === 'closeCoWebSite') {
scriptUtils.closeCoWebSite();
}
else if (payload.type === 'disablePlayerControl') {
else if (payload.type === 'disablePlayerControls') {
this._disablePlayerControlStream.next();
}
else if (payload.type === 'restorePlayerControl') {
else if (payload.type === 'restorePlayerControls') {
this._enablePlayerControlStream.next();
}
else if (payload.type === 'displayBubble') {

View File

@ -20,8 +20,8 @@ interface WorkAdventureApi {
goToPage(url : string): void;
openCoWebSite(url : string): void;
closeCoWebSite(): void;
disablePlayerControl(): void;
restorePlayerControl(): void;
disablePlayerControls(): void;
restorePlayerControls(): void;
displayBubble(): void;
removeBubble(): void;
}
@ -88,12 +88,12 @@ window.WA = {
} as ChatEvent
}, '*');
},
disablePlayerControl(): void {
window.parent.postMessage({ 'type': 'disablePlayerControl' }, '*');
disablePlayerControls(): void {
window.parent.postMessage({ 'type': 'disablePlayerControls' }, '*');
},
restorePlayerControl(): void {
window.parent.postMessage({ 'type': 'restorePlayerControl' }, '*');
restorePlayerControls(): void {
window.parent.postMessage({ 'type': 'restorePlayerControls' }, '*');
},
displayBubble(): void {

View File

@ -25,7 +25,7 @@ function launchTuto (){
label: "Got it!",
className : "success",callback:(popup2 => {
popup2.close();
WA.restorePlayerControl();
WA.restorePlayerControls();
})
}
])
@ -36,7 +36,7 @@ function launchTuto (){
}
}
]);
WA.disablePlayerControl();
WA.disablePlayerControls();
}

View File

@ -21,7 +21,7 @@ function launchTuto (){
callback: (popup1) => {
WA.sendChatMessage("Hey you can talk here too ! ", 'WA Guide');
popup1.close();
WA.restorePlayerControl();
WA.restorePlayerControls();
}
}
@ -29,7 +29,7 @@ function launchTuto (){
}
}
]);
WA.disablePlayerControl();
WA.disablePlayerControls();
}
WA.onChatMessage((message => {