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'); }; /**