From 77fffee34f3a6d7965d0fe96bec593d4a9639f28 Mon Sep 17 00:00:00 2001 From: James Taylor Date: Sat, 28 Aug 2021 18:11:31 -0700 Subject: av-merge: Add function to dump debugging info MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Jesús --- youtube/static/js/av-merge.js | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'youtube/static/js') diff --git a/youtube/static/js/av-merge.js b/youtube/static/js/av-merge.js index 93664b9..f820927 100644 --- a/youtube/static/js/av-merge.js +++ b/youtube/static/js/av-merge.js @@ -114,6 +114,17 @@ AVMerge.prototype.videoEndOfStream = function() { } this.videoEndOfStreamCalled = true; } +AVMerge.prototype.printDebuggingInfo = function() { + reportDebug('videoSource:', this.videoSource); + reportDebug('audioSource:', this.videoSource); + reportDebug('video sidx:', this.videoStream.sidx); + reportDebug('audio sidx:', this.audioStream.sidx); + reportDebug('video duration:', this.video.duration); + reportDebug('video current time:', this.video.currentTime); + reportDebug('mediaSource.readyState:', this.mediaSource.readyState); + reportDebug('videoEndOfStreamCalled', this.videoEndOfStreamCalled); + reportDebug('audioEndOfStreamCalled', this.audioEndOfStreamCalled); +} function Stream(avMerge, source, startTime, avRatio) { this.avMerge = avMerge; @@ -410,7 +421,7 @@ function reportError(...args){ console.error(...args); } function reportDebug(...args){ - console.log(...args); + console.debug(...args); } function byteArrayToIntegerLittleEndian(unsignedByteArray){ -- cgit v1.2.3