import { Component, EventEmitter, OnInit, Output } from '@angular/core'
import { Router } from '@angular/router'
import { Component, EventEmitter, OnInit, Output } from '@angular/core'
import { Router } from '@angular/router'
import { VideoService } from '../../../shared/video/video.service'
import { I18n } from '@ngx-translate/i18n-polyfill'
import { LoadingBarService } from '@ngx-loading-bar/core'
import { VideoService } from '../../../shared/video/video.service'
import { I18n } from '@ngx-translate/i18n-polyfill'
import { LoadingBarService } from '@ngx-loading-bar/core'
templateUrl: './video-import-url.component.html',
styleUrls: [
'../shared/video-edit.component.scss',
templateUrl: './video-import-url.component.html',
styleUrls: [
'../shared/video-edit.component.scss',
constructor (
protected formValidatorService: FormValidatorService,
protected loadingBar: LoadingBarService,
constructor (
protected formValidatorService: FormValidatorService,
protected loadingBar: LoadingBarService,
protected authService: AuthService,
protected serverService: ServerService,
protected videoService: VideoService,
protected authService: AuthService,
protected serverService: ServerService,
protected videoService: VideoService,
this.video = new VideoEdit(Object.assign(res.video, {
commentsEnabled: videoUpdate.commentsEnabled,
this.video = new VideoEdit(Object.assign(res.video, {
commentsEnabled: videoUpdate.commentsEnabled,
this.loadingBar.complete()
this.isImportingVideo = false
this.firstStepError.emit()
this.loadingBar.complete()
this.isImportingVideo = false
this.firstStepError.emit()