refactor: make timelineBounds and getBufferedEnd private

This commit is contained in:
2026-06-21 01:12:12 +02:00
committed by Milas Holsting
parent 9b251d5191
commit 72facaad68

View File

@@ -23,7 +23,7 @@ const getSeekableEnd = (): number => {
* Computes timeline bounds from video. * Computes timeline bounds from video.
* Uses the full duration for VOD, and seekable ranges only when duration is unavailable. * Uses the full duration for VOD, and seekable ranges only when duration is unavailable.
*/ */
export const timelineBounds = (): TimelineBounds => { const timelineBounds = (): TimelineBounds => {
const duration = getDuration(); const duration = getDuration();
if (duration > 0) { if (duration > 0) {
return { start: 0, end: duration, duration }; return { start: 0, end: duration, duration };
@@ -93,7 +93,7 @@ export const absoluteTimeFromRatio = (ratio: number): number => {
}; };
// finds the end of the buffered region containing currentTime // finds the end of the buffered region containing currentTime
export const getBufferedEnd = (): number => { const getBufferedEnd = (): number => {
const currentTime = state.elements.video.currentTime; const currentTime = state.elements.video.currentTime;
let end = 0; let end = 0;
// first: find buffered range that contains current time // first: find buffered range that contains current time