mirror of
https://gitlab.com/futo-org/fcast.git
synced 2025-06-24 21:25:23 +00:00
Collection of small fixes
This commit is contained in:
parent
2caf9cff5b
commit
b062644f7b
3 changed files with 31 additions and 12 deletions
|
@ -117,8 +117,8 @@ body, html {
|
||||||
|
|
||||||
#title-text {
|
#title-text {
|
||||||
font-family: Outfit;
|
font-family: Outfit;
|
||||||
font-size: 96px;
|
font-size: 100px;
|
||||||
font-weight: bold;
|
font-weight: 800;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
|
|
||||||
background-image: linear-gradient(180deg, #FFFFFF 5.9%, #D3D3D3 100%);
|
background-image: linear-gradient(180deg, #FFFFFF 5.9%, #D3D3D3 100%);
|
||||||
|
|
|
@ -186,7 +186,6 @@ window.electronAPI.onPlay((_event, value: PlayMessage) => {
|
||||||
dashPlayer.on(dashjs.MediaPlayer.events.STREAM_INITIALIZED, () => { onPlayerLoad(value, currentPlaybackRate, currentVolume); });
|
dashPlayer.on(dashjs.MediaPlayer.events.STREAM_INITIALIZED, () => { onPlayerLoad(value, currentPlaybackRate, currentVolume); });
|
||||||
|
|
||||||
dashPlayer.on(dashjs.MediaPlayer.events.CUE_ENTER, (e: any) => {
|
dashPlayer.on(dashjs.MediaPlayer.events.CUE_ENTER, (e: any) => {
|
||||||
// console.log("cueEnter", e);
|
|
||||||
const subtitle = document.createElement("p")
|
const subtitle = document.createElement("p")
|
||||||
subtitle.setAttribute("id", "subtitle-" + e.cueID)
|
subtitle.setAttribute("id", "subtitle-" + e.cueID)
|
||||||
|
|
||||||
|
@ -195,8 +194,7 @@ window.electronAPI.onPlay((_event, value: PlayMessage) => {
|
||||||
});
|
});
|
||||||
|
|
||||||
dashPlayer.on(dashjs.MediaPlayer.events.CUE_EXIT, (e: any) => {
|
dashPlayer.on(dashjs.MediaPlayer.events.CUE_EXIT, (e: any) => {
|
||||||
// console.log("cueExit ", e);
|
document.getElementById("subtitle-" + e.cueID)?.remove();
|
||||||
document.getElementById("subtitle-" + e.cueID).remove();
|
|
||||||
});
|
});
|
||||||
|
|
||||||
dashPlayer.updateSettings({
|
dashPlayer.updateSettings({
|
||||||
|
@ -416,11 +414,26 @@ function playerCtrlStateUpdate(event: PlayerControlEvent) {
|
||||||
case PlayerControlEvent.UiFadeOut:
|
case PlayerControlEvent.UiFadeOut:
|
||||||
document.body.style.cursor = "none";
|
document.body.style.cursor = "none";
|
||||||
playerControls.setAttribute("style", "opacity: 0");
|
playerControls.setAttribute("style", "opacity: 0");
|
||||||
|
|
||||||
|
if (player.isCaptionsEnabled()) {
|
||||||
|
videoCaptions.setAttribute("style", "display: block; bottom: 75px;");
|
||||||
|
} else {
|
||||||
|
videoCaptions.setAttribute("style", "display: block; bottom: 75px;");
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case PlayerControlEvent.UiFadeIn:
|
case PlayerControlEvent.UiFadeIn:
|
||||||
document.body.style.cursor = "default";
|
document.body.style.cursor = "default";
|
||||||
playerControls.setAttribute("style", "opacity: 1");
|
playerControls.setAttribute("style", "opacity: 1");
|
||||||
|
|
||||||
|
if (player.isCaptionsEnabled()) {
|
||||||
|
videoCaptions.setAttribute("style", "display: block; bottom: 150px;");
|
||||||
|
} else {
|
||||||
|
videoCaptions.setAttribute("style", "display: block; bottom: 150px;");
|
||||||
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case PlayerControlEvent.SetCaptions:
|
case PlayerControlEvent.SetCaptions:
|
||||||
|
@ -644,7 +657,17 @@ function stopUiHideTimer() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
document.onmousemove = function() {
|
document.onmouseout = () => {
|
||||||
|
if (uiHideTimer) {
|
||||||
|
window.clearTimeout(uiHideTimer);
|
||||||
|
uiHideTimer = null;
|
||||||
|
}
|
||||||
|
|
||||||
|
uiVisible = false;
|
||||||
|
playerCtrlStateUpdate(PlayerControlEvent.UiFadeOut);
|
||||||
|
}
|
||||||
|
|
||||||
|
document.onmousemove = () => {
|
||||||
stopUiHideTimer();
|
stopUiHideTimer();
|
||||||
|
|
||||||
if (player && !player.isPaused()) {
|
if (player && !player.isPaused()) {
|
||||||
|
|
|
@ -184,6 +184,7 @@ body {
|
||||||
}
|
}
|
||||||
|
|
||||||
.progressBarPosition {
|
.progressBarPosition {
|
||||||
|
display: none;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
bottom: 25px;
|
bottom: 25px;
|
||||||
padding: 2px 5px;
|
padding: 2px 5px;
|
||||||
|
@ -435,12 +436,7 @@ body {
|
||||||
|
|
||||||
width: fit-content;
|
width: fit-content;
|
||||||
|
|
||||||
/* display: flex; */
|
transition: bottom 0.2s ease-in-out;
|
||||||
/* align-items: center; */
|
|
||||||
/* min-width: 100%; */
|
|
||||||
/* height: 100px; */
|
|
||||||
/* text-overflow: ellipsis; */
|
|
||||||
/* overflow: hidden; */
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.speedMenu {
|
.speedMenu {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue