From 138f4b90f49197e993916176cf72d4a3d9ecbf43 Mon Sep 17 00:00:00 2001 From: Preston Date: Sun, 31 May 2020 22:47:22 -0400 Subject: [PATCH] Add ability to listen to audio only formats for videos --- .../ft-video-player/ft-video-player.js | 12 +++- .../ft-video-player/ft-video-player.vue | 1 + .../player-settings/player-settings.js | 4 +- .../watch-video-info/watch-video-info.js | 8 ++- src/renderer/views/Watch/Watch.js | 72 +++++++++++++++++++ src/renderer/views/Watch/Watch.vue | 3 +- 6 files changed, 93 insertions(+), 7 deletions(-) diff --git a/src/renderer/components/ft-video-player/ft-video-player.js b/src/renderer/components/ft-video-player/ft-video-player.js index 50304108..11784fdf 100644 --- a/src/renderer/components/ft-video-player/ft-video-player.js +++ b/src/renderer/components/ft-video-player/ft-video-player.js @@ -41,6 +41,10 @@ export default Vue.extend({ storyboardSrc: { type: String, default: '' + }, + thumbnail: { + type: String, + default: '' } }, data: function () { @@ -113,10 +117,14 @@ export default Vue.extend({ }, selectedDefaultQuality: function () { - let selectedQuality = null + let selectedQuality = '' if (this.sourceList.length === 0) { - return this.defaultQuality + return '' + } + + if (typeof (this.sourceList[0].qualityLabel) === 'number') { + return '' } const maxAvailableQuality = parseInt(this.sourceList[this.sourceList.length - 1].qualityLabel.replace(/p|k/, '')) diff --git a/src/renderer/components/ft-video-player/ft-video-player.vue b/src/renderer/components/ft-video-player/ft-video-player.vue index 4c6d45c5..2732fab3 100644 --- a/src/renderer/components/ft-video-player/ft-video-player.vue +++ b/src/renderer/components/ft-video-player/ft-video-player.vue @@ -3,6 +3,7 @@