aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/videos/+video-edit/shared/video-edit.component.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2018-06-12 20:04:58 +0200
committerChocobozzz <me@florianbigard.com>2018-06-12 20:37:51 +0200
commit2186386cca113506791583cb07d6ccacba7af4e0 (patch)
tree3c214c0b5fbd64332624267fa6e51fd4a9cf6474 /client/src/app/videos/+video-edit/shared/video-edit.component.ts
parent6ccdf3a23ecec5ba2eeaf487fd1fafdc7606b4bf (diff)
downloadPeerTube-2186386cca113506791583cb07d6ccacba7af4e0.tar.gz
PeerTube-2186386cca113506791583cb07d6ccacba7af4e0.tar.zst
PeerTube-2186386cca113506791583cb07d6ccacba7af4e0.zip
Add concept of video state, and add ability to wait transcoding before
publishing a video
Diffstat (limited to 'client/src/app/videos/+video-edit/shared/video-edit.component.ts')
-rw-r--r--client/src/app/videos/+video-edit/shared/video-edit.component.ts8
1 files changed, 5 insertions, 3 deletions
diff --git a/client/src/app/videos/+video-edit/shared/video-edit.component.ts b/client/src/app/videos/+video-edit/shared/video-edit.component.ts
index 61515c0b0..ee4fd5dc1 100644
--- a/client/src/app/videos/+video-edit/shared/video-edit.component.ts
+++ b/client/src/app/videos/+video-edit/shared/video-edit.component.ts
@@ -47,6 +47,7 @@ export class VideoEditComponent implements OnInit {
47 const defaultValues = { 47 const defaultValues = {
48 nsfw: 'false', 48 nsfw: 'false',
49 commentsEnabled: 'true', 49 commentsEnabled: 'true',
50 waitTranscoding: 'true',
50 tags: [] 51 tags: []
51 } 52 }
52 const obj = { 53 const obj = {
@@ -55,6 +56,7 @@ export class VideoEditComponent implements OnInit {
55 channelId: this.videoValidatorsService.VIDEO_CHANNEL, 56 channelId: this.videoValidatorsService.VIDEO_CHANNEL,
56 nsfw: null, 57 nsfw: null,
57 commentsEnabled: null, 58 commentsEnabled: null,
59 waitTranscoding: null,
58 category: this.videoValidatorsService.VIDEO_CATEGORY, 60 category: this.videoValidatorsService.VIDEO_CATEGORY,
59 licence: this.videoValidatorsService.VIDEO_LICENCE, 61 licence: this.videoValidatorsService.VIDEO_LICENCE,
60 language: this.videoValidatorsService.VIDEO_LANGUAGE, 62 language: this.videoValidatorsService.VIDEO_LANGUAGE,
@@ -74,13 +76,13 @@ export class VideoEditComponent implements OnInit {
74 ) 76 )
75 77
76 // We will update the "support" field depending on the channel 78 // We will update the "support" field depending on the channel
77 this.form.controls['channelId'] 79 this.form.controls[ 'channelId' ]
78 .valueChanges 80 .valueChanges
79 .pipe(map(res => parseInt(res.toString(), 10))) 81 .pipe(map(res => parseInt(res.toString(), 10)))
80 .subscribe( 82 .subscribe(
81 newChannelId => { 83 newChannelId => {
82 const oldChannelId = parseInt(this.form.value['channelId'], 10) 84 const oldChannelId = parseInt(this.form.value[ 'channelId' ], 10)
83 const currentSupport = this.form.value['support'] 85 const currentSupport = this.form.value[ 'support' ]
84 86
85 // Not initialized yet 87 // Not initialized yet
86 if (isNaN(newChannelId)) return 88 if (isNaN(newChannelId)) return