Fix peertube link button
This commit is contained in:
parent
171efc48e6
commit
23ca2f7bc9
1 changed files with 1 additions and 4 deletions
|
@ -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() })
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue