From 1589f4eb3c7e583ac35aa8a2790bb226514748c5 Mon Sep 17 00:00:00 2001 From: mister-ben <1676039+mister-ben@users.noreply.github.com> Date: Sun, 30 Jun 2024 18:34:59 +0200 Subject: [PATCH] add versions --- scripts/index.js | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/scripts/index.js b/scripts/index.js index 0bffb2875..6b8a56dd3 100644 --- a/scripts/index.js +++ b/scripts/index.js @@ -777,14 +777,24 @@ /** * Window location and history joined with line breaks, stringifying any objects * - * @return string Stringified history + * @return {string} Stringified history */ const stringifiedLogHistory = () => { - return `${window.location.href}\n\n${document.querySelector('video-js').player.log.history().map(entryArgs => { + const player = document.querySelector('video-js').player; + const logs = [].concat(player.log.history()); + const withVhs = !!player.tech(true).vhs; + + return [ + window.location.href, + window.navigator.userAgent, + `Video.js ${window.videojs.VERSION}`, + `Using VHS: ${withVhs}`, + withVhs ? JSON.stringify(player.tech(true).vhs.version()) : '' + ].concat(logs.map(entryArgs => { return entryArgs.map(item => { return typeof item === 'object' ? JSON.stringify(item) : item; }); - }).join('\n')}`; + })).join('\n'); }; /**