aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/+my-account
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2020-11-05 10:56:23 +0100
committerChocobozzz <chocobozzz@cpy.re>2020-11-09 15:33:04 +0100
commitf8c00564e7e66c7c9d65ea044a4c1485df0e4c7c (patch)
tree895792776837b477d4daff3d1c112942015d0371 /client/src/app/+my-account
parentba881f0e3f60218b28abbb59d23118db5f97d5f8 (diff)
downloadPeerTube-f8c00564e7e66c7c9d65ea044a4c1485df0e4c7c.tar.gz
PeerTube-f8c00564e7e66c7c9d65ea044a4c1485df0e4c7c.tar.zst
PeerTube-f8c00564e7e66c7c9d65ea044a4c1485df0e4c7c.zip
Add live info in watch page
Diffstat (limited to 'client/src/app/+my-account')
-rw-r--r--client/src/app/+my-account/my-account-videos/modals/live-stream-information.component.html35
-rw-r--r--client/src/app/+my-account/my-account-videos/modals/live-stream-information.component.scss10
-rw-r--r--client/src/app/+my-account/my-account-videos/modals/live-stream-information.component.ts40
-rw-r--r--client/src/app/+my-account/my-account-videos/my-account-videos.component.ts2
-rw-r--r--client/src/app/+my-account/my-account.module.ts8
5 files changed, 5 insertions, 90 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
4p-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 @@
1import { Component, ElementRef, ViewChild } from '@angular/core'
2import { LiveVideoService, Video } from '@app/shared/shared-main'
3import { 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})
10export 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
6import { DisableForReuseHook } from '@app/core/routing/disable-for-reuse-hook' 6import { DisableForReuseHook } from '@app/core/routing/disable-for-reuse-hook'
7import { immutableAssign } from '@app/helpers' 7import { immutableAssign } from '@app/helpers'
8import { DropdownAction, Video, VideoService } from '@app/shared/shared-main' 8import { DropdownAction, Video, VideoService } from '@app/shared/shared-main'
9import { LiveStreamInformationComponent } from '@app/shared/shared-video-live'
9import { MiniatureDisplayOptions, OwnerDisplayType, SelectionType, VideosSelectionComponent } from '@app/shared/shared-video-miniature' 10import { MiniatureDisplayOptions, OwnerDisplayType, SelectionType, VideosSelectionComponent } from '@app/shared/shared-video-miniature'
10import { VideoSortField } from '@shared/models' 11import { VideoSortField } from '@shared/models'
11import { VideoChangeOwnershipComponent } from './modals/video-change-ownership.component' 12import { VideoChangeOwnershipComponent } from './modals/video-change-ownership.component'
12import { LiveStreamInformationComponent } from './modals/live-stream-information.component'
13 13
14@Component({ 14@Component({
15 selector: 'my-account-videos', 15 selector: 'my-account-videos',
diff --git a/client/src/app/+my-account/my-account.module.ts b/client/src/app/+my-account/my-account.module.ts
index 6b8baff52..6d21fff72 100644
--- a/client/src/app/+my-account/my-account.module.ts
+++ b/client/src/app/+my-account/my-account.module.ts
@@ -6,6 +6,7 @@ import { NgModule } from '@angular/core'
6import { SharedAbuseListModule } from '@app/shared/shared-abuse-list' 6import { SharedAbuseListModule } from '@app/shared/shared-abuse-list'
7import { SharedFormModule } from '@app/shared/shared-forms' 7import { SharedFormModule } from '@app/shared/shared-forms'
8import { SharedGlobalIconModule } from '@app/shared/shared-icons' 8import { SharedGlobalIconModule } from '@app/shared/shared-icons'
9import { SharedVideoLiveModule } from '@app/shared/shared-video-live'
9import { SharedMainModule } from '@app/shared/shared-main' 10import { SharedMainModule } from '@app/shared/shared-main'
10import { SharedModerationModule } from '@app/shared/shared-moderation' 11import { SharedModerationModule } from '@app/shared/shared-moderation'
11import { SharedShareModal } from '@app/shared/shared-share-modal' 12import { SharedShareModal } from '@app/shared/shared-share-modal'
@@ -33,9 +34,8 @@ import { MyAccountVideoPlaylistCreateComponent } from './my-account-video-playli
33import { MyAccountVideoPlaylistElementsComponent } from './my-account-video-playlists/my-account-video-playlist-elements.component' 34import { MyAccountVideoPlaylistElementsComponent } from './my-account-video-playlists/my-account-video-playlist-elements.component'
34import { MyAccountVideoPlaylistUpdateComponent } from './my-account-video-playlists/my-account-video-playlist-update.component' 35import { MyAccountVideoPlaylistUpdateComponent } from './my-account-video-playlists/my-account-video-playlist-update.component'
35import { MyAccountVideoPlaylistsComponent } from './my-account-video-playlists/my-account-video-playlists.component' 36import { MyAccountVideoPlaylistsComponent } from './my-account-video-playlists/my-account-video-playlists.component'
36import { MyAccountVideosComponent } from './my-account-videos/my-account-videos.component'
37import { VideoChangeOwnershipComponent } from './my-account-videos/modals/video-change-ownership.component' 37import { VideoChangeOwnershipComponent } from './my-account-videos/modals/video-change-ownership.component'
38import { LiveStreamInformationComponent } from './my-account-videos/modals/live-stream-information.component' 38import { MyAccountVideosComponent } from './my-account-videos/my-account-videos.component'
39import { MyAccountComponent } from './my-account.component' 39import { MyAccountComponent } from './my-account.component'
40 40
41@NgModule({ 41@NgModule({
@@ -56,7 +56,8 @@ import { MyAccountComponent } from './my-account.component'
56 SharedUserInterfaceSettingsModule, 56 SharedUserInterfaceSettingsModule,
57 SharedGlobalIconModule, 57 SharedGlobalIconModule,
58 SharedAbuseListModule, 58 SharedAbuseListModule,
59 SharedShareModal 59 SharedShareModal,
60 SharedVideoLiveModule
60 ], 61 ],
61 62
62 declarations: [ 63 declarations: [
@@ -69,7 +70,6 @@ import { MyAccountComponent } from './my-account.component'
69 MyAccountVideosComponent, 70 MyAccountVideosComponent,
70 71
71 VideoChangeOwnershipComponent, 72 VideoChangeOwnershipComponent,
72 LiveStreamInformationComponent,
73 73
74 MyAccountOwnershipComponent, 74 MyAccountOwnershipComponent,
75 MyAccountAcceptOwnershipComponent, 75 MyAccountAcceptOwnershipComponent,