Compare commits

...

3 commits

Author SHA1 Message Date
Korbs
2a63c7530d Bump version 2024-11-02 05:15:41 -04:00
Korbs
7ff06e549a Add volume controller 2024-11-02 05:15:32 -04:00
Korbs
6d44cba179 Swap out Milieu in original test page 2024-11-02 05:15:18 -04:00
5 changed files with 48 additions and 8 deletions

View file

@ -14,7 +14,7 @@
"live-streaming" "live-streaming"
], ],
"type": "module", "type": "module",
"version": "0.4.52", "version": "0.4.53",
"exports": { "exports": {
".": "./index.ts" ".": "./index.ts"
}, },

View file

@ -12,8 +12,9 @@ import {
Enlarge, Enlarge,
ForwardSolid, ForwardSolid,
PlaySolid, PlaySolid,
Refresh Refresh,
} from "@iconoir/vue"; SoundHighSolid
} from "@iconoir/vue"
--- ---
<div class="video-controls"> <div class="video-controls">
@ -30,6 +31,13 @@ import {
<button id="vc-backwards"><RewindSolid /></button> <button id="vc-backwards"><RewindSolid /></button>
<button id="vc-forwards"><ForwardSolid /></button> <button id="vc-forwards"><ForwardSolid /></button>
} }
<div class="vc-volume-controller">
<button><SoundHighSolid/></button>
<div class="vc-volume-controller-input">
<span style={`background: lightblue`} class="vc-volume-bar"></span>
<input type="range" min="0" max="1.0" step="0.01"/>
</div>
</div>
</div> </div>
<div class="vc-center"> <div class="vc-center">
{Live ? {Live ?
@ -58,7 +66,6 @@ import {
</div> </div>
</div> </div>
<!-- HLS Script --> <!-- HLS Script -->
<!-- Required to support live streaming --> <!-- Required to support live streaming -->
<!-- Script is not loaded if the video player is not set for a stream --> <!-- Script is not loaded if the video player is not set for a stream -->

View file

@ -81,6 +81,24 @@
width: max-content; width: max-content;
} }
} }
.vc-volume-controller, .vc-volume-controller-input {
display: flex;
align-items: center;
}
.vc-volume-controller:hover {
.vc-volume-controller-input {
width: auto;
opacity: 1;
pointer-events: all;
transition: 0.3s opacity, 0.4s width;
}
}
.vc-volume-controller-input {
width: 0px;
opacity: 0;
pointer-events: none;
transition: 0.3s opacity, 0.4s width;
}
.vc-seek { .vc-seek {
background: rgb(255 255 255 / 10%); background: rgb(255 255 255 / 10%);
width: 100%; width: 100%;

View file

@ -24,10 +24,10 @@ import { Settings } from '@iconoir/vue'
--- ---
<div class="video-container"> <div class="video-container">
<video class="main-video" {VideoAttributes} src={Video} poster={Poster} preload="auto"></video> <video class="main-video" {VideoAttributes} disableremoteplayback src={Video} poster={Poster} preload="auto"></video>
{Audio ? <audio class="main-audio"><source {AudioAttributes} src={Audio} type="audio/mp3"/></audio> : null } {Audio ? <audio class="main-audio"><source {AudioAttributes} src={Audio} type="audio/mp3"/></audio> : null }
{Milieu ? <MilieuEffect/> : null }
{Audio ? <Sync/> : null } {Audio ? <Sync/> : null }
{Milieu ? <MilieuEffect/> : null }
{SettingsMenu ? {SettingsMenu ?
<Controls Live={Live}> <Controls Live={Live}>
<button id="open-zorn-settings-button" onclick="OpenZornMenu()"><Settings/></button> <button id="open-zorn-settings-button" onclick="OpenZornMenu()"><Settings/></button>
@ -38,4 +38,20 @@ import { Settings } from '@iconoir/vue'
} }
<Controller/> <Controller/>
<Seek/> <Seek/>
</div> </div>
<!-- Needs control the correct source -->
{Audio ?
<script is:inline>
var ZornAudioSource = document.querySelector('.video-container audio')
var VolumeRange = document.querySelector('.vc-volume-controller-input input')
VolumeRange.addEventListener("input", (event) => {ZornAudioSource.volume = event.target.value})
</script>
:
<script is:inline>
var Player = document.querySelector('.video-container video')
var VolumeRange = document.querySelector('.vc-volume-controller-input input')
VolumeRange.addEventListener("input", (event) => {Player.volume = event.target.value})
</script>
}

View file

@ -15,7 +15,6 @@ import {Zorn} from '@minpluto/zorn'
Poster="https://md.sudovanilla.org/images/eay-p-v.jpg" Poster="https://md.sudovanilla.org/images/eay-p-v.jpg"
Video="https://md.sudovanilla.org/videos/webm/Ennie-and-Yoyki.webm" Video="https://md.sudovanilla.org/videos/webm/Ennie-and-Yoyki.webm"
CustomControlsWithMenu CustomControlsWithMenu
Milieu
SettingsMenu SettingsMenu
> >
<div id="settings" class="vc-menu"> <div id="settings" class="vc-menu">