diff options
author | Chocobozzz <me@florianbigard.com> | 2020-11-05 10:56:23 +0100 |
---|---|---|
committer | Chocobozzz <chocobozzz@cpy.re> | 2020-11-09 15:33:04 +0100 |
commit | f8c00564e7e66c7c9d65ea044a4c1485df0e4c7c (patch) | |
tree | 895792776837b477d4daff3d1c112942015d0371 /client/src/app/+my-account/my-account-videos | |
parent | ba881f0e3f60218b28abbb59d23118db5f97d5f8 (diff) | |
download | PeerTube-f8c00564e7e66c7c9d65ea044a4c1485df0e4c7c.tar.gz PeerTube-f8c00564e7e66c7c9d65ea044a4c1485df0e4c7c.tar.zst PeerTube-f8c00564e7e66c7c9d65ea044a4c1485df0e4c7c.zip |
Add live info in watch page
Diffstat (limited to 'client/src/app/+my-account/my-account-videos')
4 files changed, 1 insertions, 86 deletions
diff --git a/client/src/app/+my-account/my-account-videos/modals/live-stream-information.component.html b/client/src/app/+my-account/my-account-videos/modals/live-stream-information.component.html deleted file mode 100644 index 2e65e1de9..000000000 --- a/client/src/app/+my-account/my-account-videos/modals/live-stream-information.component.html +++ /dev/null | |||
@@ -1,35 +0,0 @@ | |||
1 | <ng-template #modal let-close="close" let-dismiss="dismiss"> | ||
2 | <div class="modal-header"> | ||
3 | <h4 i18n class="modal-title">Live information</h4> | ||
4 | |||
5 | <my-global-icon iconName="cross" aria-label="Close" role="button" (click)="dismiss()"></my-global-icon> | ||
6 | </div> | ||
7 | |||
8 | <div class="modal-body"> | ||
9 | <div class="form-group"> | ||
10 | <label for="liveVideoRTMPUrl" i18n>Live RTMP Url</label> | ||
11 | <my-input-readonly-copy id="liveVideoRTMPUrl" [value]="rtmpUrl"></my-input-readonly-copy> | ||
12 | </div> | ||
13 | |||
14 | <div class="form-group"> | ||
15 | <label for="liveVideoStreamKey" i18n>Live stream key</label> | ||
16 | <my-input-readonly-copy id="liveVideoStreamKey" [value]="streamKey"></my-input-readonly-copy> | ||
17 | |||
18 | <div class="form-group-description" i18n>⚠️ Never share your stream key with anyone.</div> | ||
19 | </div> | ||
20 | </div> | ||
21 | |||
22 | <div class="modal-footer"> | ||
23 | <div class="form-group inputs"> | ||
24 | <input | ||
25 | type="button" role="button" i18n-value value="Close" class="action-button action-button-cancel" | ||
26 | (click)="dismiss()" | ||
27 | > | ||
28 | |||
29 | <my-edit-button | ||
30 | i18n-label label="Update live settings" | ||
31 | [routerLink]="[ '/videos', 'update', video.uuid ]" (click)="dismiss()" | ||
32 | ></my-edit-button> | ||
33 | </div> | ||
34 | </div> | ||
35 | </ng-template> | ||
diff --git a/client/src/app/+my-account/my-account-videos/modals/live-stream-information.component.scss b/client/src/app/+my-account/my-account-videos/modals/live-stream-information.component.scss deleted file mode 100644 index a79fec179..000000000 --- a/client/src/app/+my-account/my-account-videos/modals/live-stream-information.component.scss +++ /dev/null | |||
@@ -1,10 +0,0 @@ | |||
1 | @import '_variables'; | ||
2 | @import '_mixins'; | ||
3 | |||
4 | p-autocomplete { | ||
5 | display: block; | ||
6 | } | ||
7 | |||
8 | .form-group { | ||
9 | margin: 20px 0; | ||
10 | } \ No newline at end of file | ||
diff --git a/client/src/app/+my-account/my-account-videos/modals/live-stream-information.component.ts b/client/src/app/+my-account/my-account-videos/modals/live-stream-information.component.ts deleted file mode 100644 index a5885a8e7..000000000 --- a/client/src/app/+my-account/my-account-videos/modals/live-stream-information.component.ts +++ /dev/null | |||
@@ -1,40 +0,0 @@ | |||
1 | import { Component, ElementRef, ViewChild } from '@angular/core' | ||
2 | import { LiveVideoService, Video } from '@app/shared/shared-main' | ||
3 | import { NgbModal } from '@ng-bootstrap/ng-bootstrap' | ||
4 | |||
5 | @Component({ | ||
6 | selector: 'my-live-stream-information', | ||
7 | templateUrl: './live-stream-information.component.html', | ||
8 | styleUrls: [ './live-stream-information.component.scss' ] | ||
9 | }) | ||
10 | export class LiveStreamInformationComponent { | ||
11 | @ViewChild('modal', { static: true }) modal: ElementRef | ||
12 | |||
13 | video: Video | ||
14 | rtmpUrl = '' | ||
15 | streamKey = '' | ||
16 | |||
17 | constructor ( | ||
18 | private modalService: NgbModal, | ||
19 | private liveVideoService: LiveVideoService | ||
20 | ) { } | ||
21 | |||
22 | show (video: Video) { | ||
23 | this.video = video | ||
24 | this.rtmpUrl = '' | ||
25 | this.streamKey = '' | ||
26 | |||
27 | this.loadLiveInfo(video) | ||
28 | |||
29 | this.modalService | ||
30 | .open(this.modal, { centered: true }) | ||
31 | } | ||
32 | |||
33 | private loadLiveInfo (video: Video) { | ||
34 | this.liveVideoService.getVideoLive(video.id) | ||
35 | .subscribe(live => { | ||
36 | this.rtmpUrl = live.rtmpUrl | ||
37 | this.streamKey = live.streamKey | ||
38 | }) | ||
39 | } | ||
40 | } | ||
diff --git a/client/src/app/+my-account/my-account-videos/my-account-videos.component.ts b/client/src/app/+my-account/my-account-videos/my-account-videos.component.ts index 7a3019239..84f022ad2 100644 --- a/client/src/app/+my-account/my-account-videos/my-account-videos.component.ts +++ b/client/src/app/+my-account/my-account-videos/my-account-videos.component.ts | |||
@@ -6,10 +6,10 @@ import { AuthService, ComponentPagination, ConfirmService, Notifier, ScreenServi | |||
6 | import { DisableForReuseHook } from '@app/core/routing/disable-for-reuse-hook' | 6 | import { DisableForReuseHook } from '@app/core/routing/disable-for-reuse-hook' |
7 | import { immutableAssign } from '@app/helpers' | 7 | import { immutableAssign } from '@app/helpers' |
8 | import { DropdownAction, Video, VideoService } from '@app/shared/shared-main' | 8 | import { DropdownAction, Video, VideoService } from '@app/shared/shared-main' |
9 | import { LiveStreamInformationComponent } from '@app/shared/shared-video-live' | ||
9 | import { MiniatureDisplayOptions, OwnerDisplayType, SelectionType, VideosSelectionComponent } from '@app/shared/shared-video-miniature' | 10 | import { MiniatureDisplayOptions, OwnerDisplayType, SelectionType, VideosSelectionComponent } from '@app/shared/shared-video-miniature' |
10 | import { VideoSortField } from '@shared/models' | 11 | import { VideoSortField } from '@shared/models' |
11 | import { VideoChangeOwnershipComponent } from './modals/video-change-ownership.component' | 12 | import { VideoChangeOwnershipComponent } from './modals/video-change-ownership.component' |
12 | import { LiveStreamInformationComponent } from './modals/live-stream-information.component' | ||
13 | 13 | ||
14 | @Component({ | 14 | @Component({ |
15 | selector: 'my-account-videos', | 15 | selector: 'my-account-videos', |