subtitle: string
loop: boolean
+ originUrl: boolean
autoplay: boolean
muted: boolean
title: boolean
@Input() video: VideoDetails = null
@Input() videoCaptions: VideoCaption[] = []
@Input() playlist: VideoPlaylist = null
+ @Input() playlistPosition: number = null
activeVideoId: TabId = 'url'
activePlaylistId: TabId = 'url'
isAdvancedCustomizationCollapsed = true
includeVideoInPlaylist = false
- private playlistPosition: number = null
-
constructor (private modalService: NgbModal) { }
show (currentVideoTimestamp?: number, currentPlaylistPosition?: number) {
subtitle,
loop: false,
+ originUrl: false,
autoplay: false,
muted: false,
}
getVideoUrl () {
- const baseUrl = window.location.origin + '/videos/watch/' + this.video.uuid
+ let baseUrl = this.customizations.originUrl ? this.video.originInstanceUrl : window.location.origin
+ baseUrl += '/videos/watch/' + this.video.uuid
const options = this.getVideoOptions(baseUrl)
return buildVideoLink(options)
if (!this.includeVideoInPlaylist) return base
- return base + '?videoId=' + this.video.uuid
+ return base + '?playlistPosition=' + this.playlistPosition
}
notSecure () {
return this.activeVideoId === 'embed'
}
+ isLocalVideo () {
+ return this.video.isLocal
+ }
+
private getPlaylistOptions (baseUrl?: string) {
return {
baseUrl,