mirror of
https://github.com/mmjee/Piped-Material.git
synced 2024-12-06 19:26:36 +01:00
Only instantiate Player if requests are complete
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
<ErrorHandler v-if="video && video.error" :message="video.message" :error="video.error" />
|
||||
<div v-else>
|
||||
<Player
|
||||
v-if="loaded"
|
||||
:video="video"
|
||||
:skip-to-time="'t' in $route.query ? Number($route.query.t) : null"
|
||||
:sponsors="sponsors"
|
||||
@@ -104,6 +105,7 @@ export default {
|
||||
name: 'WatchVideo',
|
||||
data () {
|
||||
return {
|
||||
loaded: false,
|
||||
video: {
|
||||
title: 'Loading ...'
|
||||
},
|
||||
@@ -249,6 +251,7 @@ export default {
|
||||
.then(data => {
|
||||
data.videoId = this.getVideoId()
|
||||
this.video = data
|
||||
this.loaded = true
|
||||
})
|
||||
.then(() => {
|
||||
if (this.video.error) {
|
||||
|
||||
Reference in New Issue
Block a user