aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormetamuffin <metamuffin@disroot.org>2025-02-01 00:55:46 +0100
committermetamuffin <metamuffin@disroot.org>2025-02-01 00:55:46 +0100
commitfd1823e7ecf46a230fdf2db009a30931692bc320 (patch)
treec87b8a7da1718f794580fb0eed8ce5fedcc9a6dd
parent0288a7f4ebbca560312aa9b95af32232ed7153a9 (diff)
downloadjellything-fd1823e7ecf46a230fdf2db009a30931692bc320.tar
jellything-fd1823e7ecf46a230fdf2db009a30931692bc320.tar.bz2
jellything-fd1823e7ecf46a230fdf2db009a30931692bc320.tar.zst
make ts linter happy
-rw-r--r--web/script/player/player.ts2
-rw-r--r--web/script/player/sync.ts4
-rw-r--r--web/script/player/track/mse.ts2
3 files changed, 4 insertions, 4 deletions
diff --git a/web/script/player/player.ts b/web/script/player/player.ts
index 5226128..aefc5e6 100644
--- a/web/script/player/player.ts
+++ b/web/script/player/player.ts
@@ -186,7 +186,7 @@ function get_continue_time(w: WatchedState): number {
}
function get_query_start_time() {
- const u = new URL(window.location.href)
+ const u = new URL(globalThis.location.href)
const p = u.searchParams.get("t")
if (!p) return
const x = parseFloat(p)
diff --git a/web/script/player/sync.ts b/web/script/player/sync.ts
index 29a7c80..eabd360 100644
--- a/web/script/player/sync.ts
+++ b/web/script/player/sync.ts
@@ -82,11 +82,11 @@ export class Playersync {
channel_name ??= Math.random().toString(16).padEnd(5, "0").substring(2).substring(0, 6)
let [localpart, remotepart, port] = channel_name.split(":")
- if (!remotepart?.length) remotepart = window.location.host
+ if (!remotepart?.length) remotepart = globalThis.location.host
if (port) remotepart += ":" + port
this.name = localpart + ":" + remotepart
- this.ws = new WebSocket(`${window.location.protocol.endsWith("s:") ? "wss" : "ws"}://${remotepart}/playersync/${encodeURIComponent(localpart)}`)
+ this.ws = new WebSocket(`${globalThis.location.protocol.endsWith("s:") ? "wss" : "ws"}://${remotepart}/playersync/${encodeURIComponent(localpart)}`)
this.on_destroy.push(() => this.ws.close())
this.ws.onopen = () => {
diff --git a/web/script/player/track/mse.ts b/web/script/player/track/mse.ts
index 8e83c78..803d562 100644
--- a/web/script/player/track/mse.ts
+++ b/web/script/player/track/mse.ts
@@ -96,7 +96,7 @@ export class MSEPlayerTrack extends PlayerTrack {
this.buffered.value = ranges;
}
- async update(target: number) {
+ override async update(target: number) {
if (!this.index) return;
this.update_buf_ranges(); // TODO required?