.pipe(
switchMap(res => {
return this.videoCaptionService
- .listCaptions(res.video.id)
+ .listCaptions(res.video.uuid)
.pipe(
map(result => ({ video: res.video, videoCaptions: result.data }))
)
listUserChannelsForSelect(this.authService),
this.videoCaptionService
- .listCaptions(video.id)
+ .listCaptions(video.uuid)
.pipe(
map(result => result.data)
),
// Unlogged users do not have ratings
if (this.isUserLoggedIn === false) return
- this.videoService.getUserVideoRating(this.video.id)
+ this.videoService.getUserVideoRating(this.video.uuid)
.subscribe({
next: ratingObject => {
if (!ratingObject) return
}
private setRating (nextRating: UserVideoRateType) {
- const ratingMethods: { [id in UserVideoRateType]: (id: number) => Observable<any> } = {
+ const ratingMethods: { [id in UserVideoRateType]: (id: string) => Observable<any> } = {
like: this.videoService.setVideoLike,
dislike: this.videoService.setVideoDislike,
none: this.videoService.unsetVideoLike
}
- ratingMethods[nextRating].call(this.videoService, this.video.id)
+ ratingMethods[nextRating].call(this.videoService, this.video.uuid)
.subscribe({
next: () => {
// Update the video like attribute
private addCommentReply (commentCreate: VideoCommentCreate) {
return this.videoCommentService
- .addCommentReply(this.video.id, this.parentComment.id, commentCreate)
+ .addCommentReply(this.video.uuid, this.parentComment.id, commentCreate)
}
private addCommentThread (commentCreate: VideoCommentCreate) {
return this.videoCommentService
- .addCommentThread(this.video.id, commentCreate)
+ .addCommentThread(this.video.uuid, commentCreate)
}
private initTextValue () {
this.threadLoading[commentId] = true
const params = {
- videoId: this.video.id,
+ videoId: this.video.uuid,
threadId: commentId
}
loadMoreThreads () {
const params = {
- videoId: this.video.id,
+ videoId: this.video.uuid,
componentPagination: this.componentPagination,
sort: this.sort
}
private restExtractor: RestExtractor
) {}
- listCaptions (videoId: number | string): Observable<ResultList<VideoCaption>> {
+ listCaptions (videoId: string): Observable<ResultList<VideoCaption>> {
return this.authHttp.get<ResultList<VideoCaption>>(`${VideoService.BASE_VIDEO_URL}/${videoId}/captions`)
.pipe(
switchMap(captionsResult => {
)
}
- setVideoLike (id: number) {
+ setVideoLike (id: string) {
return this.setVideoRate(id, 'like')
}
- setVideoDislike (id: number) {
+ setVideoDislike (id: string) {
return this.setVideoRate(id, 'dislike')
}
- unsetVideoLike (id: number) {
+ unsetVideoLike (id: string) {
return this.setVideoRate(id, 'none')
}
- getUserVideoRating (id: number) {
+ getUserVideoRating (id: string) {
const url = UserService.BASE_USERS_URL + 'me/videos/' + id + '/rating'
return this.authHttp.get<UserVideoRate>(url)
}
}
- private setVideoRate (id: number, rateType: UserVideoRateType) {
+ private setVideoRate (id: string, rateType: UserVideoRateType) {
const url = `${VideoService.BASE_VIDEO_URL}/${id}/rate`
const body: UserVideoRateUpdate = {
rating: rateType
private restService: RestService
) {}
- addCommentThread (videoId: number | string, comment: VideoCommentCreate) {
+ addCommentThread (videoId: string, comment: VideoCommentCreate) {
const url = VideoCommentService.BASE_VIDEO_URL + videoId + '/comment-threads'
const normalizedComment = objectLineFeedToHtml(comment, 'text')
)
}
- addCommentReply (videoId: number | string, inReplyToCommentId: number, comment: VideoCommentCreate) {
+ addCommentReply (videoId: string, inReplyToCommentId: number, comment: VideoCommentCreate) {
const url = VideoCommentService.BASE_VIDEO_URL + videoId + '/comments/' + inReplyToCommentId
const normalizedComment = objectLineFeedToHtml(comment, 'text')
}
getVideoCommentThreads (parameters: {
- videoId: number | string
+ videoId: string
componentPagination: ComponentPaginationLight
sort: string
}): Observable<ThreadsResultList<VideoComment>> {
}
getVideoThreadComments (parameters: {
- videoId: number | string
+ videoId: string
threadId: number
}): Observable<VideoCommentThreadTree> {
const { videoId, threadId } = parameters