mirror of
https://github.com/FreeTubeApp/FreeTube
synced 2024-12-12 04:29:49 +01:00
Add invidious embed links
This commit is contained in:
parent
46fcd06621
commit
1e5c3127c7
@ -40,6 +40,10 @@ export default Vue.extend({
|
||||
return `${this.invidiousInstance}/watch?v=${this.id}`
|
||||
},
|
||||
|
||||
getInvidiousEmbedURL() {
|
||||
return `${this.invidiousInstance}/embed/${this.id}`
|
||||
},
|
||||
|
||||
getYoutubeURL() {
|
||||
return `https://www.youtube.com/watch?v=${this.id}`
|
||||
},
|
||||
@ -70,6 +74,14 @@ export default Vue.extend({
|
||||
|
||||
copyYoutubeEmbed() {
|
||||
this.copy(this.getYoutubeEmbedURL())
|
||||
}
|
||||
},
|
||||
|
||||
openInvidiousEmbed() {
|
||||
this.open(this.getInvidiousEmbedURL())
|
||||
},
|
||||
|
||||
copyInvidiousEmbed() {
|
||||
this.copy(this.getInvidiousEmbedURL())
|
||||
},
|
||||
}
|
||||
})
|
||||
|
@ -60,6 +60,20 @@
|
||||
<font-awesome-icon icon="globe"/>
|
||||
Open link
|
||||
</ft-button>
|
||||
<ft-button
|
||||
class="action"
|
||||
@click="copyInvidiousEmbed()"
|
||||
>
|
||||
<font-awesome-icon icon="file-video"/>
|
||||
Copy embed
|
||||
</ft-button>
|
||||
<ft-button
|
||||
class="action"
|
||||
@click="openInvidiousEmbed()"
|
||||
>
|
||||
<font-awesome-icon icon="file-video"/>
|
||||
Open embed
|
||||
</ft-button>
|
||||
</div>
|
||||
</div>
|
||||
</ft-icon-button>
|
||||
|
Loading…
Reference in New Issue
Block a user