aboutsummaryrefslogtreecommitdiff
path: root/web/script/player/mod.ts
diff options
context:
space:
mode:
Diffstat (limited to 'web/script/player/mod.ts')
-rw-r--r--web/script/player/mod.ts12
1 files changed, 9 insertions, 3 deletions
diff --git a/web/script/player/mod.ts b/web/script/player/mod.ts
index fa83a2b..7a0e8fd 100644
--- a/web/script/player/mod.ts
+++ b/web/script/player/mod.ts
@@ -81,7 +81,13 @@ function initialize_player(el: HTMLElement, node_id: string) {
slider.valueAsNumber = player.video.volume
slider.onchange = () => player.video.volume = slider.valueAsNumber
slider.onmousemove = () => player.video.volume = slider.valueAsNumber
- return [e("div", { class: "jsp-controlgroup" }, e("label", "Volume", slider))]
+ return [e("div", { class: ["jsp-controlgroup", "jsp-volumecontrol"] },
+ e("label", `Volume`),
+ e("span", { class: "jsp-volume" }, player.volume.map(v =>
+ `${(v * 100).toFixed(2)}% | ${v == 0 ? "-∞" : (Math.log2(v) * 10).toFixed(2)}dB` as string
+ )),
+ slider
+ )]
}
new Popup(button, popups, () =>
@@ -119,7 +125,7 @@ function initialize_player(el: HTMLElement, node_id: string) {
playersync_controls(sync_state, player),
e("button", "Launch Native Player", {
onclick: () => {
- window.location.href = `jellynative://player-fullscreen/${window.location.protocol}//${window.location.host}/n/${encodeURIComponent(node_id)}/stream?format=hlsmaster`
+ window.location.href = `?kind=nativefullscreen`
}
})
))
@@ -257,4 +263,4 @@ function show_profile(profile: EncodingProfile): string {
if (profile.video) return `codec=${profile.video.codec} br=${show.metric(profile.video.bitrate, "b/s")} w=${profile.video.width} preset=${profile.video.preset}`
if (profile.subtitles) return `codec=${profile.subtitles.codec}`
return `???`
-}
+} \ No newline at end of file