diff options
author | metamuffin <metamuffin@disroot.org> | 2023-12-12 13:39:04 +0100 |
---|---|---|
committer | metamuffin <metamuffin@disroot.org> | 2023-12-12 13:39:04 +0100 |
commit | e1b06208ca4b8355726ecd95915d136a337c578b (patch) | |
tree | 11e6ca5cb0b7a0ef9d62e6b238a6b27942d26c90 /web/script/player | |
parent | d103a619c8d94436fbf05c344d2eedb04e5c83f9 (diff) | |
download | jellything-e1b06208ca4b8355726ecd95915d136a337c578b.tar jellything-e1b06208ca4b8355726ecd95915d136a337c578b.tar.bz2 jellything-e1b06208ca4b8355726ecd95915d136a337c578b.tar.zst |
clean up some icon stuffs
Diffstat (limited to 'web/script/player')
-rw-r--r-- | web/script/player/mod.ts | 6 | ||||
-rw-r--r-- | web/script/player/profiles.ts | 1 |
2 files changed, 4 insertions, 3 deletions
diff --git a/web/script/player/mod.ts b/web/script/player/mod.ts index 4e4a4cc..ed6677b 100644 --- a/web/script/player/mod.ts +++ b/web/script/player/mod.ts @@ -46,7 +46,7 @@ function initialize_player(el: HTMLElement, node_id: string) { const track_select = (kind: TrackKind) => { let enabled = true const button = e("button", MEDIA_KIND_ICONS[kind][+enabled], { - class: "iicon", + class: "icon", onclick: () => { enabled = !enabled button.textContent = MEDIA_KIND_ICONS[kind][+enabled] @@ -67,7 +67,7 @@ function initialize_player(el: HTMLElement, node_id: string) { const controls = e("div", { class: "jsp-controls" }, player.playing.map(playing => - e("button", { class: "iicon" }, playing ? "pause" : "play_arrow", { onclick: toggle_playing }) + e("button", { class: "icon" }, playing ? "pause" : "play_arrow", { onclick: toggle_playing }) ), e("p", { class: "jsp-status" }, player.position.map(v => e("span", show.duration(v))), e("br"), @@ -96,7 +96,7 @@ function initialize_player(el: HTMLElement, node_id: string) { track_select("subtitles") ), e("button", "fullscreen", { - class: "iicon", + class: "icon", onclick() { if (document.fullscreenElement) document.exitFullscreen() else document.documentElement.requestFullscreen() diff --git a/web/script/player/profiles.ts b/web/script/player/profiles.ts index ad965f8..27c8474 100644 --- a/web/script/player/profiles.ts +++ b/web/script/player/profiles.ts @@ -44,6 +44,7 @@ export class ProfileSelector { const profs = this.profile_list_for_track(track) const sup_remux = await this.remux_supported(track); + if (!sup_remux && !profs.length) return this.player.logger?.log("None of the available codecs are supported. The Media can't be played back.") const min_prof = sup_remux ? -1 : 0 const co = profile.value?.order ?? min_prof // TODO use actual bitrate as a fallback. the server should supply it. |