Skip to content

Commit

Permalink
Merge pull request TeamPiped#3764 from ac615223s5/watch-on-youtube-bu…
Browse files Browse the repository at this point in the history
…tton

include playlist link in 'watch on youtube' button
  • Loading branch information
Bnyro authored Aug 29, 2024
2 parents 733888b + 71a17e1 commit 647f413
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/components/WatchVideo.vue
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@
<i class="i-fa6-solid:share mx-1.5" />
</button>
<!-- YouTube -->
<WatchOnButton :link="`https://youtu.be/${getVideoId()}?t=${Math.round(currentTime)}`" />
<WatchOnButton :link="youtubeVideoHref" />
<!-- Odysee -->
<WatchOnButton
v-if="video.lbryId"
Expand Down Expand Up @@ -363,6 +363,11 @@ export default {
purifiedDescription() {
return purifyHTML(this.video.description);
},
youtubeVideoHref() {
let link = `https://youtu.be/${this.getVideoId()}?t=${Math.round(this.currentTime)}`;
if (this.playlistId) link += `&list=${this.playlistId}`;
return link;
},
},
mounted() {
// check screen size
Expand Down

0 comments on commit 647f413

Please sign in to comment.