{{!
    This file is part of Moodle - http://moodle.org/

    Moodle is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    Moodle is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with Moodle.  If not, see <http://www.gnu.org/licenses/>.
}}
{{!
    @template block_deft/janus_room

    This template renders the main venue window page

    Example context (json):
    {
        "autogaincontrol": true,
        "contextid": 2,
        "echocancellation": true,
        "iceservers": "[]",
        "intro": "Hello world",
        "noisesuppression": true,
        "peerid": 109,
        "peers": "[105, 106]",
        "roomid": 3,
        "samplerate": 11025,
        "server": "wss://deftly.us/janus/ws",
        "title": "Venue",
        "token": "dladfjlakerlaa3j4lr",
        "throttle": 100,
        "uniqueid": "eworio"
    }
}}
            {{# enablevideo }}
                <div class="col col-12">
                    <video id="deft_venue_remote_video" width="100%" controls autoplay class="hidden"></video>
                </div>
            {{/ enablevideo }}
{{#js}}
    require([
        {{^ roomid }} 'block_deft/venue_manager'{{/ roomid }}{{# roomid }} 'block_deft/janus_venue'{{/ roomid }},
    ], function(VenueManager) {
        new VenueManager({{ contextid }}, '{{ token }}', {{ peers }}, {{ peerid }}, {{{ iceservers }}}, {{ autogaincontrol }}, {{ echocancellation }}, {{ noisesuppression }}, {{ samplerate }}, {{ roomid }}, '{{ server }}');
});
{{/js}}
