Fix small errors that would come up during usage
This commit is contained in:
parent
41088818fe
commit
20a65a6400
|
@ -145,7 +145,7 @@ export default Vue.extend({
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
created () {
|
created () {
|
||||||
this.setBodyTheme()
|
this.checkThemeSettings()
|
||||||
this.setWindowTitle()
|
this.setWindowTitle()
|
||||||
},
|
},
|
||||||
mounted: function () {
|
mounted: function () {
|
||||||
|
|
|
@ -182,10 +182,14 @@ export default Vue.extend({
|
||||||
// only hide/show the button once the player is available
|
// only hide/show the button once the player is available
|
||||||
this.pictureInPictureButtonInverval = setInterval(() => {
|
this.pictureInPictureButtonInverval = setInterval(() => {
|
||||||
if (!this.hidePlayer) {
|
if (!this.hidePlayer) {
|
||||||
|
const pipButton = document.querySelector('.vjs-picture-in-picture-control')
|
||||||
|
if (pipButton === null) {
|
||||||
|
return
|
||||||
|
}
|
||||||
if (format === 'audio') {
|
if (format === 'audio') {
|
||||||
document.querySelector('.vjs-picture-in-picture-control').classList.add('vjs-hidden')
|
pipButton.classList.add('vjs-hidden')
|
||||||
} else {
|
} else {
|
||||||
document.querySelector('.vjs-picture-in-picture-control').classList.remove('vjs-hidden')
|
pipButton.classList.remove('vjs-hidden')
|
||||||
}
|
}
|
||||||
clearInterval(this.pictureInPictureButtonInverval)
|
clearInterval(this.pictureInPictureButtonInverval)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue