diff options
Diffstat (limited to 'client/src/app/+videos')
8 files changed, 31 insertions, 13 deletions
diff --git a/client/src/app/+videos/+video-edit/shared/video-edit.module.ts b/client/src/app/+videos/+video-edit/shared/video-edit.module.ts index 593114181..7a3854065 100644 --- a/client/src/app/+videos/+video-edit/shared/video-edit.module.ts +++ b/client/src/app/+videos/+video-edit/shared/video-edit.module.ts | |||
@@ -3,6 +3,7 @@ import { NgModule } from '@angular/core' | |||
3 | import { SharedFormModule } from '@app/shared/shared-forms' | 3 | import { SharedFormModule } from '@app/shared/shared-forms' |
4 | import { SharedGlobalIconModule } from '@app/shared/shared-icons' | 4 | import { SharedGlobalIconModule } from '@app/shared/shared-icons' |
5 | import { SharedMainModule } from '@app/shared/shared-main' | 5 | import { SharedMainModule } from '@app/shared/shared-main' |
6 | import { SharedVideoLiveModule } from '@app/shared/shared-video-live' | ||
6 | import { I18nPrimengCalendarService } from './i18n-primeng-calendar.service' | 7 | import { I18nPrimengCalendarService } from './i18n-primeng-calendar.service' |
7 | import { VideoCaptionAddModalComponent } from './video-caption-add-modal.component' | 8 | import { VideoCaptionAddModalComponent } from './video-caption-add-modal.component' |
8 | import { VideoEditComponent } from './video-edit.component' | 9 | import { VideoEditComponent } from './video-edit.component' |
@@ -13,7 +14,8 @@ import { VideoEditComponent } from './video-edit.component' | |||
13 | 14 | ||
14 | SharedMainModule, | 15 | SharedMainModule, |
15 | SharedFormModule, | 16 | SharedFormModule, |
16 | SharedGlobalIconModule | 17 | SharedGlobalIconModule, |
18 | SharedVideoLiveModule | ||
17 | ], | 19 | ], |
18 | 20 | ||
19 | declarations: [ | 21 | declarations: [ |
diff --git a/client/src/app/+videos/+video-edit/video-add-components/video-go-live.component.html b/client/src/app/+videos/+video-edit/video-add-components/video-go-live.component.html index 5657827a9..2ec825978 100644 --- a/client/src/app/+videos/+video-edit/video-add-components/video-go-live.component.html +++ b/client/src/app/+videos/+video-edit/video-add-components/video-go-live.component.html | |||
@@ -35,7 +35,8 @@ | |||
35 | <!-- Hidden because we want to load the component --> | 35 | <!-- Hidden because we want to load the component --> |
36 | <form [hidden]="!isInUpdateForm" novalidate [formGroup]="form"> | 36 | <form [hidden]="!isInUpdateForm" novalidate [formGroup]="form"> |
37 | <my-video-edit | 37 | <my-video-edit |
38 | [form]="form" [formErrors]="formErrors" [videoCaptions]="videoCaptions" [schedulePublicationPossible]="false" | 38 | [form]="form" [formErrors]="formErrors" [videoCaptions]="videoCaptions" |
39 | [schedulePublicationPossible]="false" [waitTranscodingEnabled]="false" | ||
39 | [validationMessages]="validationMessages" [userVideoChannels]="userVideoChannels" [liveVideo]="liveVideo" | 40 | [validationMessages]="validationMessages" [userVideoChannels]="userVideoChannels" [liveVideo]="liveVideo" |
40 | type="go-live" | 41 | type="go-live" |
41 | ></my-video-edit> | 42 | ></my-video-edit> |
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 870a70d3d..d29b2da97 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 | |||
@@ -5,7 +5,8 @@ import { Router } from '@angular/router' | |||
5 | import { AuthService, CanComponentDeactivate, Notifier, ServerService } from '@app/core' | 5 | import { AuthService, CanComponentDeactivate, Notifier, ServerService } from '@app/core' |
6 | import { scrollToTop } from '@app/helpers' | 6 | import { scrollToTop } from '@app/helpers' |
7 | import { FormValidatorService } from '@app/shared/shared-forms' | 7 | import { FormValidatorService } from '@app/shared/shared-forms' |
8 | import { LiveVideoService, VideoCaptionService, VideoEdit, VideoService } from '@app/shared/shared-main' | 8 | import { VideoCaptionService, VideoEdit, VideoService } from '@app/shared/shared-main' |
9 | import { LiveVideoService } from '@app/shared/shared-video-live' | ||
9 | import { LoadingBarService } from '@ngx-loading-bar/core' | 10 | import { LoadingBarService } from '@ngx-loading-bar/core' |
10 | import { LiveVideo, LiveVideoCreate, LiveVideoUpdate, ServerErrorCode, VideoPrivacy } from '@shared/models' | 11 | import { LiveVideo, LiveVideoCreate, LiveVideoUpdate, ServerErrorCode, VideoPrivacy } from '@shared/models' |
11 | import { VideoSend } from './video-send' | 12 | import { VideoSend } from './video-send' |
@@ -64,8 +65,6 @@ export class VideoGoLiveComponent extends VideoSend implements OnInit, CanCompon | |||
64 | channelId: this.firstStepChannelId | 65 | channelId: this.firstStepChannelId |
65 | } | 66 | } |
66 | 67 | ||
67 | this.firstStepDone.emit(name) | ||
68 | |||
69 | // Go live in private mode, but correctly fill the update form with the first user choice | 68 | // Go live in private mode, but correctly fill the update form with the first user choice |
70 | const toPatch = Object.assign({}, video, { privacy: this.firstStepPrivacyId }) | 69 | const toPatch = Object.assign({}, video, { privacy: this.firstStepPrivacyId }) |
71 | this.form.patchValue(toPatch) | 70 | this.form.patchValue(toPatch) |
@@ -76,6 +75,8 @@ export class VideoGoLiveComponent extends VideoSend implements OnInit, CanCompon | |||
76 | this.videoUUID = res.video.uuid | 75 | this.videoUUID = res.video.uuid |
77 | this.isInUpdateForm = true | 76 | this.isInUpdateForm = true |
78 | 77 | ||
78 | this.firstStepDone.emit(name) | ||
79 | |||
79 | this.fetchVideoLive() | 80 | this.fetchVideoLive() |
80 | }, | 81 | }, |
81 | 82 | ||
diff --git a/client/src/app/+videos/+video-edit/video-update.component.ts b/client/src/app/+videos/+video-edit/video-update.component.ts index 7126ad05b..e37163ca9 100644 --- a/client/src/app/+videos/+video-edit/video-update.component.ts +++ b/client/src/app/+videos/+video-edit/video-update.component.ts | |||
@@ -1,13 +1,14 @@ | |||
1 | import { of } from 'rxjs' | ||
1 | import { map, switchMap } from 'rxjs/operators' | 2 | import { map, switchMap } from 'rxjs/operators' |
2 | import { Component, HostListener, OnInit } from '@angular/core' | 3 | import { Component, HostListener, OnInit } from '@angular/core' |
3 | import { ActivatedRoute, Router } from '@angular/router' | 4 | import { ActivatedRoute, Router } from '@angular/router' |
4 | import { Notifier } from '@app/core' | 5 | import { Notifier } from '@app/core' |
5 | import { FormReactive, FormValidatorService, SelectChannelItem } from '@app/shared/shared-forms' | 6 | import { FormReactive, FormValidatorService, SelectChannelItem } from '@app/shared/shared-forms' |
6 | import { LiveVideoService, VideoCaptionEdit, VideoCaptionService, VideoDetails, VideoEdit, VideoService } from '@app/shared/shared-main' | 7 | import { VideoCaptionEdit, VideoCaptionService, VideoDetails, VideoEdit, VideoService } from '@app/shared/shared-main' |
8 | import { LiveVideoService } from '@app/shared/shared-video-live' | ||
7 | import { LoadingBarService } from '@ngx-loading-bar/core' | 9 | import { LoadingBarService } from '@ngx-loading-bar/core' |
8 | import { LiveVideo, LiveVideoUpdate, VideoPrivacy } from '@shared/models' | 10 | import { LiveVideo, LiveVideoUpdate, VideoPrivacy } from '@shared/models' |
9 | import { hydrateFormFromVideo } from './shared/video-edit-utils' | 11 | import { hydrateFormFromVideo } from './shared/video-edit-utils' |
10 | import { of } from 'rxjs' | ||
11 | 12 | ||
12 | @Component({ | 13 | @Component({ |
13 | selector: 'my-videos-update', | 14 | selector: 'my-videos-update', |
diff --git a/client/src/app/+videos/+video-edit/video-update.resolver.ts b/client/src/app/+videos/+video-edit/video-update.resolver.ts index 5388a64b0..276548b79 100644 --- a/client/src/app/+videos/+video-edit/video-update.resolver.ts +++ b/client/src/app/+videos/+video-edit/video-update.resolver.ts | |||
@@ -2,7 +2,8 @@ import { forkJoin, of } from 'rxjs' | |||
2 | import { map, switchMap } from 'rxjs/operators' | 2 | import { map, switchMap } from 'rxjs/operators' |
3 | import { Injectable } from '@angular/core' | 3 | import { Injectable } from '@angular/core' |
4 | import { ActivatedRouteSnapshot, Resolve } from '@angular/router' | 4 | import { ActivatedRouteSnapshot, Resolve } from '@angular/router' |
5 | import { VideoCaptionService, VideoChannelService, VideoDetails, LiveVideoService, VideoService } from '@app/shared/shared-main' | 5 | import { VideoCaptionService, VideoChannelService, VideoDetails, VideoService } from '@app/shared/shared-main' |
6 | import { LiveVideoService } from '@app/shared/shared-video-live' | ||
6 | 7 | ||
7 | @Injectable() | 8 | @Injectable() |
8 | export class VideoUpdateResolver implements Resolve<any> { | 9 | export class VideoUpdateResolver implements Resolve<any> { |
diff --git a/client/src/app/+videos/+video-watch/video-watch.component.html b/client/src/app/+videos/+video-watch/video-watch.component.html index 74c82fbfd..daee4be2a 100644 --- a/client/src/app/+videos/+video-watch/video-watch.component.html +++ b/client/src/app/+videos/+video-watch/video-watch.component.html | |||
@@ -136,7 +136,7 @@ | |||
136 | <ng-container *ngIf="isUserLoggedIn()"> | 136 | <ng-container *ngIf="isUserLoggedIn()"> |
137 | <my-video-actions-dropdown | 137 | <my-video-actions-dropdown |
138 | placement="bottom auto" buttonDirection="horizontal" [buttonStyled]="true" [video]="video" [videoCaptions]="videoCaptions" | 138 | placement="bottom auto" buttonDirection="horizontal" [buttonStyled]="true" [video]="video" [videoCaptions]="videoCaptions" |
139 | (videoRemoved)="onVideoRemoved()" (modalOpened)="onModalOpened()" | 139 | [displayOptions]="videoActionsOptions" (videoRemoved)="onVideoRemoved()" (modalOpened)="onModalOpened()" |
140 | ></my-video-actions-dropdown> | 140 | ></my-video-actions-dropdown> |
141 | </ng-container> | 141 | </ng-container> |
142 | </div> | 142 | </div> |
diff --git a/client/src/app/+videos/+video-watch/video-watch.component.scss b/client/src/app/+videos/+video-watch/video-watch.component.scss index 712022141..e198a8bb0 100644 --- a/client/src/app/+videos/+video-watch/video-watch.component.scss +++ b/client/src/app/+videos/+video-watch/video-watch.component.scss | |||
@@ -27,14 +27,14 @@ $video-info-margin-left: 44px; | |||
27 | flex-direction: column; | 27 | flex-direction: column; |
28 | justify-content: center; | 28 | justify-content: center; |
29 | 29 | ||
30 | $height: calc(100vh - #{$header-height} - #{$theater-bottom-space}); | ||
31 | |||
30 | #videojs-wrapper { | 32 | #videojs-wrapper { |
31 | width: 100%; | 33 | width: 100%; |
32 | height: auto; | 34 | height: $height; |
33 | } | 35 | } |
34 | 36 | ||
35 | ::ng-deep .video-js { | 37 | ::ng-deep .video-js { |
36 | $height: calc(100vh - #{$header-height} - #{$theater-bottom-space}); | ||
37 | |||
38 | height: $height; | 38 | height: $height; |
39 | width: 100%; | 39 | width: 100%; |
40 | max-width: initial; | 40 | max-width: initial; |
diff --git a/client/src/app/+videos/+video-watch/video-watch.component.ts b/client/src/app/+videos/+video-watch/video-watch.component.ts index 9a3439731..48623cae0 100644 --- a/client/src/app/+videos/+video-watch/video-watch.component.ts +++ b/client/src/app/+videos/+video-watch/video-watch.component.ts | |||
@@ -21,7 +21,7 @@ import { isXPercentInViewport, scrollToTop } from '@app/helpers' | |||
21 | import { Video, VideoCaptionService, VideoDetails, VideoService } from '@app/shared/shared-main' | 21 | import { Video, VideoCaptionService, VideoDetails, VideoService } from '@app/shared/shared-main' |
22 | import { VideoShareComponent } from '@app/shared/shared-share-modal' | 22 | import { VideoShareComponent } from '@app/shared/shared-share-modal' |
23 | import { SubscribeButtonComponent } from '@app/shared/shared-user-subscription' | 23 | import { SubscribeButtonComponent } from '@app/shared/shared-user-subscription' |
24 | import { VideoDownloadComponent } from '@app/shared/shared-video-miniature' | 24 | import { VideoActionsDisplayType, VideoDownloadComponent } from '@app/shared/shared-video-miniature' |
25 | import { VideoPlaylist, VideoPlaylistService } from '@app/shared/shared-video-playlist' | 25 | import { VideoPlaylist, VideoPlaylistService } from '@app/shared/shared-video-playlist' |
26 | import { MetaService } from '@ngx-meta/core' | 26 | import { MetaService } from '@ngx-meta/core' |
27 | import { peertubeLocalStorage } from '@root-helpers/peertube-web-storage' | 27 | import { peertubeLocalStorage } from '@root-helpers/peertube-web-storage' |
@@ -82,6 +82,18 @@ export class VideoWatchComponent implements OnInit, OnDestroy { | |||
82 | tooltipSupport = '' | 82 | tooltipSupport = '' |
83 | tooltipSaveToPlaylist = '' | 83 | tooltipSaveToPlaylist = '' |
84 | 84 | ||
85 | videoActionsOptions: VideoActionsDisplayType = { | ||
86 | playlist: false, | ||
87 | download: true, | ||
88 | update: true, | ||
89 | blacklist: true, | ||
90 | delete: true, | ||
91 | report: true, | ||
92 | duplicate: true, | ||
93 | mute: true, | ||
94 | liveInfo: true | ||
95 | } | ||
96 | |||
85 | private nextVideoUuid = '' | 97 | private nextVideoUuid = '' |
86 | private nextVideoTitle = '' | 98 | private nextVideoTitle = '' |
87 | private currentTime: number | 99 | private currentTime: number |