fix(iframe_api): toggle audio/video race condition

If toggle audio or video is executed too early and the local
tracks don't exist we fail to execute the operation. Now we store
the mute state and we are executing it after the tracks are
created
This commit is contained in:
hristoterezov
2017-04-04 15:55:03 -05:00
parent 1ec06f4bf0
commit ab62690b97
2 changed files with 29 additions and 7 deletions
+3 -3
View File
@@ -47,9 +47,9 @@ function initCommands() {
commands = {
"display-name":
APP.conference.changeLocalDisplayName.bind(APP.conference),
"toggle-audio": APP.conference.toggleAudioMuted.bind(APP.conference),
"toggle-video": APP.conference.toggleVideoMuted.bind(APP.conference),
"toggle-film-strip": APP.UI.toggleFilmstrip,
"toggle-audio": () => APP.conference.toggleAudioMuted(true),
"toggle-video": () => APP.conference.toggleVideoMuted(true),
"toggle-film-strip": APP.UI.toggleFilmStrip,
"toggle-chat": APP.UI.toggleChat,
"toggle-contact-list": APP.UI.toggleContactList,
"toggle-share-screen":