Implement play with playlists.

This commit is contained in:
Kavin
2022-04-08 22:29:50 +01:00
parent 4c16beedaf
commit d47d16e235
6 changed files with 153 additions and 5 deletions

View File

@@ -75,6 +75,7 @@ export default {
},
activated() {
window.addEventListener("scroll", this.handleScroll);
if (this.playlist) this.updateTitle();
},
deactivated() {
window.removeEventListener("scroll", this.handleScroll);
@@ -86,7 +87,10 @@ export default {
async getPlaylistData() {
this.fetchPlaylist()
.then(data => (this.playlist = data))
.then(() => (document.title = this.playlist.name + " - Piped"));
.then(() => this.updateTitle());
},
async updateTitle() {
document.title = this.playlist.name + " - Piped";
},
handleScroll() {
if (this.loading || !this.playlist || !this.playlist.nextpage) return;