From 333ca1b302594c1b4d0fed1a697f3b899f055c6a Mon Sep 17 00:00:00 2001 From: Yoteichi Date: Wed, 8 Dec 2021 21:30:01 +0900 Subject: [PATCH] =?UTF-8?q?503=20=E3=81=AB=E3=81=AA=E3=81=A3=E3=81=9F?= =?UTF-8?q?=E3=81=A8=E3=81=8D=E3=80=81=E3=83=AA=E3=83=AD=E3=83=BC=E3=83=89?= =?UTF-8?q?=E7=A2=BA=E8=AA=8D=E3=81=AE=E3=83=80=E3=82=A4=E3=82=A2=E3=83=AD?= =?UTF-8?q?=E3=82=B0=E3=82=92=E5=87=BA=E3=81=99=E3=82=88=E3=81=86=E3=81=AB?= =?UTF-8?q?=E3=81=97=E3=81=9F=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit VIDEO要素のぐるぐるを止めるのは難しいらしい。 --- ui/Templates/player.html | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/ui/Templates/player.html b/ui/Templates/player.html index a657184b..07166769 100644 --- a/ui/Templates/player.html +++ b/ui/Templates/player.html @@ -27,6 +27,15 @@ isLive: true, url: '/stream/{$page.channel.id}.flv' }); + flvPlayer.on('error', (errorType, errorCode, details) => { + let msg = `エラーが起きたので動画が再生できませんでした。\n` + + `ページをリロードしますか?\n` + + `\n` + + `${errorType}\n${errorCode}\n${JSON.stringify(details)}`; + if (window.confirm(msg)) { + window.location.reload(); + } + }); flvPlayer.attachMediaElement(videoElement); flvPlayer.load(); flvPlayer.play().catch(error => {