import { AuthService, Notifier, ServerService } from '@app/core'
import { Video } from '@app/shared/shared-main'
import { NgbDropdown } from '@ng-bootstrap/ng-bootstrap'
-import { ServerConfig, VideoPlaylistElementType, VideoPlaylistElementUpdate } from '@shared/models'
-import { secondsToTime } from '../../../assets/player/utils'
+import { secondsToTime } from '@shared/core-utils'
+import { HTMLServerConfig, VideoPlaylistElementType, VideoPlaylistElementUpdate } from '@shared/models'
import { VideoPlaylistElement } from './video-playlist-element.model'
import { VideoPlaylist } from './video-playlist.model'
import { VideoPlaylistService } from './video-playlist.service'
stopTimestamp: number
} = {} as any
- private serverConfig: ServerConfig
+ private serverConfig: HTMLServerConfig
constructor (
private authService: AuthService,
) {}
ngOnInit (): void {
- this.serverConfig = this.serverService.getTmpConfig()
- this.serverService.getConfig()
- .subscribe(config => {
- this.serverConfig = config
- this.cdr.detectChanges()
- })
+ this.serverConfig = this.serverService.getHTMLConfig()
}
isUnavailable (e: VideoPlaylistElement) {
buildRouterLink () {
if (!this.playlist) return null
- return [ '/videos/watch/playlist', this.playlist.uuid ]
+ return VideoPlaylist.buildWatchUrl(this.playlist)
}
buildRouterQuery () {