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
1 changed files with 1 additions and 4 deletions

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() })
}