mirror of https://github.com/Chocobozzz/PeerTube
Fix peertube link button
parent
171efc48e6
commit
23ca2f7bc9
|
@ -4,12 +4,9 @@ import { PeerTubeLinkButtonOptions } from '../peertube-videojs-typings'
|
||||||
|
|
||||||
const Button = videojs.getComponent('Button')
|
const Button = videojs.getComponent('Button')
|
||||||
class PeerTubeLinkButton extends Button {
|
class PeerTubeLinkButton extends Button {
|
||||||
private shortUUID: string
|
|
||||||
|
|
||||||
constructor (player: videojs.Player, options?: PeerTubeLinkButtonOptions) {
|
constructor (player: videojs.Player, options?: PeerTubeLinkButtonOptions) {
|
||||||
super(player, options as any)
|
super(player, options as any)
|
||||||
|
|
||||||
this.shortUUID = options.shortUUID
|
|
||||||
}
|
}
|
||||||
|
|
||||||
createEl () {
|
createEl () {
|
||||||
|
@ -39,7 +36,7 @@ class PeerTubeLinkButton extends Button {
|
||||||
}
|
}
|
||||||
|
|
||||||
private buildLink () {
|
private buildLink () {
|
||||||
const url = buildVideoLink({ shortUUID: this.shortUUID })
|
const url = buildVideoLink({ shortUUID: (this.options_ as PeerTubeLinkButtonOptions).shortUUID })
|
||||||
|
|
||||||
return decorateVideoLink({ url, startTime: this.player().currentTime() })
|
return decorateVideoLink({ url, startTime: this.player().currentTime() })
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue