{{!
    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 videotimeplugin_live/controls

    This template will render the publishing controls for Video Time Live

    Variables required for this template:
    * uniqueid - Unique id of player on page
    * vimeo_url - vimeo url

    Variables optional for this template:
    * responsive - markup for next activity button
    * video_description - vimeo video descript

    Example context (json):
    {
        "responsive": true,
        "video": 1,
        "vimeo_url": "https://vimeo.com/323424"
    }

}}
{{# instance }}
<div class="videotime-local-stream justify-content-center" data-roomid="{{ roomid }}" data-contextid="{{ contextid }}">
    {{# types }}
    <div class="{{ type }} hidden position-relative">
        <div class="bg-info mt-2 p-1">
            <a href="#" class="card-link m-0 p-1" data-action="switch" data-type="{{ type }}" data-roomid="{{ roomid }}" data-contextid="{{ contextid }}" title="{{# str }} sharevideo, block_deft {{/ str }}">
                <i class="icon fa fa-toggle-on bg-secondary rounded-circle m-0 p-2"></i>
                <i class="icon fa fa-toggle-off bg-secondary rounded-circle m-0 p-2"></i>
            </a>
            <a href="#" class="card-link hidden m-0 p-1" data-action="mute" data-type="{{ type }}" data-roomid="{{ roomid }}" data-contextid="{{ contextid }}" title="{{# str }} mute, block_deft {{/ str }}"><i class="icon fa fa-microphone bg-secondary rounded-circle m-0 p-2"></i></a><a href="#" class="card-link m-0 p-1" data-action="unmute" data-type="{{ type }}" data-roomid="{{ roomid }}" data-contextid="{{ contextid }}" title="{{# str }} unmute, block_deft {{/ str }}"><i class="icon fa fa-microphone-slash bg-warning rounded-circle m-0 p-2"></i></a>
            <a href="#" class="card-link m-0 p-1" data-action="close" data-type="{{ type }}" data-roomid="{{ roomid }}" data-contextid="{{ contextid }}" title="{{# str }} sharevideo, block_deft {{/ str }}">
                <i class="icon fa fa-sign-out bg-secondary rounded-circle m-0 p-2"></i>
            </a>
        </div>
        <video class="w-100"
            id="video-controls-{{ type }}"
            autoplay
            {{# playsinline }} playsinline {{/ playsinline }}
            <a href="#" class="card-link hidden m-0 p-1" data-action="mute" data-roomid="{{ roomid }}" data-contextid="{{ contextid }}" title="{{# str }} mute, block_deft {{/ str }}"><i class="icon fa fa-microphone bg-secondary rounded-circle m-0 p-2"></i></a><a href="#" class="card-link m-0 p-1" data-action="unmute" data-roomid="{{ roomid }}" data-contextid="{{ contextid }}" title="{{# str }} unmute, block_deft {{/ str }}"><i class="icon fa fa-microphone-slash bg-warning rounded-circle m-0 p-2"></i></a>
        >
        </video>
    </div>
    {{/ types }}
    <div class="videotime-control hidden">
        <div class="text-center">
            <a href="#" class="card-link m-0 p-1" data-action="publish" data-roomid="{{ roomid }}" data-contextid="{{ contextid }}" title="{{# str }} sharevideo, block_deft {{/ str }}">
                <i class="icon fa fa-camera bg-secondary rounded-circle m-0 p-2"></i>
            </a>
            <a href="#" class="card-link m-0 p-1" data-action="unpublish" data-roomid="{{ roomid }}" data-contextid="{{ contextid }}" title="{{# str }} stopvideo, block_deft {{/ str }}">
                <i class="icon fa fa-stop bg-danger rounded-circle m-0 p-2"></i>
            </a>
            <a href="#" class="card-link m-0 p-1" data-action="publish" data-type="display" data-roomid="{{ roomid }}" data-contextid="{{ contextid }}" title="{{# str }} sharevideo, block_deft {{/ str }}">
                <i class="icon fa fa-television bg-secondary rounded-circle m-0 p-2"></i>
            </a>
        </div>
    </div>
</div>
{{/ instance }}
