Update video player button layout

This commit is contained in:
Preston 2020-12-14 18:25:51 -05:00
parent ad8ed9fdb0
commit 44d5b31879
1 changed files with 6 additions and 5 deletions

View File

@ -87,8 +87,10 @@ export default Vue.extend({
'descriptionsButton', 'descriptionsButton',
'subsCapsButton', 'subsCapsButton',
'audioTrackButton', 'audioTrackButton',
'pictureInPictureToggle',
'fullWindowButton',
'qualitySelector', 'qualitySelector',
'pictureInPictureToggle' 'fullscreenToggle'
] ]
}, },
playbackRates: [ playbackRates: [
@ -144,6 +146,7 @@ export default Vue.extend({
this.volume = volume this.volume = volume
} }
this.createFullWindowButton()
this.determineFormatType() this.determineFormatType()
this.determineMaxFramerate() this.determineMaxFramerate()
}, },
@ -170,8 +173,7 @@ export default Vue.extend({
} }
} }
}) })
this.createFullWindowButton()
this.player.controlBar.addChild('fullscreenToggle')
this.player.volume(this.volume) this.player.volume(this.volume)
this.player.playbackRate(this.defaultPlayback) this.player.playbackRate(this.defaultPlayback)
@ -200,7 +202,7 @@ export default Vue.extend({
}, 200) }, 200)
} }
$(document).on('keyup', this.keyboardShortcutHandler) $(document).on('keydown', this.keyboardShortcutHandler)
this.player.on('mousemove', this.hideMouseTimeout) this.player.on('mousemove', this.hideMouseTimeout)
this.player.on('mouseleave', this.removeMouseTimeout) this.player.on('mouseleave', this.removeMouseTimeout)
@ -517,7 +519,6 @@ export default Vue.extend({
} }
}) })
videojs.registerComponent('fullWindowButton', fullWindowButton) videojs.registerComponent('fullWindowButton', fullWindowButton)
v.player.controlBar.addChild('fullWindowButton', {})
}, },
toggleFullWindow: function() { toggleFullWindow: function() {