mirror of
https://gitlab.com/futo-org/fcast.git
synced 2025-08-09 18:52:50 +00:00
Updating player logging
This commit is contained in:
parent
d39bafa058
commit
849988634d
1 changed files with 2 additions and 4 deletions
|
@ -100,7 +100,7 @@ let isLivePosition = false;
|
||||||
|
|
||||||
|
|
||||||
window.electronAPI.onPlay((_event, value: PlayMessage) => {
|
window.electronAPI.onPlay((_event, value: PlayMessage) => {
|
||||||
console.log("Handle play message renderer", value);
|
console.log("Handle play message renderer", JSON.stringify(value));
|
||||||
const currentVolume = player ? player.getVolume() : null;
|
const currentVolume = player ? player.getVolume() : null;
|
||||||
const currentPlaybackRate = player ? player.getPlaybackRate() : null;
|
const currentPlaybackRate = player ? player.getPlaybackRate() : null;
|
||||||
|
|
||||||
|
@ -150,7 +150,6 @@ window.electronAPI.onPlay((_event, value: PlayMessage) => {
|
||||||
dashPlayer.on(dashjs.MediaPlayer.events.PLAYBACK_TIME_UPDATED, () => {
|
dashPlayer.on(dashjs.MediaPlayer.events.PLAYBACK_TIME_UPDATED, () => {
|
||||||
playerCtrlStateUpdate(PlayerControlEvent.TimeUpdate);
|
playerCtrlStateUpdate(PlayerControlEvent.TimeUpdate);
|
||||||
|
|
||||||
console.log(`CALC TIME: ${Math.abs(dashPlayer.time() - playerPrevTime)}`)
|
|
||||||
if (Math.abs(dashPlayer.time() - playerPrevTime) >= playbackUpdateInterval) {
|
if (Math.abs(dashPlayer.time() - playerPrevTime) >= playbackUpdateInterval) {
|
||||||
sendPlaybackUpdate(dashPlayer.isPaused() ? 2 : 1);
|
sendPlaybackUpdate(dashPlayer.isPaused() ? 2 : 1);
|
||||||
playerPrevTime = dashPlayer.time();
|
playerPrevTime = dashPlayer.time();
|
||||||
|
@ -338,7 +337,6 @@ function playerCtrlStateUpdate(event: PlayerControlEvent) {
|
||||||
|
|
||||||
case PlayerControlEvent.Play:
|
case PlayerControlEvent.Play:
|
||||||
playerCtrlAction.setAttribute("class", "pause");
|
playerCtrlAction.setAttribute("class", "pause");
|
||||||
|
|
||||||
startUiHideTimer();
|
startUiHideTimer();
|
||||||
player.play();
|
player.play();
|
||||||
break;
|
break;
|
||||||
|
@ -631,7 +629,7 @@ const skipInterval = 10;
|
||||||
const volumeIncrement = 0.1;
|
const volumeIncrement = 0.1;
|
||||||
|
|
||||||
document.addEventListener('keydown', (event) => {
|
document.addEventListener('keydown', (event) => {
|
||||||
console.log("KeyDown", event);
|
// console.log("KeyDown", event);
|
||||||
|
|
||||||
switch (event.code) {
|
switch (event.code) {
|
||||||
case 'F11':
|
case 'F11':
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue