Revert keyboard shortcut change and test new method for consistent captions
This commit is contained in:
parent
d6b4bbded6
commit
fc72bf0e97
|
@ -23,7 +23,6 @@
|
||||||
"lodash.uniqwith": "^4.5.0",
|
"lodash.uniqwith": "^4.5.0",
|
||||||
"markdown": "^0.5.0",
|
"markdown": "^0.5.0",
|
||||||
"material-design-icons": "^3.0.1",
|
"material-design-icons": "^3.0.1",
|
||||||
"mediaelement": "^4.2.16",
|
|
||||||
"nedb": "^1.8.0",
|
"nedb": "^1.8.0",
|
||||||
"opml-to-json": "0.0.3",
|
"opml-to-json": "0.0.3",
|
||||||
"rss-parser": "^3.9.0",
|
"rss-parser": "^3.9.0",
|
||||||
|
|
|
@ -2,15 +2,11 @@ import Vue from 'vue'
|
||||||
import FtCard from '../ft-card/ft-card.vue'
|
import FtCard from '../ft-card/ft-card.vue'
|
||||||
|
|
||||||
import $ from 'jquery'
|
import $ from 'jquery'
|
||||||
|
|
||||||
// I haven't decided which video player I want to use
|
|
||||||
// Need to expirement with both of them to see which one will work best.
|
|
||||||
import videojs from 'video.js'
|
import videojs from 'video.js'
|
||||||
import qualitySelector from '@silvermine/videojs-quality-selector'
|
import qualitySelector from '@silvermine/videojs-quality-selector'
|
||||||
import 'videojs-vtt-thumbnails-freetube'
|
import 'videojs-vtt-thumbnails-freetube'
|
||||||
import 'videojs-contrib-quality-levels'
|
import 'videojs-contrib-quality-levels'
|
||||||
import 'videojs-http-source-selector'
|
import 'videojs-http-source-selector'
|
||||||
// import mediaelement from 'mediaelement'
|
|
||||||
|
|
||||||
export default Vue.extend({
|
export default Vue.extend({
|
||||||
name: 'FtVideoPlayer',
|
name: 'FtVideoPlayer',
|
||||||
|
@ -226,11 +222,7 @@ export default Vue.extend({
|
||||||
qualitySelector(videojs, { showQualitySelectionLabelInControlBar: true })
|
qualitySelector(videojs, { showQualitySelectionLabelInControlBar: true })
|
||||||
}
|
}
|
||||||
|
|
||||||
this.player = videojs(videoPlayer, {
|
this.player = videojs(videoPlayer)
|
||||||
userActions: {
|
|
||||||
hotkeys: this.keyboardShortcutHandler
|
|
||||||
}
|
|
||||||
})
|
|
||||||
|
|
||||||
this.player.volume(this.volume)
|
this.player.volume(this.volume)
|
||||||
this.player.playbackRate(this.defaultPlayback)
|
this.player.playbackRate(this.defaultPlayback)
|
||||||
|
@ -255,7 +247,7 @@ export default Vue.extend({
|
||||||
}, 200)
|
}, 200)
|
||||||
}
|
}
|
||||||
|
|
||||||
// $(document).on('keydown', 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)
|
||||||
|
@ -265,6 +257,11 @@ export default Vue.extend({
|
||||||
|
|
||||||
this.player.on('ready', function () {
|
this.player.on('ready', function () {
|
||||||
v.$emit('ready')
|
v.$emit('ready')
|
||||||
|
if (this.captionList.length > 0) {
|
||||||
|
this.player.caption({
|
||||||
|
data: this.captionList
|
||||||
|
})
|
||||||
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
this.player.on('ended', function () {
|
this.player.on('ended', function () {
|
||||||
|
|
Loading…
Reference in New Issue