Handle title on component activation.

Closes #294
This commit is contained in:
FireMasterK
2021-07-21 16:29:53 +05:30
parent e4b24043ee
commit 24e58722c9
8 changed files with 29 additions and 10 deletions

View File

@@ -131,7 +131,10 @@ export default {
activated() {
this.active = true;
this.selectedAutoPlay = this.getPreferenceBoolean("autoplay", true);
if (this.video.duration) this.$refs.videoPlayer.loadVideo();
if (this.video.duration) {
document.title = this.video.title + " - Piped";
this.$refs.videoPlayer.loadVideo();
}
window.addEventListener("scroll", this.handleScroll);
},
deactivated() {
@@ -244,7 +247,7 @@ export default {
Player,
VideoItem,
ErrorHandler,
Comment
Comment,
},
};
</script>