diff --git a/lib/editor/atto/plugins/recordrtc/yui/build/moodle-atto_recordrtc-button/moodle-atto_recordrtc-button-debug.js b/lib/editor/atto/plugins/recordrtc/yui/build/moodle-atto_recordrtc-button/moodle-atto_recordrtc-button-debug.js
index 213b2f2890b..01803703c75 100644
--- a/lib/editor/atto/plugins/recordrtc/yui/build/moodle-atto_recordrtc-button/moodle-atto_recordrtc-button-debug.js
+++ b/lib/editor/atto/plugins/recordrtc/yui/build/moodle-atto_recordrtc-button/moodle-atto_recordrtc-button-debug.js
@@ -118,12 +118,12 @@ Y.namespace('M.atto_recordrtc').Button = Y.Base.create('button', Y.M.editor_atto
focusAfterHide: null
});
- // If dialogue is closed during recording, do the following.
dialogue.after('visibleChange', function() {
var closed = !dialogue.get('visible'),
m = M.atto_recordrtc.commonmodule;
if (closed) {
+ // If dialogue is closed during recording, do the following.
window.clearInterval(m.countdownTicker);
if (m.mediaRecorder && m.mediaRecorder.state !== 'inactive') {
@@ -137,9 +137,14 @@ Y.namespace('M.atto_recordrtc').Button = Y.Base.create('button', Y.M.editor_atto
}
});
}
+
+ // Because the player uses ids to identify things (this should be fixed)
+ // we must make sure the dialogue contents only exist once in the DOM.
+ // Therefore, when a dialogue is closed, we must remove its contents.
+ this.getDialogue().set('bodyContent', '');
}
- });
+ }, this);
dialogue.on('click', function() {
this.centered();
diff --git a/lib/editor/atto/plugins/recordrtc/yui/build/moodle-atto_recordrtc-button/moodle-atto_recordrtc-button-min.js b/lib/editor/atto/plugins/recordrtc/yui/build/moodle-atto_recordrtc-button/moodle-atto_recordrtc-button-min.js
index c5a0167d723..5e67af118c5 100644
--- a/lib/editor/atto/plugins/recordrtc/yui/build/moodle-atto_recordrtc-button/moodle-atto_recordrtc-button-min.js
+++ b/lib/editor/atto/plugins/recordrtc/yui/build/moodle-atto_recordrtc-button/moodle-atto_recordrtc-button-min.js
@@ -1 +1 @@
-YUI.add("moodle-atto_recordrtc-button",function(e,t){var n="atto_recordrtc",r='
{{insecurealert_title}} {{insecurealert}}
{{#if isAudio}}
{{else}}
{{/if}}
';e.namespace("M.atto_recordrtc").Button=e.Base.create("button",e.M.editor_atto.EditorPlugin,[],{_lang:"en",initializer:function(){if(this.get("host").canShowFilepicker("media")){var e=this.get("allowedtypes"),t=!1;if(e==="both"||e==="audio")this._addButton("audio",this._audio),t=!0;if(e==="both"||e==="video")this._addButton("video",this._video),t=!0;if(!t)return;var n=this.getDialogue({width:1e3,focusAfterHide:null});n.after("visibleChange",function(){var e=!n.get("visible"),t=M.atto_recordrtc.commonmodule;e&&(window.clearInterval(t.countdownTicker),t.mediaRecorder&&t.mediaRecorder.state!=="inactive"&&t.mediaRecorder.stop(),t.stream&&t.stream.getTracks().forEach(function(e){e.readyState!=="ended"&&e.stop()}))}),n.on("click",function(){this.centered()}),window.require(["core/adapter"],function(e){window.adapter=e})}},_addButton:function(e,t){this.addButton({buttonName:e,icon:this.get(e+"rtcicon"),iconComponent:n,callback:t,title:e+"rtc",tags:e+"rtc",tagMatchRequiresAll:!1})},_audio:function(){var e=this.getDialogue();e.set("headerContent",M.util.get_string("audiortc","atto_recordrtc")),e.set("bodyContent",this._createContent("audio")),e.show(),M.atto_recordrtc.audiomodule.init(this)},_video:function(){var e=this.getDialogue();e.set("headerContent",M.util.get_string("videortc","atto_recordrtc")),e.set("bodyContent",this._createContent("video")),e.show(),M.atto_recordrtc.videomodule.init(this)},_createContent:function(t){var i=t==="audio",s="row",o="col-xs-",u="alert-danger",a="btn btn-lg btn-outline-danger btn-block",f=e.Handlebars.compile(r)({PLUGINNAME:n,isAudio:i,bs_row:s,bs_col:o,bs_al_dang:u,bs_ss_btn:a,insecurealert_title:M.util.get_string("insecurealert_title","atto_recordrtc"),insecurealert:M.util.get_string("insecurealert","atto_recordrtc"),startrecording:M.util.get_string("startrecording","atto_recordrtc"),attachrecording:M.util.get_string("attachrecording","atto_recordrtc")});return f},closeDialogue:function(e){e.getDialogue().hide(),e.editor.focus()},setLink:function(e,t){e.getDialogue().hide(),e.editor.focus(),e.get("host").insertContentAtFocusPoint(t),e.markUpdated()}},{ATTRS:{contextid:{value:null},sesskey:{value:null},allowedtypes:{value:null},audiobitrate:{value:null},videobitrate:{value:null},timelimit:{value:null},audiortcicon:{value:null},videortcicon:{value:null},maxrecsize:{value:null}}})},"@VERSION@",{requires:["moodle-editor_atto-plugin","moodle-atto_recordrtc-recording"]});
+YUI.add("moodle-atto_recordrtc-button",function(e,t){var n="atto_recordrtc",r='{{insecurealert_title}} {{insecurealert}}
{{#if isAudio}}
{{else}}
{{/if}}
';e.namespace("M.atto_recordrtc").Button=e.Base.create("button",e.M.editor_atto.EditorPlugin,[],{_lang:"en",initializer:function(){if(this.get("host").canShowFilepicker("media")){var e=this.get("allowedtypes"),t=!1;if(e==="both"||e==="audio")this._addButton("audio",this._audio),t=!0;if(e==="both"||e==="video")this._addButton("video",this._video),t=!0;if(!t)return;var n=this.getDialogue({width:1e3,focusAfterHide:null});n.after("visibleChange",function(){var e=!n.get("visible"),t=M.atto_recordrtc.commonmodule;e&&(window.clearInterval(t.countdownTicker),t.mediaRecorder&&t.mediaRecorder.state!=="inactive"&&t.mediaRecorder.stop(),t.stream&&t.stream.getTracks().forEach(function(e){e.readyState!=="ended"&&e.stop()}),this.getDialogue().set("bodyContent",""))},this),n.on("click",function(){this.centered()}),window.require(["core/adapter"],function(e){window.adapter=e})}},_addButton:function(e,t){this.addButton({buttonName:e,icon:this.get(e+"rtcicon"),iconComponent:n,callback:t,title:e+"rtc",tags:e+"rtc",tagMatchRequiresAll:!1})},_audio:function(){var e=this.getDialogue();e.set("headerContent",M.util.get_string("audiortc","atto_recordrtc")),e.set("bodyContent",this._createContent("audio")),e.show(),M.atto_recordrtc.audiomodule.init(this)},_video:function(){var e=this.getDialogue();e.set("headerContent",M.util.get_string("videortc","atto_recordrtc")),e.set("bodyContent",this._createContent("video")),e.show(),M.atto_recordrtc.videomodule.init(this)},_createContent:function(t){var i=t==="audio",s="row",o="col-xs-",u="alert-danger",a="btn btn-lg btn-outline-danger btn-block",f=e.Handlebars.compile(r)({PLUGINNAME:n,isAudio:i,bs_row:s,bs_col:o,bs_al_dang:u,bs_ss_btn:a,insecurealert_title:M.util.get_string("insecurealert_title","atto_recordrtc"),insecurealert:M.util.get_string("insecurealert","atto_recordrtc"),startrecording:M.util.get_string("startrecording","atto_recordrtc"),attachrecording:M.util.get_string("attachrecording","atto_recordrtc")});return f},closeDialogue:function(e){e.getDialogue().hide(),e.editor.focus()},setLink:function(e,t){e.getDialogue().hide(),e.editor.focus(),e.get("host").insertContentAtFocusPoint(t),e.markUpdated()}},{ATTRS:{contextid:{value:null},sesskey:{value:null},allowedtypes:{value:null},audiobitrate:{value:null},videobitrate:{value:null},timelimit:{value:null},audiortcicon:{value:null},videortcicon:{value:null},maxrecsize:{value:null}}})},"@VERSION@",{requires:["moodle-editor_atto-plugin","moodle-atto_recordrtc-recording"]});
diff --git a/lib/editor/atto/plugins/recordrtc/yui/build/moodle-atto_recordrtc-button/moodle-atto_recordrtc-button.js b/lib/editor/atto/plugins/recordrtc/yui/build/moodle-atto_recordrtc-button/moodle-atto_recordrtc-button.js
index 213b2f2890b..01803703c75 100644
--- a/lib/editor/atto/plugins/recordrtc/yui/build/moodle-atto_recordrtc-button/moodle-atto_recordrtc-button.js
+++ b/lib/editor/atto/plugins/recordrtc/yui/build/moodle-atto_recordrtc-button/moodle-atto_recordrtc-button.js
@@ -118,12 +118,12 @@ Y.namespace('M.atto_recordrtc').Button = Y.Base.create('button', Y.M.editor_atto
focusAfterHide: null
});
- // If dialogue is closed during recording, do the following.
dialogue.after('visibleChange', function() {
var closed = !dialogue.get('visible'),
m = M.atto_recordrtc.commonmodule;
if (closed) {
+ // If dialogue is closed during recording, do the following.
window.clearInterval(m.countdownTicker);
if (m.mediaRecorder && m.mediaRecorder.state !== 'inactive') {
@@ -137,9 +137,14 @@ Y.namespace('M.atto_recordrtc').Button = Y.Base.create('button', Y.M.editor_atto
}
});
}
+
+ // Because the player uses ids to identify things (this should be fixed)
+ // we must make sure the dialogue contents only exist once in the DOM.
+ // Therefore, when a dialogue is closed, we must remove its contents.
+ this.getDialogue().set('bodyContent', '');
}
- });
+ }, this);
dialogue.on('click', function() {
this.centered();
diff --git a/lib/editor/atto/plugins/recordrtc/yui/src/button/js/button.js b/lib/editor/atto/plugins/recordrtc/yui/src/button/js/button.js
index 29ab713b520..8156697d7de 100644
--- a/lib/editor/atto/plugins/recordrtc/yui/src/button/js/button.js
+++ b/lib/editor/atto/plugins/recordrtc/yui/src/button/js/button.js
@@ -116,12 +116,12 @@ Y.namespace('M.atto_recordrtc').Button = Y.Base.create('button', Y.M.editor_atto
focusAfterHide: null
});
- // If dialogue is closed during recording, do the following.
dialogue.after('visibleChange', function() {
var closed = !dialogue.get('visible'),
m = M.atto_recordrtc.commonmodule;
if (closed) {
+ // If dialogue is closed during recording, do the following.
window.clearInterval(m.countdownTicker);
if (m.mediaRecorder && m.mediaRecorder.state !== 'inactive') {
@@ -135,9 +135,14 @@ Y.namespace('M.atto_recordrtc').Button = Y.Base.create('button', Y.M.editor_atto
}
});
}
+
+ // Because the player uses ids to identify things (this should be fixed)
+ // we must make sure the dialogue contents only exist once in the DOM.
+ // Therefore, when a dialogue is closed, we must remove its contents.
+ this.getDialogue().set('bodyContent', '');
}
- });
+ }, this);
dialogue.on('click', function() {
this.centered();