diff options
Diffstat (limited to 'client/src')
19 files changed, 38 insertions, 44 deletions
diff --git a/client/src/app/+admin/plugins/plugins.routes.ts b/client/src/app/+admin/plugins/plugins.routes.ts index 02e8fd324..4bef27be3 100644 --- a/client/src/app/+admin/plugins/plugins.routes.ts +++ b/client/src/app/+admin/plugins/plugins.routes.ts | |||
@@ -1,11 +1,10 @@ | |||
1 | import { Routes } from '@angular/router' | 1 | import { Routes } from '@angular/router' |
2 | |||
3 | import { UserRightGuard } from '../../core' | ||
4 | import { UserRight } from '../../../../../shared' | ||
5 | import { PluginListInstalledComponent } from '@app/+admin/plugins/plugin-list-installed/plugin-list-installed.component' | 2 | import { PluginListInstalledComponent } from '@app/+admin/plugins/plugin-list-installed/plugin-list-installed.component' |
6 | import { PluginSearchComponent } from '@app/+admin/plugins/plugin-search/plugin-search.component' | 3 | import { PluginSearchComponent } from '@app/+admin/plugins/plugin-search/plugin-search.component' |
7 | import { PluginShowInstalledComponent } from '@app/+admin/plugins/plugin-show-installed/plugin-show-installed.component' | 4 | import { PluginShowInstalledComponent } from '@app/+admin/plugins/plugin-show-installed/plugin-show-installed.component' |
8 | import { PluginsComponent } from '@app/+admin/plugins/plugins.component' | 5 | import { PluginsComponent } from '@app/+admin/plugins/plugins.component' |
6 | import { UserRightGuard } from '@app/core' | ||
7 | import { UserRight } from '@shared/models' | ||
9 | 8 | ||
10 | export const PluginsRoutes: Routes = [ | 9 | export const PluginsRoutes: Routes = [ |
11 | { | 10 | { |
diff --git a/client/src/app/+admin/users/user-edit/user-edit.ts b/client/src/app/+admin/users/user-edit/user-edit.ts index 8fa4b0635..22ec42520 100644 --- a/client/src/app/+admin/users/user-edit/user-edit.ts +++ b/client/src/app/+admin/users/user-edit/user-edit.ts | |||
@@ -1,9 +1,10 @@ | |||
1 | import { OnInit } from '@angular/core' | 1 | import { OnInit, Directive } from '@angular/core' |
2 | import { ConfigService } from '@app/+admin/config/shared/config.service' | 2 | import { ConfigService } from '@app/+admin/config/shared/config.service' |
3 | import { AuthService, ScreenService, ServerService, User } from '@app/core' | 3 | import { AuthService, ScreenService, ServerService, User } from '@app/core' |
4 | import { FormReactive } from '@app/shared/shared-forms' | 4 | import { FormReactive } from '@app/shared/shared-forms' |
5 | import { ServerConfig, USER_ROLE_LABELS, UserAdminFlag, UserRole, VideoResolution } from '@shared/models' | 5 | import { ServerConfig, USER_ROLE_LABELS, UserAdminFlag, UserRole, VideoResolution } from '@shared/models' |
6 | 6 | ||
7 | @Directive() | ||
7 | export abstract class UserEdit extends FormReactive implements OnInit { | 8 | export abstract class UserEdit extends FormReactive implements OnInit { |
8 | videoQuotaOptions: { value: string, label: string, disabled?: boolean }[] = [] | 9 | videoQuotaOptions: { value: string, label: string, disabled?: boolean }[] = [] |
9 | videoQuotaDailyOptions: { value: string, label: string, disabled?: boolean }[] = [] | 10 | videoQuotaDailyOptions: { value: string, label: string, disabled?: boolean }[] = [] |
diff --git a/client/src/app/+videos/+video-edit/video-add-components/video-send.ts b/client/src/app/+videos/+video-edit/video-add-components/video-send.ts index 94479321d..5d11ba7ce 100644 --- a/client/src/app/+videos/+video-edit/video-add-components/video-send.ts +++ b/client/src/app/+videos/+video-edit/video-add-components/video-send.ts | |||
@@ -1,5 +1,5 @@ | |||
1 | import { catchError, switchMap, tap } from 'rxjs/operators' | 1 | import { catchError, switchMap, tap } from 'rxjs/operators' |
2 | import { EventEmitter, OnInit } from '@angular/core' | 2 | import { EventEmitter, OnInit, Directive } from '@angular/core' |
3 | import { AuthService, CanComponentDeactivateResult, Notifier, ServerService } from '@app/core' | 3 | import { AuthService, CanComponentDeactivateResult, Notifier, ServerService } from '@app/core' |
4 | import { populateAsyncUserVideoChannels } from '@app/helpers' | 4 | import { populateAsyncUserVideoChannels } from '@app/helpers' |
5 | import { FormReactive } from '@app/shared/shared-forms' | 5 | import { FormReactive } from '@app/shared/shared-forms' |
@@ -7,6 +7,7 @@ import { VideoCaptionEdit, VideoCaptionService, VideoEdit, VideoService } from ' | |||
7 | import { LoadingBarService } from '@ngx-loading-bar/core' | 7 | import { LoadingBarService } from '@ngx-loading-bar/core' |
8 | import { ServerConfig, VideoConstant, VideoPrivacy } from '@shared/models' | 8 | import { ServerConfig, VideoConstant, VideoPrivacy } from '@shared/models' |
9 | 9 | ||
10 | @Directive() | ||
10 | export abstract class VideoSend extends FormReactive implements OnInit { | 11 | export abstract class VideoSend extends FormReactive implements OnInit { |
11 | userVideoChannels: { id: number, label: string, support: string }[] = [] | 12 | userVideoChannels: { id: number, label: string, support: string }[] = [] |
12 | videoPrivacies: VideoConstant<VideoPrivacy>[] = [] | 13 | videoPrivacies: VideoConstant<VideoPrivacy>[] = [] |
diff --git a/client/src/app/app.component.scss b/client/src/app/app.component.scss index 38ec11b5b..e8447719a 100644 --- a/client/src/app/app.component.scss +++ b/client/src/app/app.component.scss | |||
@@ -3,6 +3,8 @@ | |||
3 | @import '~bootstrap/scss/functions'; | 3 | @import '~bootstrap/scss/functions'; |
4 | @import '~bootstrap/scss/variables'; | 4 | @import '~bootstrap/scss/variables'; |
5 | 5 | ||
6 | $assets-path: '../assets'; | ||
7 | |||
6 | .peertube-container { | 8 | .peertube-container { |
7 | padding-bottom: 20px; | 9 | padding-bottom: 20px; |
8 | } | 10 | } |
@@ -39,7 +41,7 @@ | |||
39 | 41 | ||
40 | &.icon-menu { | 42 | &.icon-menu { |
41 | background-color: pvar(--mainForegroundColor); | 43 | background-color: pvar(--mainForegroundColor); |
42 | mask-image: url('../assets/images/misc/menu.svg'); | 44 | mask-image: url('#{$assets-path}/images/misc/menu.svg'); |
43 | margin: 0 18px 0 20px; | 45 | margin: 0 18px 0 20px; |
44 | } | 46 | } |
45 | } | 47 | } |
@@ -62,7 +64,6 @@ | |||
62 | 64 | ||
63 | .icon.icon-logo { | 65 | .icon.icon-logo { |
64 | display: inline-block; | 66 | display: inline-block; |
65 | background-repeat: no-repeat; | ||
66 | width: 23px; | 67 | width: 23px; |
67 | height: 24px; | 68 | height: 24px; |
68 | margin-right: .5rem; | 69 | margin-right: .5rem; |
diff --git a/client/src/app/shared/shared-instance/instance-follow.service.ts b/client/src/app/shared/shared-instance/instance-follow.service.ts index 3c9ccc40f..e52660140 100644 --- a/client/src/app/shared/shared-instance/instance-follow.service.ts +++ b/client/src/app/shared/shared-instance/instance-follow.service.ts | |||
@@ -4,7 +4,7 @@ import { catchError, map } from 'rxjs/operators' | |||
4 | import { HttpClient, HttpParams } from '@angular/common/http' | 4 | import { HttpClient, HttpParams } from '@angular/common/http' |
5 | import { Injectable } from '@angular/core' | 5 | import { Injectable } from '@angular/core' |
6 | import { RestExtractor, RestPagination, RestService } from '@app/core' | 6 | import { RestExtractor, RestPagination, RestService } from '@app/core' |
7 | import { ActivityPubActorType, ActorFollow, FollowState, ResultList } from '@shared/index' | 7 | import { ActivityPubActorType, ActorFollow, FollowState, ResultList } from '@shared/models' |
8 | import { environment } from '../../../environments/environment' | 8 | import { environment } from '../../../environments/environment' |
9 | 9 | ||
10 | @Injectable() | 10 | @Injectable() |
diff --git a/client/src/app/shared/shared-main/video/video.service.ts b/client/src/app/shared/shared-main/video/video.service.ts index ee3549695..edaefa9f2 100644 --- a/client/src/app/shared/shared-main/video/video.service.ts +++ b/client/src/app/shared/shared-main/video/video.service.ts | |||
@@ -1,4 +1,3 @@ | |||
1 | import { FfprobeData } from 'fluent-ffmpeg' | ||
2 | import { Observable } from 'rxjs' | 1 | import { Observable } from 'rxjs' |
3 | import { catchError, map, switchMap } from 'rxjs/operators' | 2 | import { catchError, map, switchMap } from 'rxjs/operators' |
4 | import { HttpClient, HttpParams, HttpRequest } from '@angular/common/http' | 3 | import { HttpClient, HttpParams, HttpRequest } from '@angular/common/http' |
@@ -19,7 +18,8 @@ import { | |||
19 | VideoFilter, | 18 | VideoFilter, |
20 | VideoPrivacy, | 19 | VideoPrivacy, |
21 | VideoSortField, | 20 | VideoSortField, |
22 | VideoUpdate | 21 | VideoUpdate, |
22 | VideoFileMetadata | ||
23 | } from '@shared/models' | 23 | } from '@shared/models' |
24 | import { environment } from '../../../../environments/environment' | 24 | import { environment } from '../../../../environments/environment' |
25 | import { Account, AccountService } from '../account' | 25 | import { Account, AccountService } from '../account' |
@@ -275,7 +275,7 @@ export class VideoService implements VideosProvider { | |||
275 | 275 | ||
276 | getVideoFileMetadata (metadataUrl: string) { | 276 | getVideoFileMetadata (metadataUrl: string) { |
277 | return this.authHttp | 277 | return this.authHttp |
278 | .get<FfprobeData>(metadataUrl) | 278 | .get<VideoFileMetadata>(metadataUrl) |
279 | .pipe( | 279 | .pipe( |
280 | catchError(err => this.restExtractor.handleError(err)) | 280 | catchError(err => this.restExtractor.handleError(err)) |
281 | ) | 281 | ) |
diff --git a/client/src/app/shared/shared-moderation/account-blocklist.component.ts b/client/src/app/shared/shared-moderation/account-blocklist.component.ts index 38e0d0424..11e554978 100644 --- a/client/src/app/shared/shared-moderation/account-blocklist.component.ts +++ b/client/src/app/shared/shared-moderation/account-blocklist.component.ts | |||
@@ -1,11 +1,12 @@ | |||
1 | import { SortMeta } from 'primeng/api' | 1 | import { SortMeta } from 'primeng/api' |
2 | import { OnInit } from '@angular/core' | 2 | import { OnInit, Directive } from '@angular/core' |
3 | import { Notifier, RestPagination, RestTable } from '@app/core' | 3 | import { Notifier, RestPagination, RestTable } from '@app/core' |
4 | import { Actor } from '@app/shared/shared-main' | 4 | import { Actor } from '@app/shared/shared-main' |
5 | import { I18n } from '@ngx-translate/i18n-polyfill' | 5 | import { I18n } from '@ngx-translate/i18n-polyfill' |
6 | import { AccountBlock } from './account-block.model' | 6 | import { AccountBlock } from './account-block.model' |
7 | import { BlocklistComponentType, BlocklistService } from './blocklist.service' | 7 | import { BlocklistComponentType, BlocklistService } from './blocklist.service' |
8 | 8 | ||
9 | @Directive() | ||
9 | export class GenericAccountBlocklistComponent extends RestTable implements OnInit { | 10 | export class GenericAccountBlocklistComponent extends RestTable implements OnInit { |
10 | // @ts-ignore: "Abstract methods can only appear within an abstract class" | 11 | // @ts-ignore: "Abstract methods can only appear within an abstract class" |
11 | abstract mode: BlocklistComponentType | 12 | abstract mode: BlocklistComponentType |
diff --git a/client/src/app/shared/shared-moderation/server-blocklist.component.ts b/client/src/app/shared/shared-moderation/server-blocklist.component.ts index d904d0605..694b03762 100644 --- a/client/src/app/shared/shared-moderation/server-blocklist.component.ts +++ b/client/src/app/shared/shared-moderation/server-blocklist.component.ts | |||
@@ -1,11 +1,12 @@ | |||
1 | import { SortMeta } from 'primeng/api' | 1 | import { SortMeta } from 'primeng/api' |
2 | import { OnInit, ViewChild } from '@angular/core' | 2 | import { OnInit, ViewChild, Directive } from '@angular/core' |
3 | import { BatchDomainsModalComponent } from '@app/shared/shared-moderation/batch-domains-modal.component' | 3 | import { BatchDomainsModalComponent } from '@app/shared/shared-moderation/batch-domains-modal.component' |
4 | import { Notifier, RestPagination, RestTable } from '@app/core' | 4 | import { Notifier, RestPagination, RestTable } from '@app/core' |
5 | import { I18n } from '@ngx-translate/i18n-polyfill' | 5 | import { I18n } from '@ngx-translate/i18n-polyfill' |
6 | import { ServerBlock } from '@shared/models' | 6 | import { ServerBlock } from '@shared/models' |
7 | import { BlocklistComponentType, BlocklistService } from './blocklist.service' | 7 | import { BlocklistComponentType, BlocklistService } from './blocklist.service' |
8 | 8 | ||
9 | @Directive() | ||
9 | export class GenericServerBlocklistComponent extends RestTable implements OnInit { | 10 | export class GenericServerBlocklistComponent extends RestTable implements OnInit { |
10 | @ViewChild('batchDomainsModal') batchDomainsModal: BatchDomainsModalComponent | 11 | @ViewChild('batchDomainsModal') batchDomainsModal: BatchDomainsModalComponent |
11 | 12 | ||
diff --git a/client/src/app/shared/shared-video-miniature/abstract-video-list.ts b/client/src/app/shared/shared-video-miniature/abstract-video-list.ts index 0ef842652..405af5fa6 100644 --- a/client/src/app/shared/shared-video-miniature/abstract-video-list.ts +++ b/client/src/app/shared/shared-video-miniature/abstract-video-list.ts | |||
@@ -1,6 +1,6 @@ | |||
1 | import { fromEvent, Observable, Subject, Subscription } from 'rxjs' | 1 | import { fromEvent, Observable, Subject, Subscription } from 'rxjs' |
2 | import { debounceTime, switchMap, tap } from 'rxjs/operators' | 2 | import { debounceTime, switchMap, tap } from 'rxjs/operators' |
3 | import { OnDestroy, OnInit } from '@angular/core' | 3 | import { OnDestroy, OnInit, Directive } from '@angular/core' |
4 | import { ActivatedRoute, Router } from '@angular/router' | 4 | import { ActivatedRoute, Router } from '@angular/router' |
5 | import { | 5 | import { |
6 | AuthService, | 6 | AuthService, |
@@ -30,6 +30,7 @@ enum GroupDate { | |||
30 | OLDER = 5 | 30 | OLDER = 5 |
31 | } | 31 | } |
32 | 32 | ||
33 | @Directive() | ||
33 | export abstract class AbstractVideoList implements OnInit, OnDestroy, DisableForReuseHook { | 34 | export abstract class AbstractVideoList implements OnInit, OnDestroy, DisableForReuseHook { |
34 | pagination: ComponentPaginationLight = { | 35 | pagination: ComponentPaginationLight = { |
35 | currentPage: 1, | 36 | currentPage: 1, |
diff --git a/client/src/app/shared/shared-video-miniature/video-download.component.ts b/client/src/app/shared/shared-video-miniature/video-download.component.ts index 21df8b674..4fd06eacf 100644 --- a/client/src/app/shared/shared-video-miniature/video-download.component.ts +++ b/client/src/app/shared/shared-video-miniature/video-download.component.ts | |||
@@ -1,4 +1,3 @@ | |||
1 | import { FfprobeFormat, FfprobeStream } from 'fluent-ffmpeg' | ||
2 | import { mapValues, pick } from 'lodash-es' | 1 | import { mapValues, pick } from 'lodash-es' |
3 | import { BytesPipe } from 'ngx-pipes' | 2 | import { BytesPipe } from 'ngx-pipes' |
4 | import { Component, ElementRef, ViewChild } from '@angular/core' | 3 | import { Component, ElementRef, ViewChild } from '@angular/core' |
@@ -144,7 +143,7 @@ export class VideoDownloadComponent { | |||
144 | this.type = type | 143 | this.type = type |
145 | } | 144 | } |
146 | 145 | ||
147 | getMetadataFormat (format: FfprobeFormat) { | 146 | getMetadataFormat (format: any) { |
148 | const keyToTranslateFunction = { | 147 | const keyToTranslateFunction = { |
149 | 'encoder': (value: string) => ({ label: this.i18n('Encoder'), value }), | 148 | 'encoder': (value: string) => ({ label: this.i18n('Encoder'), value }), |
150 | 'format_long_name': (value: string) => ({ label: this.i18n('Format name'), value }), | 149 | 'format_long_name': (value: string) => ({ label: this.i18n('Format name'), value }), |
@@ -165,7 +164,7 @@ export class VideoDownloadComponent { | |||
165 | ) | 164 | ) |
166 | } | 165 | } |
167 | 166 | ||
168 | getMetadataStream (streams: FfprobeStream[], type: 'video' | 'audio') { | 167 | getMetadataStream (streams: any[], type: 'video' | 'audio') { |
169 | const stream = streams.find(s => s.codec_type === type) | 168 | const stream = streams.find(s => s.codec_type === type) |
170 | if (!stream) return undefined | 169 | if (!stream) return undefined |
171 | 170 | ||
@@ -201,6 +200,7 @@ export class VideoDownloadComponent { | |||
201 | private hydrateMetadataFromMetadataUrl (file: VideoFile) { | 200 | private hydrateMetadataFromMetadataUrl (file: VideoFile) { |
202 | const observable = this.videoService.getVideoFileMetadata(file.metadataUrl) | 201 | const observable = this.videoService.getVideoFileMetadata(file.metadataUrl) |
203 | observable.subscribe(res => file.metadata = res) | 202 | observable.subscribe(res => file.metadata = res) |
203 | |||
204 | return observable.toPromise() | 204 | return observable.toPromise() |
205 | } | 205 | } |
206 | } | 206 | } |
diff --git a/client/src/app/shared/shared-video-miniature/video-miniature.component.ts b/client/src/app/shared/shared-video-miniature/video-miniature.component.ts index f434550dd..3c7046de5 100644 --- a/client/src/app/shared/shared-video-miniature/video-miniature.component.ts +++ b/client/src/app/shared/shared-video-miniature/video-miniature.component.ts | |||
@@ -12,7 +12,7 @@ import { | |||
12 | } from '@angular/core' | 12 | } from '@angular/core' |
13 | import { AuthService, ScreenService, ServerService, User } from '@app/core' | 13 | import { AuthService, ScreenService, ServerService, User } from '@app/core' |
14 | import { I18n } from '@ngx-translate/i18n-polyfill' | 14 | import { I18n } from '@ngx-translate/i18n-polyfill' |
15 | import { ServerConfig, VideoPlaylistType, VideoPrivacy, VideoState } from '../../../../../shared' | 15 | import { ServerConfig, VideoPlaylistType, VideoPrivacy, VideoState } from '@shared/models' |
16 | import { Video } from '../shared-main' | 16 | import { Video } from '../shared-main' |
17 | import { VideoPlaylistService } from '../shared-video-playlist' | 17 | import { VideoPlaylistService } from '../shared-video-playlist' |
18 | import { VideoActionsDisplayType } from './video-actions-dropdown.component' | 18 | import { VideoActionsDisplayType } from './video-actions-dropdown.component' |
diff --git a/client/src/app/shared/shared-video-playlist/video-playlist-element.model.ts b/client/src/app/shared/shared-video-playlist/video-playlist-element.model.ts index 27a79d1fd..f25f10ede 100644 --- a/client/src/app/shared/shared-video-playlist/video-playlist-element.model.ts +++ b/client/src/app/shared/shared-video-playlist/video-playlist-element.model.ts | |||
@@ -1,5 +1,5 @@ | |||
1 | import { VideoPlaylistElement as ServerVideoPlaylistElement, VideoPlaylistElementType } from '../../../../../shared/models/videos' | ||
2 | import { Video } from '@app/shared/shared-main' | 1 | import { Video } from '@app/shared/shared-main' |
2 | import { VideoPlaylistElement as ServerVideoPlaylistElement, VideoPlaylistElementType } from '@shared/models' | ||
3 | 3 | ||
4 | export class VideoPlaylistElement implements ServerVideoPlaylistElement { | 4 | export class VideoPlaylistElement implements ServerVideoPlaylistElement { |
5 | id: number | 5 | id: number |
diff --git a/client/src/assets/player/p2p-media-loader/hls-plugin.ts b/client/src/assets/player/p2p-media-loader/hls-plugin.ts index 9e2ac1aa4..51acad670 100644 --- a/client/src/assets/player/p2p-media-loader/hls-plugin.ts +++ b/client/src/assets/player/p2p-media-loader/hls-plugin.ts | |||
@@ -13,7 +13,7 @@ type Metadata = { | |||
13 | levels: Hlsjs.Level[] | 13 | levels: Hlsjs.Level[] |
14 | } | 14 | } |
15 | 15 | ||
16 | type CustomAudioTrack = AudioTrack & { name?: string, lang?: string } | 16 | type CustomAudioTrack = Hlsjs.AudioTrack & { name?: string, lang?: string } |
17 | 17 | ||
18 | const registerSourceHandler = function (vjs: typeof videojs) { | 18 | const registerSourceHandler = function (vjs: typeof videojs) { |
19 | if (!Hlsjs.isSupported()) { | 19 | if (!Hlsjs.isSupported()) { |
@@ -180,8 +180,6 @@ class Html5Hlsjs { | |||
180 | this.player.textTracks().removeEventListener('change', this.handlers.textTracksChange) | 180 | this.player.textTracks().removeEventListener('change', this.handlers.textTracksChange) |
181 | this.uiTextTrackHandled = false | 181 | this.uiTextTrackHandled = false |
182 | 182 | ||
183 | this.player.audioTracks().removeEventListener('change', this.handlers.audioTracksChange) | ||
184 | |||
185 | this.hls.destroy() | 183 | this.hls.destroy() |
186 | } | 184 | } |
187 | 185 | ||
diff --git a/client/src/assets/player/peertube-player-manager.ts b/client/src/assets/player/peertube-player-manager.ts index f12fb09ae..e9597dde1 100644 --- a/client/src/assets/player/peertube-player-manager.ts +++ b/client/src/assets/player/peertube-player-manager.ts | |||
@@ -19,9 +19,7 @@ import './videojs-components/settings-panel' | |||
19 | import './videojs-components/settings-panel-child' | 19 | import './videojs-components/settings-panel-child' |
20 | import './videojs-components/theater-button' | 20 | import './videojs-components/theater-button' |
21 | import videojs from 'video.js' | 21 | import videojs from 'video.js' |
22 | 22 | import { isDefaultLocale, VideoFile } from '@shared/models' | |
23 | import { isDefaultLocale } from '../../../../shared/models/i18n/i18n' | ||
24 | import { VideoFile } from '../../../../shared/models/videos' | ||
25 | import { RedundancyUrlManager } from './p2p-media-loader/redundancy-url-manager' | 23 | import { RedundancyUrlManager } from './p2p-media-loader/redundancy-url-manager' |
26 | import { segmentUrlBuilderFactory } from './p2p-media-loader/segment-url-builder' | 24 | import { segmentUrlBuilderFactory } from './p2p-media-loader/segment-url-builder' |
27 | import { segmentValidatorFactory } from './p2p-media-loader/segment-validator' | 25 | import { segmentValidatorFactory } from './p2p-media-loader/segment-validator' |
diff --git a/client/src/assets/player/peertube-videojs-typings.ts b/client/src/assets/player/peertube-videojs-typings.ts index cb7d6f6b4..9c81fd5bc 100644 --- a/client/src/assets/player/peertube-videojs-typings.ts +++ b/client/src/assets/player/peertube-videojs-typings.ts | |||
@@ -41,8 +41,6 @@ declare module 'video.js' { | |||
41 | tracks_: (TextTrack & { id: string, label: string, src: string })[] | 41 | tracks_: (TextTrack & { id: string, label: string, src: string })[] |
42 | } | 42 | } |
43 | 43 | ||
44 | audioTracks (): AudioTrackList | ||
45 | |||
46 | dock (options: { title: string, description: string }): void | 44 | dock (options: { title: string, description: string }): void |
47 | } | 45 | } |
48 | } | 46 | } |
diff --git a/client/src/assets/player/translations-manager.ts b/client/src/assets/player/translations-manager.ts index e9f300ce7..2bde7d6ca 100644 --- a/client/src/assets/player/translations-manager.ts +++ b/client/src/assets/player/translations-manager.ts | |||
@@ -1,4 +1,4 @@ | |||
1 | import { getCompleteLocale, getShortLocale, is18nLocale, isDefaultLocale } from '../../../../shared/models' | 1 | import { getCompleteLocale, getShortLocale, is18nLocale, isDefaultLocale } from '@shared/models' |
2 | 2 | ||
3 | export class TranslationsManager { | 3 | export class TranslationsManager { |
4 | private static videojsLocaleCache: { [ path: string ]: any } = {} | 4 | private static videojsLocaleCache: { [ path: string ]: any } = {} |
diff --git a/client/src/assets/player/utils.ts b/client/src/assets/player/utils.ts index 3135f4e6c..20d97c7e2 100644 --- a/client/src/assets/player/utils.ts +++ b/client/src/assets/player/utils.ts | |||
@@ -1,4 +1,4 @@ | |||
1 | import { VideoFile } from '../../../../shared/models/videos' | 1 | import { VideoFile } from '@shared/models' |
2 | 2 | ||
3 | function toTitleCase (str: string) { | 3 | function toTitleCase (str: string) { |
4 | return str.charAt(0).toUpperCase() + str.slice(1) | 4 | return str.charAt(0).toUpperCase() + str.slice(1) |
diff --git a/client/src/sass/application.scss b/client/src/sass/application.scss index 4c7e6b396..eacfad30b 100644 --- a/client/src/sass/application.scss +++ b/client/src/sass/application.scss | |||
@@ -8,7 +8,7 @@ $icon-font-path: '~@neos21/bootstrap3-glyphicons/assets/fonts/'; | |||
8 | 8 | ||
9 | @import '~video.js/dist/video-js.css'; | 9 | @import '~video.js/dist/video-js.css'; |
10 | 10 | ||
11 | $assets-path: '../assets/'; | 11 | $assets-path: '../../assets/'; |
12 | @import './player/index'; | 12 | @import './player/index'; |
13 | @import './loading-bar'; | 13 | @import './loading-bar'; |
14 | 14 | ||
diff --git a/client/src/standalone/videos/embed.ts b/client/src/standalone/videos/embed.ts index 5bf38a04c..def607916 100644 --- a/client/src/standalone/videos/embed.ts +++ b/client/src/standalone/videos/embed.ts | |||
@@ -1,24 +1,19 @@ | |||
1 | import './embed.scss' | 1 | import './embed.scss' |
2 | 2 | import videojs from 'video.js' | |
3 | import { objectToUrlEncoded, peertubeLocalStorage, PureAuthUser } from '@root-helpers/index' | ||
3 | import { | 4 | import { |
4 | peertubeTranslate, | 5 | peertubeTranslate, |
5 | ResultList, | 6 | ResultList, |
6 | ServerConfig, | 7 | ServerConfig, |
8 | UserRefreshToken, | ||
9 | VideoCaption, | ||
7 | VideoDetails, | 10 | VideoDetails, |
8 | UserRefreshToken | 11 | VideoStreamingPlaylistType |
9 | } from '../../../../shared' | 12 | } from '../../../../shared/models' |
10 | import { VideoCaption } from '../../../../shared/models/videos/caption/video-caption.model' | 13 | import { P2PMediaLoaderOptions, PeertubePlayerManagerOptions, PlayerMode } from '../../assets/player/peertube-player-manager' |
11 | import { | ||
12 | P2PMediaLoaderOptions, | ||
13 | PeertubePlayerManagerOptions, | ||
14 | PlayerMode | ||
15 | } from '../../assets/player/peertube-player-manager' | ||
16 | import { VideoStreamingPlaylistType } from '../../../../shared/models/videos/video-streaming-playlist.type' | ||
17 | import { PeerTubeEmbedApi } from './embed-api' | ||
18 | import { TranslationsManager } from '../../assets/player/translations-manager' | ||
19 | import videojs from 'video.js' | ||
20 | import { VideoJSCaption } from '../../assets/player/peertube-videojs-typings' | 14 | import { VideoJSCaption } from '../../assets/player/peertube-videojs-typings' |
21 | import { PureAuthUser, objectToUrlEncoded, peertubeLocalStorage } from '@root-helpers/index' | 15 | import { TranslationsManager } from '../../assets/player/translations-manager' |
16 | import { PeerTubeEmbedApi } from './embed-api' | ||
22 | 17 | ||
23 | type Translations = { [ id: string ]: string } | 18 | type Translations = { [ id: string ]: string } |
24 | 19 | ||