Add more toggle options
This commit is contained in:
parent
c0d30caad3
commit
0f27fc7815
|
@ -1,12 +1,21 @@
|
||||||
---
|
---
|
||||||
// Properties
|
// Properties
|
||||||
const {
|
const {
|
||||||
|
// Meta
|
||||||
Title,
|
Title,
|
||||||
|
PlayerName,
|
||||||
|
SeekColor = '#2185d0',
|
||||||
|
|
||||||
|
// Type
|
||||||
Live,
|
Live,
|
||||||
|
|
||||||
|
// Toggles
|
||||||
ShowBackAndForward,
|
ShowBackAndForward,
|
||||||
ShowPlaybackRate,
|
ShowPlaybackRate,
|
||||||
SeekColor = '#2185d0',
|
ShowPiP = true,
|
||||||
PlayerName,
|
ShowFullscreen = true,
|
||||||
|
|
||||||
|
// OThers
|
||||||
Subtitles
|
Subtitles
|
||||||
} = Astro.props
|
} = Astro.props
|
||||||
|
|
||||||
|
@ -19,7 +28,8 @@ import './Styles/Iconoir.css'
|
||||||
|
|
||||||
<div class="video-controls">
|
<div class="video-controls">
|
||||||
<div class="vc-top">
|
<div class="vc-top">
|
||||||
<p>{Title}</p>
|
<div>{Title ? <p id="vc-title">{Title}</p> : null}</div>
|
||||||
|
<div><p id="vc-buffering"><i class="iconoir-refresh-circle-solid"></i> Buffering...</p> </div>
|
||||||
</div>
|
</div>
|
||||||
<div id="vc-gestures">
|
<div id="vc-gestures">
|
||||||
<span id="vc-gesture-left"></span>
|
<span id="vc-gesture-left"></span>
|
||||||
|
@ -63,18 +73,12 @@ import './Styles/Iconoir.css'
|
||||||
}
|
}
|
||||||
</div>
|
</div>
|
||||||
<div class="vc-end">
|
<div class="vc-end">
|
||||||
{Live ?
|
{Live ? <HLS/><span id="live-text" style="pointer-events: none;border-radius: 3rem;padding: 6px 12px;background: #933c3c;letter-spacing: 4px;">Live</span>:null}
|
||||||
<HLS/>
|
|
||||||
<span id="live-text" style="pointer-events: none;border-radius: 3rem;padding: 6px 12px;background: #933c3c;letter-spacing: 4px;">Live</span>
|
|
||||||
:
|
|
||||||
null
|
|
||||||
}
|
|
||||||
<slot/>
|
<slot/>
|
||||||
<!-- The requestPictureInPicture() function is not supported in Firefox -->
|
{ShowPiP ? <button id="vc-pip" onclick={'document.querySelector("#zorn-player-' + PlayerName + ' video").requestPictureInPicture()'}><i class="iconoir-multi-window"></i></button> : null}
|
||||||
<button id="vc-pip" onclick={'document.querySelector("#zorn-player-' + PlayerName + ' video").requestPictureInPicture()'}><i class="iconoir-multi-window"></i></button>
|
|
||||||
{Subtitles ? <button id="vc-subtitles"><i class="iconoir-closed-captions-tag-solid"></i></button> : null}
|
{Subtitles ? <button id="vc-subtitles"><i class="iconoir-closed-captions-tag-solid"></i></button> : null}
|
||||||
{ShowPlaybackRate ? <button onclick="PlayerMenu_PlaybackRate()"><i class="iconoir-timer-solid"></i></button> : null}
|
{ShowPlaybackRate ? <button id="vc-playbackrate"><i class="iconoir-timer-solid"></i></button> : null}
|
||||||
<button id="vc-fullscreen"><i class="iconoir-enlarge"></i></button>
|
{ShowFullscreen ? <button id="vc-fullscreen"><i class="iconoir-enlarge"></i></button> : null}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
Loading…
Reference in a new issue