From 841c82459054fa25fe4dd9b0bcce6d425f3f3665 Mon Sep 17 00:00:00 2001 From: bytedream Date: Sat, 23 Jul 2022 17:28:47 +0200 Subject: [PATCH] Fix native player error message --- src/ui/player/player.html | 2 ++ src/ui/player/player.sass | 11 +++++------ src/ui/player/player.ts | 8 ++++---- 3 files changed, 11 insertions(+), 10 deletions(-) diff --git a/src/ui/player/player.html b/src/ui/player/player.html index 8c1514a..3d23ad7 100644 --- a/src/ui/player/player.html +++ b/src/ui/player/player.html @@ -10,6 +10,8 @@ diff --git a/src/ui/player/player.sass b/src/ui/player/player.sass index 80dddeb..a86e292 100644 --- a/src/ui/player/player.sass +++ b/src/ui/player/player.sass @@ -15,11 +15,10 @@ video display: flex justify-content: center align-items: center + flex-direction: column + color: white + text-align: center height: 100% - #message - color: white - text-align: center - - & a, & a:visited - color: red + & a, & a:visited + color: red diff --git a/src/ui/player/player.ts b/src/ui/player/player.ts index bc1f446..5355f22 100644 --- a/src/ui/player/player.ts +++ b/src/ui/player/player.ts @@ -3,7 +3,7 @@ import {Match, matches, Reliability} from "../../match/matches"; import Hls from "hls.js"; function show_message(message: string) { - document.getElementById('message').innerHTML = message + document.getElementById('message').innerText = message document.getElementById('message-container').hidden = false document.getElementById('video').hidden = true } @@ -48,9 +48,9 @@ async function play_hls(url: string, match: Match) { message = `The reliability for this domain is normal, errors like this can occur but are not very common. Try to refresh the page` break case Reliability.HIGH: - message = `The reliability for this domains is high, errors like this are very unlikely to happen.
- Try to refresh the page and if the error still exists you might want to open a new issue here.
- When you're using Tor, such errors have a slight chance to occur more often, + message = `The reliability for this domains is high, errors like this are very unlikely to happen. + Try to refresh the page and if the error still exists you might want to open a new issue. + When you're using Tor, such errors have a slight chance to occur more often, so if this is the case just try to reload the page and see if it's working then` break }