aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--client/src/app/+videos/+video-edit/video-add-components/video-go-live.component.ts5
-rw-r--r--client/src/app/+videos/+video-edit/video-add-components/video-upload.component.ts8
-rw-r--r--client/src/app/shared/shared-main/video/video-edit.model.ts6
-rw-r--r--client/src/app/shared/shared-video-live/live-video.service.ts4
4 files changed, 16 insertions, 7 deletions
diff --git a/client/src/app/+videos/+video-edit/video-add-components/video-go-live.component.ts b/client/src/app/+videos/+video-edit/video-add-components/video-go-live.component.ts
index 1b9447e03..2065e4e8e 100644
--- a/client/src/app/+videos/+video-edit/video-add-components/video-go-live.component.ts
+++ b/client/src/app/+videos/+video-edit/video-add-components/video-go-live.component.ts
@@ -26,8 +26,11 @@ export class VideoGoLiveComponent extends VideoSend implements OnInit, AfterView
26 isInUpdateForm = false 26 isInUpdateForm = false
27 27
28 liveVideo: LiveVideo 28 liveVideo: LiveVideo
29
29 videoId: number 30 videoId: number
30 videoUUID: string 31 videoUUID: string
32 videoShortUUID: string
33
31 error: string 34 error: string
32 35
33 constructor ( 36 constructor (
@@ -79,6 +82,7 @@ export class VideoGoLiveComponent extends VideoSend implements OnInit, AfterView
79 next: res => { 82 next: res => {
80 this.videoId = res.video.id 83 this.videoId = res.video.id
81 this.videoUUID = res.video.uuid 84 this.videoUUID = res.video.uuid
85 this.videoShortUUID = res.video.shortUUID
82 this.isInUpdateForm = true 86 this.isInUpdateForm = true
83 87
84 this.firstStepDone.emit(name) 88 this.firstStepDone.emit(name)
@@ -113,6 +117,7 @@ export class VideoGoLiveComponent extends VideoSend implements OnInit, AfterView
113 video.patch(this.form.value) 117 video.patch(this.form.value)
114 video.id = this.videoId 118 video.id = this.videoId
115 video.uuid = this.videoUUID 119 video.uuid = this.videoUUID
120 video.shortUUID = this.videoShortUUID
116 121
117 const liveVideoUpdate: LiveVideoUpdate = { 122 const liveVideoUpdate: LiveVideoUpdate = {
118 saveReplay: this.form.value.saveReplay, 123 saveReplay: this.form.value.saveReplay,
diff --git a/client/src/app/+videos/+video-edit/video-add-components/video-upload.component.ts b/client/src/app/+videos/+video-edit/video-add-components/video-upload.component.ts
index dee2bb57a..56051cf4c 100644
--- a/client/src/app/+videos/+video-edit/video-add-components/video-upload.component.ts
+++ b/client/src/app/+videos/+video-edit/video-add-components/video-upload.component.ts
@@ -7,7 +7,7 @@ import { genericUploadErrorHandler, scrollToTop } from '@app/helpers'
7import { FormValidatorService } from '@app/shared/shared-forms' 7import { FormValidatorService } from '@app/shared/shared-forms'
8import { BytesPipe, Video, VideoCaptionService, VideoEdit, VideoService } from '@app/shared/shared-main' 8import { BytesPipe, Video, VideoCaptionService, VideoEdit, VideoService } from '@app/shared/shared-main'
9import { LoadingBarService } from '@ngx-loading-bar/core' 9import { LoadingBarService } from '@ngx-loading-bar/core'
10import { HttpStatusCode, VideoPrivacy } from '@shared/models' 10import { HttpStatusCode, VideoCreateResult, VideoPrivacy } from '@shared/models'
11import { UploaderXFormData } from './uploaderx-form-data' 11import { UploaderXFormData } from './uploaderx-form-data'
12import { VideoSend } from './video-send' 12import { VideoSend } from './video-send'
13 13
@@ -33,9 +33,10 @@ export class VideoUploadComponent extends VideoSend implements OnInit, OnDestroy
33 33
34 videoUploaded = false 34 videoUploaded = false
35 videoUploadPercents = 0 35 videoUploadPercents = 0
36 videoUploadedIds = { 36 videoUploadedIds: VideoCreateResult = {
37 id: 0, 37 id: 0,
38 uuid: '' 38 uuid: '',
39 shortUUID: ''
39 } 40 }
40 formData: FormData 41 formData: FormData
41 42
@@ -237,6 +238,7 @@ export class VideoUploadComponent extends VideoSend implements OnInit, OnDestroy
237 video.patch(this.form.value) 238 video.patch(this.form.value)
238 video.id = this.videoUploadedIds.id 239 video.id = this.videoUploadedIds.id
239 video.uuid = this.videoUploadedIds.uuid 240 video.uuid = this.videoUploadedIds.uuid
241 video.shortUUID = this.videoUploadedIds.shortUUID
240 242
241 this.isUpdatingVideo = true 243 this.isUpdatingVideo = true
242 244
diff --git a/client/src/app/shared/shared-main/video/video-edit.model.ts b/client/src/app/shared/shared-main/video/video-edit.model.ts
index ea0456942..436598af6 100644
--- a/client/src/app/shared/shared-main/video/video-edit.model.ts
+++ b/client/src/app/shared/shared-main/video/video-edit.model.ts
@@ -20,11 +20,13 @@ export class VideoEdit implements VideoUpdate {
20 previewfile?: any 20 previewfile?: any
21 thumbnailUrl: string 21 thumbnailUrl: string
22 previewUrl: string 22 previewUrl: string
23 uuid?: string
24 id?: number
25 scheduleUpdate?: VideoScheduleUpdate 23 scheduleUpdate?: VideoScheduleUpdate
26 originallyPublishedAt?: Date | string 24 originallyPublishedAt?: Date | string
27 25
26 id?: number
27 uuid?: string
28 shortUUID?: string
29
28 pluginData?: any 30 pluginData?: any
29 31
30 constructor ( 32 constructor (
diff --git a/client/src/app/shared/shared-video-live/live-video.service.ts b/client/src/app/shared/shared-video-live/live-video.service.ts
index b02442eae..0d166e91d 100644
--- a/client/src/app/shared/shared-video-live/live-video.service.ts
+++ b/client/src/app/shared/shared-video-live/live-video.service.ts
@@ -2,7 +2,7 @@ import { catchError } from 'rxjs/operators'
2import { HttpClient } from '@angular/common/http' 2import { HttpClient } from '@angular/common/http'
3import { Injectable } from '@angular/core' 3import { Injectable } from '@angular/core'
4import { RestExtractor } from '@app/core' 4import { RestExtractor } from '@app/core'
5import { LiveVideo, LiveVideoCreate, LiveVideoUpdate } from '@shared/models' 5import { LiveVideo, LiveVideoCreate, LiveVideoUpdate, VideoCreateResult } from '@shared/models'
6import { environment } from '../../../environments/environment' 6import { environment } from '../../../environments/environment'
7 7
8@Injectable() 8@Injectable()
@@ -16,7 +16,7 @@ export class LiveVideoService {
16 16
17 goLive (video: LiveVideoCreate) { 17 goLive (video: LiveVideoCreate) {
18 return this.authHttp 18 return this.authHttp
19 .post<{ video: { id: number, uuid: string } }>(LiveVideoService.BASE_VIDEO_LIVE_URL, video) 19 .post<{ video: VideoCreateResult }>(LiveVideoService.BASE_VIDEO_LIVE_URL, video)
20 .pipe(catchError(err => this.restExtractor.handleError(err))) 20 .pipe(catchError(err => this.restExtractor.handleError(err)))
21 } 21 }
22 22