From 20a65a64006ec7a619161a2a79df3e86ac08b5ad Mon Sep 17 00:00:00 2001 From: preston Date: Sat, 14 May 2022 21:05:14 -0400 Subject: [PATCH] Fix small errors that would come up during usage --- src/renderer/App.js | 2 +- src/renderer/views/Watch/Watch.js | 8 ++++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/src/renderer/App.js b/src/renderer/App.js index 555369ae..b5f11d3c 100644 --- a/src/renderer/App.js +++ b/src/renderer/App.js @@ -145,7 +145,7 @@ export default Vue.extend({ } }, created () { - this.setBodyTheme() + this.checkThemeSettings() this.setWindowTitle() }, mounted: function () { diff --git a/src/renderer/views/Watch/Watch.js b/src/renderer/views/Watch/Watch.js index c08040f9..5fe9201b 100644 --- a/src/renderer/views/Watch/Watch.js +++ b/src/renderer/views/Watch/Watch.js @@ -182,10 +182,14 @@ export default Vue.extend({ // only hide/show the button once the player is available this.pictureInPictureButtonInverval = setInterval(() => { if (!this.hidePlayer) { + const pipButton = document.querySelector('.vjs-picture-in-picture-control') + if (pipButton === null) { + return + } if (format === 'audio') { - document.querySelector('.vjs-picture-in-picture-control').classList.add('vjs-hidden') + pipButton.classList.add('vjs-hidden') } else { - document.querySelector('.vjs-picture-in-picture-control').classList.remove('vjs-hidden') + pipButton.classList.remove('vjs-hidden') } clearInterval(this.pictureInPictureButtonInverval) }