{"size": 2931, "ext": "js", "max_stars_repo_path": "lms/mod/bigbluebuttonbn/yui/build/moodle-mod_bigbluebuttonbn-broker/moodle-mod_bigbluebuttonbn-broker-min.js", "max_stars_repo_name": "sirromas/drops", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "lms/mod/bigbluebuttonbn/yui/build/moodle-mod_bigbluebuttonbn-broker/moodle-mod_bigbluebuttonbn-broker-min.js", "max_issues_repo_name": "sirromas/drops", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "lms/mod/bigbluebuttonbn/yui/build/moodle-mod_bigbluebuttonbn-broker/moodle-mod_bigbluebuttonbn-broker-min.js", "max_forks_repo_name": "sirromas/drops", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 1465.5, "max_line_length": 2930, "alphanum_fraction": 0.8045035824}
YUI.add("moodle-mod_bigbluebuttonbn-broker",function(e,t){M.mod_bigbluebuttonbn=M.mod_bigbluebuttonbn||{},M.mod_bigbluebuttonbn.broker={datasource:null,bigbluebuttonbn:{},init:function(t){this.datasource=new e.DataSource.Get({source:M.cfg.wwwroot+"/mod/bigbluebuttonbn/bbb_broker.php?"}),this.bigbluebuttonbn=t},joinRedirect:function(e){window.open(e)},recordingActionPerform:function(e){var t="action=recording_"+e.action+"&id="+e.recordingid+"&idx="+e.meetingid;t+=this.recordingActionMetaQS(e),e.attempt=1,typeof e.attempts=="undefined"&&(e.attempts=5),this.datasource.sendRequest({request:t,callback:{success:function(t){return t.data.status?typeof e.goalstate=="undefined"?M.mod_bigbluebuttonbn.recordings.recordingActionCompletion(e):e.attempts<=1?M.mod_bigbluebuttonbn.broker.recordingActionPerformedComplete(t,e):M.mod_bigbluebuttonbn.broker.recordingActionPerformedValidate(e):(e.message=t.data.message,M.mod_bigbluebuttonbn.recordings.recordingActionFailover(e))},failure:function(t){return e.message=t.error.message,M.mod_bigbluebuttonbn.recordings.recordingActionFailover(e)}}})},recordingActionMetaQS:function(e){var t="";if(typeof e.source!="undefined"){var n={};n[e.source]=encodeURIComponent(e.goalstate),t+="&meta="+JSON.stringify(n)}return t},recordingActionPerformedValidate:function(e){var t="action=recording_info&id="+e.recordingid+"&idx="+e.meetingid;t+=this.recordingActionMetaQS(e),this.datasource.sendRequest({request:t,callback:{success:function(t){if(M.mod_bigbluebuttonbn.broker.recordingActionPerformedComplete(t,e))return;if(e.attempt<e.attempts){e.attempt+=1,setTimeout(function(){return function(){M.mod_bigbluebuttonbn.broker.recordingActionPerformedValidate(e)}}(this),(e.attempt-1)*1e3);return}e.message=M.util.get_string("view_error_action_not_completed","bigbluebuttonbn"),M.mod_bigbluebuttonbn.recordings.recordingActionFailover(e)},failure:function(t){e.message=t.error.message,M.mod_bigbluebuttonbn.recordings.recordingActionFailover(e)}}})},recordingActionPerformedComplete:function(e,t){return typeof e.data[t.source]=="undefined"?(t.message=M.util.get_string("view_error_current_state_not_found","bigbluebuttonbn"),M.mod_bigbluebuttonbn.recordings.recordingActionFailover(t),!0):e.data[t.source]===t.goalstate?(M.mod_bigbluebuttonbn.recordings.recordingActionCompletion(t),!0):!1},recordingCurrentState:function(e,t){return e==="publish"||e==="unpublish"?t.published:e==="delete"?t.status:e==="protect"||e==="unprotect"?t.secured:e==="update"?t.updated:null},endMeeting:function(){var e="action=meeting_end&id="+this.bigbluebuttonbn.meetingid;e+="&bigbluebuttonbn="+this.bigbluebuttonbn.bigbluebuttonbnid,this.datasource.sendRequest({request:e,callback:{success:function(e){e.data.status&&(M.mod_bigbluebuttonbn.rooms.endMeeting(),location.reload())}}})}}},"@VERSION@",{requires:["base","node","datasource-get","datasource-jsonschema","datasource-polling","moodle-core-notification"]});
