1
0
Fork 0

Fix peertube link button

This commit is contained in:
Chocobozzz 2021-07-30 11:48:21 +02:00
parent 171efc48e6
commit 23ca2f7bc9
No known key found for this signature in database
GPG key ID: 583A612D890159BE

View file

@ -4,12 +4,9 @@ import { PeerTubeLinkButtonOptions } from '../peertube-videojs-typings'
const Button = videojs.getComponent('Button')
class PeerTubeLinkButton extends Button {
private shortUUID: string
constructor (player: videojs.Player, options?: PeerTubeLinkButtonOptions) {
super(player, options as any)
this.shortUUID = options.shortUUID
}
createEl () {
@ -39,7 +36,7 @@ class PeerTubeLinkButton extends Button {
}
private buildLink () {
const url = buildVideoLink({ shortUUID: this.shortUUID })
const url = buildVideoLink({ shortUUID: (this.options_ as PeerTubeLinkButtonOptions).shortUUID })
return decorateVideoLink({ url, startTime: this.player().currentTime() })
}