@@ -128,7 +139,7 @@ export default {
if (this.active) this.$refs.videoPlayer.loadVideo();
});
this.getSponsors();
- if (this.getPreferenceBoolean("comments", true)) this.getComments();
+ if (!this.isEmbed && this.getPreferenceBoolean("comments", true)) this.getComments();
},
activated() {
this.active = true;
@@ -181,7 +192,7 @@ export default {
if (!this.video.error) {
document.title = this.video.title + " - Piped";
this.channelId = this.video.uploaderUrl.split("/")[2];
- this.fetchSubscribedStatus();
+ if (!this.isEmbed) this.fetchSubscribedStatus();
this.video.description = this.purifyHTML(
this.video.description
@@ -246,6 +257,11 @@ export default {
return this.$route.query.v || this.$route.params.v;
},
},
+ computed: {
+ isEmbed(_this) {
+ return String(_this.$route.path).indexOf("/embed/") == 0;
+ },
+ },
components: {
Player,
VideoItem,