mirror of
https://github.com/TeamPiped/Piped.git
synced 2024-08-14 23:57:27 +00:00
parent
94f98bdbc3
commit
b9f401cd39
1 changed files with 4 additions and 1 deletions
|
@ -143,21 +143,24 @@ export default {
|
||||||
comments: null,
|
comments: null,
|
||||||
subscribed: false,
|
subscribed: false,
|
||||||
channelId: null,
|
channelId: null,
|
||||||
|
active: true,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.getVideoData().then(() => {
|
this.getVideoData().then(() => {
|
||||||
this.$refs.videoPlayer.loadVideo();
|
if (this.active) this.$refs.videoPlayer.loadVideo();
|
||||||
});
|
});
|
||||||
this.getSponsors();
|
this.getSponsors();
|
||||||
if (this.getPreferenceBoolean("comments", true)) this.getComments();
|
if (this.getPreferenceBoolean("comments", true)) this.getComments();
|
||||||
},
|
},
|
||||||
activated() {
|
activated() {
|
||||||
|
this.active = true;
|
||||||
this.selectedAutoPlay = this.getPreferenceBoolean("autoplay", true);
|
this.selectedAutoPlay = this.getPreferenceBoolean("autoplay", true);
|
||||||
if (this.video.duration) this.$refs.videoPlayer.loadVideo();
|
if (this.video.duration) this.$refs.videoPlayer.loadVideo();
|
||||||
window.addEventListener("scroll", this.handleScroll);
|
window.addEventListener("scroll", this.handleScroll);
|
||||||
},
|
},
|
||||||
deactivated() {
|
deactivated() {
|
||||||
|
this.active = false;
|
||||||
window.removeEventListener("scroll", this.handleScroll);
|
window.removeEventListener("scroll", this.handleScroll);
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
|
|
Loading…
Reference in a new issue