diff --git a/src/modules/player/webgl2-player.ts b/src/modules/player/webgl2-player.ts index b59b3e7..811a7bf 100644 --- a/src/modules/player/webgl2-player.ts +++ b/src/modules/player/webgl2-player.ts @@ -26,7 +26,7 @@ export class WebGL2Player { }; private targetFps = 60; - private frameInterval = Math.ceil(1000 / this.targetFps); + private frameInterval = 0; private lastFrameTime = 0; private animFrameId: number | null = null; diff --git a/src/utils/stream-stats-collector.ts b/src/utils/stream-stats-collector.ts index d9b382a..feb9ab8 100644 --- a/src/utils/stream-stats-collector.ts +++ b/src/utils/stream-stats-collector.ts @@ -1,6 +1,8 @@ +import { PrefKey } from "@/enums/pref-keys"; import { BxEvent } from "./bx-event"; import { STATES } from "./global"; import { humanFileSize, secondsToHm } from "./html"; +import { getPref } from "./settings-storages/global-settings-storage"; export enum StreamStat { PING = 'ping', @@ -121,7 +123,8 @@ export class StreamStatsCollector { [StreamStat.FPS]: { current: 0, toString() { - return this.current.toString(); + const maxFps = getPref(PrefKey.VIDEO_MAX_FPS); + return maxFps < 60 ? `${maxFps}/${this.current}` : this.current.toString(); }, },