chore: small bug fixes
This commit is contained in:
1 parent
049e6bb833
commit
c5c10bd8cb
9 files changed
+167
-72
No files matched your search
@@ -0,0 +1,24 @@
|
||||
function getVideoDebugInfo(videoElement: HTMLVideoElement) {
|
||||
const quality = videoElement.getVideoPlaybackQuality();
|
||||
|
||||
const debugInfo = {
|
||||
droppedFrames: quality.droppedVideoFrames,
|
||||
totalFrames: quality.totalVideoFrames,
|
||||
resolution: {
|
||||
width: videoElement.videoWidth,
|
||||
height: videoElement.videoHeight,
|
||||
},
|
||||
container:
|
||||
videoElement.currentSrc.split(".").pop()?.split("?").pop() || "unknown",
|
||||
duration: videoElement.duration,
|
||||
currentTime: videoElement.currentTime,
|
||||
playbackRate: videoElement.playbackRate,
|
||||
volume: videoElement.volume,
|
||||
currentQuality: {
|
||||
width: videoElement.videoWidth,
|
||||
height: videoElement.videoHeight,
|
||||
},
|
||||
};
|
||||
|
||||
return debugInfo;
|
||||
}
|
||||
Reference in new issue
Block a user