videoPrivacies: VideoConstant<VideoPrivacy>[] = []
videoCaptions: VideoCaptionEdit[] = []
- firstStepPrivacyId = 0
- firstStepChannelId = 0
+ firstStepPrivacyId: VideoPrivacy
+ firstStepChannelId: number
abstract firstStepDone: EventEmitter<string>
abstract firstStepError: EventEmitter<void>
- protected abstract readonly DEFAULT_VIDEO_PRIVACY: VideoPrivacy
protected loadingBar: LoadingBarService
protected notifier: Notifier
protected authService: AuthService
+
protected serverService: ServerService
protected videoService: VideoService
protected videoCaptionService: VideoCaptionService
+
protected serverConfig: HTMLServerConfig
+ protected highestPrivacy: VideoPrivacy
+
abstract canDeactivate (): CanComponentDeactivateResult
ngOnInit () {
this.serverService.getVideoPrivacies()
.subscribe(
privacies => {
- this.videoPrivacies = this.videoService.explainedPrivacyLabels(privacies)
+ const { videoPrivacies, defaultPrivacyId } = this.videoService.explainedPrivacyLabels(privacies)
+
+ this.videoPrivacies = videoPrivacies
+ this.firstStepPrivacyId = defaultPrivacyId
- this.firstStepPrivacyId = this.DEFAULT_VIDEO_PRIVACY
+ this.highestPrivacy = this.videoService.getHighestAvailablePrivacy(privacies)
})
}