diff options
author | Chocobozzz <me@florianbigard.com> | 2021-04-14 10:38:09 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2021-04-14 11:45:14 +0200 |
commit | db5814c0472d2b9e8f0ca6bdd1175ff1cd99ed7c (patch) | |
tree | 06d02916518e091f36d486f0f57e3a963ca7fa9e /client/src/app/+videos | |
parent | 456c9bfddbccbbb376f6756312a49b4183cefb90 (diff) | |
download | PeerTube-db5814c0472d2b9e8f0ca6bdd1175ff1cd99ed7c.tar.gz PeerTube-db5814c0472d2b9e8f0ca6bdd1175ff1cd99ed7c.tar.zst PeerTube-db5814c0472d2b9e8f0ca6bdd1175ff1cd99ed7c.zip |
Move player style in watch component
Diffstat (limited to 'client/src/app/+videos')
4 files changed, 23 insertions, 1 deletions
diff --git a/client/src/app/+videos/+video-watch/player-styles.component.scss b/client/src/app/+videos/+video-watch/player-styles.component.scss new file mode 100644 index 000000000..7f1442a59 --- /dev/null +++ b/client/src/app/+videos/+video-watch/player-styles.component.scss | |||
@@ -0,0 +1,4 @@ | |||
1 | @import 'node_modules/video.js/dist/video-js'; | ||
2 | |||
3 | $assets-path: '../../assets/'; | ||
4 | @import '../../../sass/player/index'; | ||
diff --git a/client/src/app/+videos/+video-watch/player-styles.component.ts b/client/src/app/+videos/+video-watch/player-styles.component.ts new file mode 100644 index 000000000..c02630979 --- /dev/null +++ b/client/src/app/+videos/+video-watch/player-styles.component.ts | |||
@@ -0,0 +1,14 @@ | |||
1 | import { Component, ViewEncapsulation } from '@angular/core' | ||
2 | |||
3 | /* | ||
4 | * Allows to lazy load global player styles in the watch component | ||
5 | */ | ||
6 | |||
7 | @Component({ | ||
8 | selector: 'my-player-styles', | ||
9 | template: '', | ||
10 | styleUrls: [ './player-styles.component.scss' ], | ||
11 | encapsulation: ViewEncapsulation.None | ||
12 | }) | ||
13 | export class PlayerStylesComponent { | ||
14 | } | ||
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 6ede109fd..eadb2148a 100644 --- a/client/src/app/+videos/+video-watch/video-watch.component.html +++ b/client/src/app/+videos/+video-watch/video-watch.component.html | |||
@@ -319,3 +319,5 @@ | |||
319 | <my-support-modal #supportModal [video]="video"></my-support-modal> | 319 | <my-support-modal #supportModal [video]="video"></my-support-modal> |
320 | <my-video-share #videoShareModal [video]="video" [videoCaptions]="videoCaptions" [playlist]="playlist"></my-video-share> | 320 | <my-video-share #videoShareModal [video]="video" [videoCaptions]="videoCaptions" [playlist]="playlist"></my-video-share> |
321 | </ng-container> | 321 | </ng-container> |
322 | |||
323 | <my-player-styles></my-player-styles> | ||
diff --git a/client/src/app/+videos/+video-watch/video-watch.module.ts b/client/src/app/+videos/+video-watch/video-watch.module.ts index 3e9f3822e..29ad92f00 100644 --- a/client/src/app/+videos/+video-watch/video-watch.module.ts +++ b/client/src/app/+videos/+video-watch/video-watch.module.ts | |||
@@ -14,6 +14,7 @@ import { VideoCommentService } from '../../shared/shared-video-comment/video-com | |||
14 | import { VideoCommentAddComponent } from './comment/video-comment-add.component' | 14 | import { VideoCommentAddComponent } from './comment/video-comment-add.component' |
15 | import { VideoCommentComponent } from './comment/video-comment.component' | 15 | import { VideoCommentComponent } from './comment/video-comment.component' |
16 | import { VideoCommentsComponent } from './comment/video-comments.component' | 16 | import { VideoCommentsComponent } from './comment/video-comments.component' |
17 | import { PlayerStylesComponent } from './player-styles.component' | ||
17 | import { RecommendationsModule } from './recommendations/recommendations.module' | 18 | import { RecommendationsModule } from './recommendations/recommendations.module' |
18 | import { TimestampRouteTransformerDirective } from './timestamp-route-transformer.directive' | 19 | import { TimestampRouteTransformerDirective } from './timestamp-route-transformer.directive' |
19 | import { VideoAvatarChannelComponent } from './video-avatar-channel.component' | 20 | import { VideoAvatarChannelComponent } from './video-avatar-channel.component' |
@@ -50,7 +51,8 @@ import { VideoWatchComponent } from './video-watch.component' | |||
50 | VideoAvatarChannelComponent, | 51 | VideoAvatarChannelComponent, |
51 | 52 | ||
52 | TimestampRouteTransformerDirective, | 53 | TimestampRouteTransformerDirective, |
53 | TimestampRouteTransformerDirective | 54 | |
55 | PlayerStylesComponent | ||
54 | ], | 56 | ], |
55 | 57 | ||
56 | exports: [ | 58 | exports: [ |