Merge pull request #1017 from thecodingmachine/change_xxxplayercontrol_name
Renaming restorePlayerControls/disablePlayerControls
This commit is contained in:
commit
d2bab4e7ef
@ -25,8 +25,8 @@ export type IframeEventMap = {
|
|||||||
goToPage: GoToPageEvent
|
goToPage: GoToPageEvent
|
||||||
openCoWebSite: OpenCoWebSiteEvent
|
openCoWebSite: OpenCoWebSiteEvent
|
||||||
closeCoWebSite: null
|
closeCoWebSite: null
|
||||||
disablePlayerControl: null
|
disablePlayerControls: null
|
||||||
restorePlayerControl: null
|
restorePlayerControls: null
|
||||||
displayBubble: null
|
displayBubble: null
|
||||||
removeBubble: null
|
removeBubble: null
|
||||||
}
|
}
|
||||||
@ -52,4 +52,4 @@ export interface IframeResponseEvent<T extends keyof IframeResponseEventMap> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||||
export const isIframeResponseEventWrapper = (event: { type?: string }): event is IframeResponseEvent<keyof IframeResponseEventMap> => typeof event.type === 'string';
|
export const isIframeResponseEventWrapper = (event: { type?: string }): event is IframeResponseEvent<keyof IframeResponseEventMap> => typeof event.type === 'string';
|
||||||
|
@ -96,10 +96,10 @@ class IframeListener {
|
|||||||
else if (payload.type === 'closeCoWebSite') {
|
else if (payload.type === 'closeCoWebSite') {
|
||||||
scriptUtils.closeCoWebSite();
|
scriptUtils.closeCoWebSite();
|
||||||
}
|
}
|
||||||
else if (payload.type === 'disablePlayerControl') {
|
else if (payload.type === 'disablePlayerControls') {
|
||||||
this._disablePlayerControlStream.next();
|
this._disablePlayerControlStream.next();
|
||||||
}
|
}
|
||||||
else if (payload.type === 'restorePlayerControl') {
|
else if (payload.type === 'restorePlayerControls') {
|
||||||
this._enablePlayerControlStream.next();
|
this._enablePlayerControlStream.next();
|
||||||
}
|
}
|
||||||
else if (payload.type === 'displayBubble') {
|
else if (payload.type === 'displayBubble') {
|
||||||
|
@ -20,8 +20,8 @@ interface WorkAdventureApi {
|
|||||||
goToPage(url : string): void;
|
goToPage(url : string): void;
|
||||||
openCoWebSite(url : string): void;
|
openCoWebSite(url : string): void;
|
||||||
closeCoWebSite(): void;
|
closeCoWebSite(): void;
|
||||||
disablePlayerControl(): void;
|
disablePlayerControls(): void;
|
||||||
restorePlayerControl(): void;
|
restorePlayerControls(): void;
|
||||||
displayBubble(): void;
|
displayBubble(): void;
|
||||||
removeBubble(): void;
|
removeBubble(): void;
|
||||||
}
|
}
|
||||||
@ -88,12 +88,12 @@ window.WA = {
|
|||||||
} as ChatEvent
|
} as ChatEvent
|
||||||
}, '*');
|
}, '*');
|
||||||
},
|
},
|
||||||
disablePlayerControl(): void {
|
disablePlayerControls(): void {
|
||||||
window.parent.postMessage({ 'type': 'disablePlayerControl' }, '*');
|
window.parent.postMessage({ 'type': 'disablePlayerControls' }, '*');
|
||||||
},
|
},
|
||||||
|
|
||||||
restorePlayerControl(): void {
|
restorePlayerControls(): void {
|
||||||
window.parent.postMessage({ 'type': 'restorePlayerControl' }, '*');
|
window.parent.postMessage({ 'type': 'restorePlayerControls' }, '*');
|
||||||
},
|
},
|
||||||
|
|
||||||
displayBubble(): void {
|
displayBubble(): void {
|
||||||
|
@ -25,7 +25,7 @@ function launchTuto (){
|
|||||||
label: "Got it!",
|
label: "Got it!",
|
||||||
className : "success",callback:(popup2 => {
|
className : "success",callback:(popup2 => {
|
||||||
popup2.close();
|
popup2.close();
|
||||||
WA.restorePlayerControl();
|
WA.restorePlayerControls();
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
])
|
])
|
||||||
@ -36,7 +36,7 @@ function launchTuto (){
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
]);
|
]);
|
||||||
WA.disablePlayerControl();
|
WA.disablePlayerControls();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -21,7 +21,7 @@ function launchTuto (){
|
|||||||
callback: (popup1) => {
|
callback: (popup1) => {
|
||||||
WA.sendChatMessage("Hey you can talk here too ! ", 'WA Guide');
|
WA.sendChatMessage("Hey you can talk here too ! ", 'WA Guide');
|
||||||
popup1.close();
|
popup1.close();
|
||||||
WA.restorePlayerControl();
|
WA.restorePlayerControls();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -29,7 +29,7 @@ function launchTuto (){
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
]);
|
]);
|
||||||
WA.disablePlayerControl();
|
WA.disablePlayerControls();
|
||||||
|
|
||||||
}
|
}
|
||||||
WA.onChatMessage((message => {
|
WA.onChatMessage((message => {
|
||||||
|
Loading…
Reference in New Issue
Block a user