Upgrade to angular 10
This commit is contained in:
parent
4504f09f6e
commit
583eb04b54
37 changed files with 2006 additions and 1891 deletions
|
@ -429,7 +429,7 @@
|
||||||
"schematics": {
|
"schematics": {
|
||||||
"@schematics/angular:component": {
|
"@schematics/angular:component": {
|
||||||
"prefix": "app",
|
"prefix": "app",
|
||||||
"styleext": "scss"
|
"style": "scss"
|
||||||
},
|
},
|
||||||
"@schematics/angular:directive": {
|
"@schematics/angular:directive": {
|
||||||
"prefix": "app"
|
"prefix": "app"
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
{
|
{
|
||||||
"extends": "../tsconfig.json",
|
"extends": "../tsconfig.base.json",
|
||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
"outDir": "../out-tsc/app",
|
"outDir": "../out-tsc/app",
|
||||||
"module": "commonjs",
|
"module": "commonjs",
|
||||||
|
|
|
@ -14,7 +14,7 @@
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"lint": "npm run lint-ts && npm run lint-scss",
|
"lint": "npm run lint-ts && npm run lint-scss",
|
||||||
"lint-ts": "tslint --project ./tsconfig.json -c ./tslint.json 'src/app/**/*.ts' 'src/standalone/**/*.ts'",
|
"lint-ts": "tslint --project ./tsconfig.app.json -c ./tslint.json 'src/app/**/*.ts' 'src/standalone/**/*.ts'",
|
||||||
"lint-scss": "sass-lint -c .sass-lint.yml",
|
"lint-scss": "sass-lint -c .sass-lint.yml",
|
||||||
"webpack": "webpack",
|
"webpack": "webpack",
|
||||||
"tslint": "tslint",
|
"tslint": "tslint",
|
||||||
|
@ -27,29 +27,28 @@
|
||||||
},
|
},
|
||||||
"typings": "*.d.ts",
|
"typings": "*.d.ts",
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@angular-devkit/build-angular": "~0.901.7",
|
"@angular-devkit/build-angular": "^0.1001.0-next.4",
|
||||||
"@angular/animations": "~9.1.9",
|
"@angular/animations": "^10.1.0-next.4",
|
||||||
"@angular/cdk": "^9.0.0",
|
"@angular/cdk": "^10.0.0",
|
||||||
"@angular/cli": "~9.1.7",
|
"@angular/cli": "^10.1.0-next.4",
|
||||||
"@angular/common": "~9.1.9",
|
"@angular/common": "^10.1.0-next.4",
|
||||||
"@angular/compiler": "~9.1.9",
|
"@angular/compiler": "^10.1.0-next.4",
|
||||||
"@angular/compiler-cli": "~9.1.9",
|
"@angular/compiler-cli": "^10.1.0-next.4",
|
||||||
"@angular/core": "~9.1.9",
|
"@angular/core": "^10.1.0-next.4",
|
||||||
"@angular/forms": "~9.1.9",
|
"@angular/forms": "^10.1.0-next.4",
|
||||||
"@angular/language-service": "~9.1.9",
|
"@angular/localize": "^10.1.0-next.4",
|
||||||
"@angular/localize": "^9.1.9",
|
"@angular/platform-browser": "^10.1.0-next.4",
|
||||||
"@angular/platform-browser": "~9.1.9",
|
"@angular/platform-browser-dynamic": "^10.1.0-next.4",
|
||||||
"@angular/platform-browser-dynamic": "~9.1.9",
|
"@angular/router": "^10.1.0-next.4",
|
||||||
"@angular/router": "~9.1.9",
|
"@angular/service-worker": "^10.1.0-next.4",
|
||||||
"@angular/service-worker": "~9.1.9",
|
|
||||||
"@angularclass/hmr": "^2.1.3",
|
"@angularclass/hmr": "^2.1.3",
|
||||||
"@neos21/bootstrap3-glyphicons": "^1.0.1",
|
"@neos21/bootstrap3-glyphicons": "^1.0.1",
|
||||||
"@ng-bootstrap/ng-bootstrap": "^6.0.2",
|
"@ng-bootstrap/ng-bootstrap": "^7.0.0",
|
||||||
"@ngx-i18nsupport/ngx-i18nsupport": "^1.1.6",
|
"@ngx-i18nsupport/ngx-i18nsupport": "^1.1.6",
|
||||||
"@ngx-i18nsupport/tooling": "^8.0.3",
|
"@ngx-i18nsupport/tooling": "^8.0.3",
|
||||||
"@ngx-loading-bar/core": "^4.2.0",
|
"@ngx-loading-bar/core": "^5.0.0",
|
||||||
"@ngx-loading-bar/http-client": "^4.2.0",
|
"@ngx-loading-bar/http-client": "^5.0.0",
|
||||||
"@ngx-loading-bar/router": "^4.2.0",
|
"@ngx-loading-bar/router": "^5.0.0",
|
||||||
"@ngx-meta/core": "^9.0.0",
|
"@ngx-meta/core": "^9.0.0",
|
||||||
"@ngx-translate/i18n-polyfill": "^1.0.0",
|
"@ngx-translate/i18n-polyfill": "^1.0.0",
|
||||||
"@types/chart.js": "^2.9.16",
|
"@types/chart.js": "^2.9.16",
|
||||||
|
@ -62,14 +61,13 @@
|
||||||
"@types/linkifyjs": "^2.1.2",
|
"@types/linkifyjs": "^2.1.2",
|
||||||
"@types/lodash-es": "^4.17.0",
|
"@types/lodash-es": "^4.17.0",
|
||||||
"@types/markdown-it": "^10.0.1",
|
"@types/markdown-it": "^10.0.1",
|
||||||
"@types/node": "^12.11.1",
|
"@types/node": "^14.0.14",
|
||||||
"@types/sanitize-html": "1.23.2",
|
"@types/sanitize-html": "1.23.2",
|
||||||
"@types/socket.io-client": "^1.4.32",
|
"@types/socket.io-client": "^1.4.32",
|
||||||
"@types/video.js": "^7.3.8",
|
"@types/video.js": "^7.3.8",
|
||||||
"@types/webtorrent": "^0.107.0",
|
"@types/webtorrent": "^0.107.0",
|
||||||
"angular2-hotkeys": "^2.1.2",
|
"angular2-hotkeys": "^2.1.2",
|
||||||
"angularx-qrcode": "2.3.4",
|
"angularx-qrcode": "10.0.6",
|
||||||
"awesome-typescript-loader": "5.2.1",
|
|
||||||
"bootstrap": "^4.1.3",
|
"bootstrap": "^4.1.3",
|
||||||
"buffer": "^5.1.0",
|
"buffer": "^5.1.0",
|
||||||
"cache-chunk-store": "^3.0.0",
|
"cache-chunk-store": "^3.0.0",
|
||||||
|
@ -86,14 +84,14 @@
|
||||||
"html-loader": "^1.0.0",
|
"html-loader": "^1.0.0",
|
||||||
"html-webpack-plugin": "^4.0.3",
|
"html-webpack-plugin": "^4.0.3",
|
||||||
"https-browserify": "^1.0.0",
|
"https-browserify": "^1.0.0",
|
||||||
"jasmine-core": "^3.1.0",
|
"jasmine-core": "~3.5.0",
|
||||||
"jasmine-spec-reporter": "^5.0.1",
|
"jasmine-spec-reporter": "~5.0.0",
|
||||||
"jschannel": "^1.0.2",
|
"jschannel": "^1.0.2",
|
||||||
"karma": "^5.0.4",
|
"karma": "~5.1.0",
|
||||||
"karma-chrome-launcher": "^3.0.0",
|
"karma-chrome-launcher": "~3.1.0",
|
||||||
"karma-coverage-istanbul-reporter": "^3.0.2",
|
"karma-coverage-istanbul-reporter": "~3.0.2",
|
||||||
"karma-jasmine": "^3.1.1",
|
"karma-jasmine": "~3.3.0",
|
||||||
"karma-jasmine-html-reporter": "^1.3.1",
|
"karma-jasmine-html-reporter": "^1.5.0",
|
||||||
"linkifyjs": "^2.1.5",
|
"linkifyjs": "^2.1.5",
|
||||||
"lodash-es": "^4.17.4",
|
"lodash-es": "^4.17.4",
|
||||||
"markdown-it": "^11.0.0",
|
"markdown-it": "^11.0.0",
|
||||||
|
@ -105,7 +103,7 @@
|
||||||
"path-browserify": "^1.0.0",
|
"path-browserify": "^1.0.0",
|
||||||
"primeng": "^9.0.0-rc.4",
|
"primeng": "^9.0.0-rc.4",
|
||||||
"process": "^0.11.10",
|
"process": "^0.11.10",
|
||||||
"protractor": "^7.0.0",
|
"protractor": "~7.0.0",
|
||||||
"purify-css": "^1.2.5",
|
"purify-css": "^1.2.5",
|
||||||
"purifycss-webpack": "^0.7.0",
|
"purifycss-webpack": "^0.7.0",
|
||||||
"raw-loader": "^4.0.0",
|
"raw-loader": "^4.0.0",
|
||||||
|
@ -118,11 +116,12 @@
|
||||||
"stream-browserify": "^3.0.0",
|
"stream-browserify": "^3.0.0",
|
||||||
"stream-http": "^3.0.0",
|
"stream-http": "^3.0.0",
|
||||||
"terser-webpack-plugin": "^3.0.0",
|
"terser-webpack-plugin": "^3.0.0",
|
||||||
|
"ts-loader": "^8.0.2",
|
||||||
"tslib": "^2.0.0",
|
"tslib": "^2.0.0",
|
||||||
"tslint": "^6.1.0",
|
"tslint": "~6.1.0",
|
||||||
"tslint-angular": "^3.0.2",
|
"tslint-angular": "^3.0.2",
|
||||||
"tslint-config-standard": "^9.0.0",
|
"tslint-config-standard": "^9.0.0",
|
||||||
"typescript": "~3.8.3",
|
"typescript": "~3.9.5",
|
||||||
"video.js": "^7",
|
"video.js": "^7",
|
||||||
"videojs-contextmenu-ui": "^5.0.0",
|
"videojs-contextmenu-ui": "^5.0.0",
|
||||||
"videojs-contrib-quality-levels": "^2.0.9",
|
"videojs-contrib-quality-levels": "^2.0.9",
|
||||||
|
|
|
@ -1,11 +1,10 @@
|
||||||
import { Routes } from '@angular/router'
|
import { Routes } from '@angular/router'
|
||||||
|
|
||||||
import { UserRightGuard } from '../../core'
|
|
||||||
import { UserRight } from '../../../../../shared'
|
|
||||||
import { PluginListInstalledComponent } from '@app/+admin/plugins/plugin-list-installed/plugin-list-installed.component'
|
import { PluginListInstalledComponent } from '@app/+admin/plugins/plugin-list-installed/plugin-list-installed.component'
|
||||||
import { PluginSearchComponent } from '@app/+admin/plugins/plugin-search/plugin-search.component'
|
import { PluginSearchComponent } from '@app/+admin/plugins/plugin-search/plugin-search.component'
|
||||||
import { PluginShowInstalledComponent } from '@app/+admin/plugins/plugin-show-installed/plugin-show-installed.component'
|
import { PluginShowInstalledComponent } from '@app/+admin/plugins/plugin-show-installed/plugin-show-installed.component'
|
||||||
import { PluginsComponent } from '@app/+admin/plugins/plugins.component'
|
import { PluginsComponent } from '@app/+admin/plugins/plugins.component'
|
||||||
|
import { UserRightGuard } from '@app/core'
|
||||||
|
import { UserRight } from '@shared/models'
|
||||||
|
|
||||||
export const PluginsRoutes: Routes = [
|
export const PluginsRoutes: Routes = [
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,9 +1,10 @@
|
||||||
import { OnInit } from '@angular/core'
|
import { OnInit, Directive } from '@angular/core'
|
||||||
import { ConfigService } from '@app/+admin/config/shared/config.service'
|
import { ConfigService } from '@app/+admin/config/shared/config.service'
|
||||||
import { AuthService, ScreenService, ServerService, User } from '@app/core'
|
import { AuthService, ScreenService, ServerService, User } from '@app/core'
|
||||||
import { FormReactive } from '@app/shared/shared-forms'
|
import { FormReactive } from '@app/shared/shared-forms'
|
||||||
import { ServerConfig, USER_ROLE_LABELS, UserAdminFlag, UserRole, VideoResolution } from '@shared/models'
|
import { ServerConfig, USER_ROLE_LABELS, UserAdminFlag, UserRole, VideoResolution } from '@shared/models'
|
||||||
|
|
||||||
|
@Directive()
|
||||||
export abstract class UserEdit extends FormReactive implements OnInit {
|
export abstract class UserEdit extends FormReactive implements OnInit {
|
||||||
videoQuotaOptions: { value: string, label: string, disabled?: boolean }[] = []
|
videoQuotaOptions: { value: string, label: string, disabled?: boolean }[] = []
|
||||||
videoQuotaDailyOptions: { value: string, label: string, disabled?: boolean }[] = []
|
videoQuotaDailyOptions: { value: string, label: string, disabled?: boolean }[] = []
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import { catchError, switchMap, tap } from 'rxjs/operators'
|
import { catchError, switchMap, tap } from 'rxjs/operators'
|
||||||
import { EventEmitter, OnInit } from '@angular/core'
|
import { EventEmitter, OnInit, Directive } from '@angular/core'
|
||||||
import { AuthService, CanComponentDeactivateResult, Notifier, ServerService } from '@app/core'
|
import { AuthService, CanComponentDeactivateResult, Notifier, ServerService } from '@app/core'
|
||||||
import { populateAsyncUserVideoChannels } from '@app/helpers'
|
import { populateAsyncUserVideoChannels } from '@app/helpers'
|
||||||
import { FormReactive } from '@app/shared/shared-forms'
|
import { FormReactive } from '@app/shared/shared-forms'
|
||||||
|
@ -7,6 +7,7 @@ import { VideoCaptionEdit, VideoCaptionService, VideoEdit, VideoService } from '
|
||||||
import { LoadingBarService } from '@ngx-loading-bar/core'
|
import { LoadingBarService } from '@ngx-loading-bar/core'
|
||||||
import { ServerConfig, VideoConstant, VideoPrivacy } from '@shared/models'
|
import { ServerConfig, VideoConstant, VideoPrivacy } from '@shared/models'
|
||||||
|
|
||||||
|
@Directive()
|
||||||
export abstract class VideoSend extends FormReactive implements OnInit {
|
export abstract class VideoSend extends FormReactive implements OnInit {
|
||||||
userVideoChannels: { id: number, label: string, support: string }[] = []
|
userVideoChannels: { id: number, label: string, support: string }[] = []
|
||||||
videoPrivacies: VideoConstant<VideoPrivacy>[] = []
|
videoPrivacies: VideoConstant<VideoPrivacy>[] = []
|
||||||
|
|
|
@ -3,6 +3,8 @@
|
||||||
@import '~bootstrap/scss/functions';
|
@import '~bootstrap/scss/functions';
|
||||||
@import '~bootstrap/scss/variables';
|
@import '~bootstrap/scss/variables';
|
||||||
|
|
||||||
|
$assets-path: '../assets';
|
||||||
|
|
||||||
.peertube-container {
|
.peertube-container {
|
||||||
padding-bottom: 20px;
|
padding-bottom: 20px;
|
||||||
}
|
}
|
||||||
|
@ -39,7 +41,7 @@
|
||||||
|
|
||||||
&.icon-menu {
|
&.icon-menu {
|
||||||
background-color: pvar(--mainForegroundColor);
|
background-color: pvar(--mainForegroundColor);
|
||||||
mask-image: url('../assets/images/misc/menu.svg');
|
mask-image: url('#{$assets-path}/images/misc/menu.svg');
|
||||||
margin: 0 18px 0 20px;
|
margin: 0 18px 0 20px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -62,7 +64,6 @@
|
||||||
|
|
||||||
.icon.icon-logo {
|
.icon.icon-logo {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
background-repeat: no-repeat;
|
|
||||||
width: 23px;
|
width: 23px;
|
||||||
height: 24px;
|
height: 24px;
|
||||||
margin-right: .5rem;
|
margin-right: .5rem;
|
||||||
|
|
|
@ -4,7 +4,7 @@ import { catchError, map } from 'rxjs/operators'
|
||||||
import { HttpClient, HttpParams } from '@angular/common/http'
|
import { HttpClient, HttpParams } from '@angular/common/http'
|
||||||
import { Injectable } from '@angular/core'
|
import { Injectable } from '@angular/core'
|
||||||
import { RestExtractor, RestPagination, RestService } from '@app/core'
|
import { RestExtractor, RestPagination, RestService } from '@app/core'
|
||||||
import { ActivityPubActorType, ActorFollow, FollowState, ResultList } from '@shared/index'
|
import { ActivityPubActorType, ActorFollow, FollowState, ResultList } from '@shared/models'
|
||||||
import { environment } from '../../../environments/environment'
|
import { environment } from '../../../environments/environment'
|
||||||
|
|
||||||
@Injectable()
|
@Injectable()
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
import { FfprobeData } from 'fluent-ffmpeg'
|
|
||||||
import { Observable } from 'rxjs'
|
import { Observable } from 'rxjs'
|
||||||
import { catchError, map, switchMap } from 'rxjs/operators'
|
import { catchError, map, switchMap } from 'rxjs/operators'
|
||||||
import { HttpClient, HttpParams, HttpRequest } from '@angular/common/http'
|
import { HttpClient, HttpParams, HttpRequest } from '@angular/common/http'
|
||||||
|
@ -19,7 +18,8 @@ import {
|
||||||
VideoFilter,
|
VideoFilter,
|
||||||
VideoPrivacy,
|
VideoPrivacy,
|
||||||
VideoSortField,
|
VideoSortField,
|
||||||
VideoUpdate
|
VideoUpdate,
|
||||||
|
VideoFileMetadata
|
||||||
} from '@shared/models'
|
} from '@shared/models'
|
||||||
import { environment } from '../../../../environments/environment'
|
import { environment } from '../../../../environments/environment'
|
||||||
import { Account, AccountService } from '../account'
|
import { Account, AccountService } from '../account'
|
||||||
|
@ -275,7 +275,7 @@ export class VideoService implements VideosProvider {
|
||||||
|
|
||||||
getVideoFileMetadata (metadataUrl: string) {
|
getVideoFileMetadata (metadataUrl: string) {
|
||||||
return this.authHttp
|
return this.authHttp
|
||||||
.get<FfprobeData>(metadataUrl)
|
.get<VideoFileMetadata>(metadataUrl)
|
||||||
.pipe(
|
.pipe(
|
||||||
catchError(err => this.restExtractor.handleError(err))
|
catchError(err => this.restExtractor.handleError(err))
|
||||||
)
|
)
|
||||||
|
|
|
@ -1,11 +1,12 @@
|
||||||
import { SortMeta } from 'primeng/api'
|
import { SortMeta } from 'primeng/api'
|
||||||
import { OnInit } from '@angular/core'
|
import { OnInit, Directive } from '@angular/core'
|
||||||
import { Notifier, RestPagination, RestTable } from '@app/core'
|
import { Notifier, RestPagination, RestTable } from '@app/core'
|
||||||
import { Actor } from '@app/shared/shared-main'
|
import { Actor } from '@app/shared/shared-main'
|
||||||
import { I18n } from '@ngx-translate/i18n-polyfill'
|
import { I18n } from '@ngx-translate/i18n-polyfill'
|
||||||
import { AccountBlock } from './account-block.model'
|
import { AccountBlock } from './account-block.model'
|
||||||
import { BlocklistComponentType, BlocklistService } from './blocklist.service'
|
import { BlocklistComponentType, BlocklistService } from './blocklist.service'
|
||||||
|
|
||||||
|
@Directive()
|
||||||
export class GenericAccountBlocklistComponent extends RestTable implements OnInit {
|
export class GenericAccountBlocklistComponent extends RestTable implements OnInit {
|
||||||
// @ts-ignore: "Abstract methods can only appear within an abstract class"
|
// @ts-ignore: "Abstract methods can only appear within an abstract class"
|
||||||
abstract mode: BlocklistComponentType
|
abstract mode: BlocklistComponentType
|
||||||
|
|
|
@ -1,11 +1,12 @@
|
||||||
import { SortMeta } from 'primeng/api'
|
import { SortMeta } from 'primeng/api'
|
||||||
import { OnInit, ViewChild } from '@angular/core'
|
import { OnInit, ViewChild, Directive } from '@angular/core'
|
||||||
import { BatchDomainsModalComponent } from '@app/shared/shared-moderation/batch-domains-modal.component'
|
import { BatchDomainsModalComponent } from '@app/shared/shared-moderation/batch-domains-modal.component'
|
||||||
import { Notifier, RestPagination, RestTable } from '@app/core'
|
import { Notifier, RestPagination, RestTable } from '@app/core'
|
||||||
import { I18n } from '@ngx-translate/i18n-polyfill'
|
import { I18n } from '@ngx-translate/i18n-polyfill'
|
||||||
import { ServerBlock } from '@shared/models'
|
import { ServerBlock } from '@shared/models'
|
||||||
import { BlocklistComponentType, BlocklistService } from './blocklist.service'
|
import { BlocklistComponentType, BlocklistService } from './blocklist.service'
|
||||||
|
|
||||||
|
@Directive()
|
||||||
export class GenericServerBlocklistComponent extends RestTable implements OnInit {
|
export class GenericServerBlocklistComponent extends RestTable implements OnInit {
|
||||||
@ViewChild('batchDomainsModal') batchDomainsModal: BatchDomainsModalComponent
|
@ViewChild('batchDomainsModal') batchDomainsModal: BatchDomainsModalComponent
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
import { fromEvent, Observable, Subject, Subscription } from 'rxjs'
|
import { fromEvent, Observable, Subject, Subscription } from 'rxjs'
|
||||||
import { debounceTime, switchMap, tap } from 'rxjs/operators'
|
import { debounceTime, switchMap, tap } from 'rxjs/operators'
|
||||||
import { OnDestroy, OnInit } from '@angular/core'
|
import { OnDestroy, OnInit, Directive } from '@angular/core'
|
||||||
import { ActivatedRoute, Router } from '@angular/router'
|
import { ActivatedRoute, Router } from '@angular/router'
|
||||||
import {
|
import {
|
||||||
AuthService,
|
AuthService,
|
||||||
|
@ -30,6 +30,7 @@ enum GroupDate {
|
||||||
OLDER = 5
|
OLDER = 5
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Directive()
|
||||||
export abstract class AbstractVideoList implements OnInit, OnDestroy, DisableForReuseHook {
|
export abstract class AbstractVideoList implements OnInit, OnDestroy, DisableForReuseHook {
|
||||||
pagination: ComponentPaginationLight = {
|
pagination: ComponentPaginationLight = {
|
||||||
currentPage: 1,
|
currentPage: 1,
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
import { FfprobeFormat, FfprobeStream } from 'fluent-ffmpeg'
|
|
||||||
import { mapValues, pick } from 'lodash-es'
|
import { mapValues, pick } from 'lodash-es'
|
||||||
import { BytesPipe } from 'ngx-pipes'
|
import { BytesPipe } from 'ngx-pipes'
|
||||||
import { Component, ElementRef, ViewChild } from '@angular/core'
|
import { Component, ElementRef, ViewChild } from '@angular/core'
|
||||||
|
@ -144,7 +143,7 @@ export class VideoDownloadComponent {
|
||||||
this.type = type
|
this.type = type
|
||||||
}
|
}
|
||||||
|
|
||||||
getMetadataFormat (format: FfprobeFormat) {
|
getMetadataFormat (format: any) {
|
||||||
const keyToTranslateFunction = {
|
const keyToTranslateFunction = {
|
||||||
'encoder': (value: string) => ({ label: this.i18n('Encoder'), value }),
|
'encoder': (value: string) => ({ label: this.i18n('Encoder'), value }),
|
||||||
'format_long_name': (value: string) => ({ label: this.i18n('Format name'), value }),
|
'format_long_name': (value: string) => ({ label: this.i18n('Format name'), value }),
|
||||||
|
@ -165,7 +164,7 @@ export class VideoDownloadComponent {
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
getMetadataStream (streams: FfprobeStream[], type: 'video' | 'audio') {
|
getMetadataStream (streams: any[], type: 'video' | 'audio') {
|
||||||
const stream = streams.find(s => s.codec_type === type)
|
const stream = streams.find(s => s.codec_type === type)
|
||||||
if (!stream) return undefined
|
if (!stream) return undefined
|
||||||
|
|
||||||
|
@ -201,6 +200,7 @@ export class VideoDownloadComponent {
|
||||||
private hydrateMetadataFromMetadataUrl (file: VideoFile) {
|
private hydrateMetadataFromMetadataUrl (file: VideoFile) {
|
||||||
const observable = this.videoService.getVideoFileMetadata(file.metadataUrl)
|
const observable = this.videoService.getVideoFileMetadata(file.metadataUrl)
|
||||||
observable.subscribe(res => file.metadata = res)
|
observable.subscribe(res => file.metadata = res)
|
||||||
|
|
||||||
return observable.toPromise()
|
return observable.toPromise()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -12,7 +12,7 @@ import {
|
||||||
} from '@angular/core'
|
} from '@angular/core'
|
||||||
import { AuthService, ScreenService, ServerService, User } from '@app/core'
|
import { AuthService, ScreenService, ServerService, User } from '@app/core'
|
||||||
import { I18n } from '@ngx-translate/i18n-polyfill'
|
import { I18n } from '@ngx-translate/i18n-polyfill'
|
||||||
import { ServerConfig, VideoPlaylistType, VideoPrivacy, VideoState } from '../../../../../shared'
|
import { ServerConfig, VideoPlaylistType, VideoPrivacy, VideoState } from '@shared/models'
|
||||||
import { Video } from '../shared-main'
|
import { Video } from '../shared-main'
|
||||||
import { VideoPlaylistService } from '../shared-video-playlist'
|
import { VideoPlaylistService } from '../shared-video-playlist'
|
||||||
import { VideoActionsDisplayType } from './video-actions-dropdown.component'
|
import { VideoActionsDisplayType } from './video-actions-dropdown.component'
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import { VideoPlaylistElement as ServerVideoPlaylistElement, VideoPlaylistElementType } from '../../../../../shared/models/videos'
|
|
||||||
import { Video } from '@app/shared/shared-main'
|
import { Video } from '@app/shared/shared-main'
|
||||||
|
import { VideoPlaylistElement as ServerVideoPlaylistElement, VideoPlaylistElementType } from '@shared/models'
|
||||||
|
|
||||||
export class VideoPlaylistElement implements ServerVideoPlaylistElement {
|
export class VideoPlaylistElement implements ServerVideoPlaylistElement {
|
||||||
id: number
|
id: number
|
||||||
|
|
|
@ -13,7 +13,7 @@ type Metadata = {
|
||||||
levels: Hlsjs.Level[]
|
levels: Hlsjs.Level[]
|
||||||
}
|
}
|
||||||
|
|
||||||
type CustomAudioTrack = AudioTrack & { name?: string, lang?: string }
|
type CustomAudioTrack = Hlsjs.AudioTrack & { name?: string, lang?: string }
|
||||||
|
|
||||||
const registerSourceHandler = function (vjs: typeof videojs) {
|
const registerSourceHandler = function (vjs: typeof videojs) {
|
||||||
if (!Hlsjs.isSupported()) {
|
if (!Hlsjs.isSupported()) {
|
||||||
|
@ -180,8 +180,6 @@ class Html5Hlsjs {
|
||||||
this.player.textTracks().removeEventListener('change', this.handlers.textTracksChange)
|
this.player.textTracks().removeEventListener('change', this.handlers.textTracksChange)
|
||||||
this.uiTextTrackHandled = false
|
this.uiTextTrackHandled = false
|
||||||
|
|
||||||
this.player.audioTracks().removeEventListener('change', this.handlers.audioTracksChange)
|
|
||||||
|
|
||||||
this.hls.destroy()
|
this.hls.destroy()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -19,9 +19,7 @@ import './videojs-components/settings-panel'
|
||||||
import './videojs-components/settings-panel-child'
|
import './videojs-components/settings-panel-child'
|
||||||
import './videojs-components/theater-button'
|
import './videojs-components/theater-button'
|
||||||
import videojs from 'video.js'
|
import videojs from 'video.js'
|
||||||
|
import { isDefaultLocale, VideoFile } from '@shared/models'
|
||||||
import { isDefaultLocale } from '../../../../shared/models/i18n/i18n'
|
|
||||||
import { VideoFile } from '../../../../shared/models/videos'
|
|
||||||
import { RedundancyUrlManager } from './p2p-media-loader/redundancy-url-manager'
|
import { RedundancyUrlManager } from './p2p-media-loader/redundancy-url-manager'
|
||||||
import { segmentUrlBuilderFactory } from './p2p-media-loader/segment-url-builder'
|
import { segmentUrlBuilderFactory } from './p2p-media-loader/segment-url-builder'
|
||||||
import { segmentValidatorFactory } from './p2p-media-loader/segment-validator'
|
import { segmentValidatorFactory } from './p2p-media-loader/segment-validator'
|
||||||
|
|
|
@ -41,8 +41,6 @@ declare module 'video.js' {
|
||||||
tracks_: (TextTrack & { id: string, label: string, src: string })[]
|
tracks_: (TextTrack & { id: string, label: string, src: string })[]
|
||||||
}
|
}
|
||||||
|
|
||||||
audioTracks (): AudioTrackList
|
|
||||||
|
|
||||||
dock (options: { title: string, description: string }): void
|
dock (options: { title: string, description: string }): void
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
import { getCompleteLocale, getShortLocale, is18nLocale, isDefaultLocale } from '../../../../shared/models'
|
import { getCompleteLocale, getShortLocale, is18nLocale, isDefaultLocale } from '@shared/models'
|
||||||
|
|
||||||
export class TranslationsManager {
|
export class TranslationsManager {
|
||||||
private static videojsLocaleCache: { [ path: string ]: any } = {}
|
private static videojsLocaleCache: { [ path: string ]: any } = {}
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
import { VideoFile } from '../../../../shared/models/videos'
|
import { VideoFile } from '@shared/models'
|
||||||
|
|
||||||
function toTitleCase (str: string) {
|
function toTitleCase (str: string) {
|
||||||
return str.charAt(0).toUpperCase() + str.slice(1)
|
return str.charAt(0).toUpperCase() + str.slice(1)
|
||||||
|
|
|
@ -8,7 +8,7 @@ $icon-font-path: '~@neos21/bootstrap3-glyphicons/assets/fonts/';
|
||||||
|
|
||||||
@import '~video.js/dist/video-js.css';
|
@import '~video.js/dist/video-js.css';
|
||||||
|
|
||||||
$assets-path: '../assets/';
|
$assets-path: '../../assets/';
|
||||||
@import './player/index';
|
@import './player/index';
|
||||||
@import './loading-bar';
|
@import './loading-bar';
|
||||||
|
|
||||||
|
|
|
@ -1,24 +1,19 @@
|
||||||
import './embed.scss'
|
import './embed.scss'
|
||||||
|
import videojs from 'video.js'
|
||||||
|
import { objectToUrlEncoded, peertubeLocalStorage, PureAuthUser } from '@root-helpers/index'
|
||||||
import {
|
import {
|
||||||
peertubeTranslate,
|
peertubeTranslate,
|
||||||
ResultList,
|
ResultList,
|
||||||
ServerConfig,
|
ServerConfig,
|
||||||
|
UserRefreshToken,
|
||||||
|
VideoCaption,
|
||||||
VideoDetails,
|
VideoDetails,
|
||||||
UserRefreshToken
|
VideoStreamingPlaylistType
|
||||||
} from '../../../../shared'
|
} from '../../../../shared/models'
|
||||||
import { VideoCaption } from '../../../../shared/models/videos/caption/video-caption.model'
|
import { P2PMediaLoaderOptions, PeertubePlayerManagerOptions, PlayerMode } from '../../assets/player/peertube-player-manager'
|
||||||
import {
|
|
||||||
P2PMediaLoaderOptions,
|
|
||||||
PeertubePlayerManagerOptions,
|
|
||||||
PlayerMode
|
|
||||||
} from '../../assets/player/peertube-player-manager'
|
|
||||||
import { VideoStreamingPlaylistType } from '../../../../shared/models/videos/video-streaming-playlist.type'
|
|
||||||
import { PeerTubeEmbedApi } from './embed-api'
|
|
||||||
import { TranslationsManager } from '../../assets/player/translations-manager'
|
|
||||||
import videojs from 'video.js'
|
|
||||||
import { VideoJSCaption } from '../../assets/player/peertube-videojs-typings'
|
import { VideoJSCaption } from '../../assets/player/peertube-videojs-typings'
|
||||||
import { PureAuthUser, objectToUrlEncoded, peertubeLocalStorage } from '@root-helpers/index'
|
import { TranslationsManager } from '../../assets/player/translations-manager'
|
||||||
|
import { PeerTubeEmbedApi } from './embed-api'
|
||||||
|
|
||||||
type Translations = { [ id: string ]: string }
|
type Translations = { [ id: string ]: string }
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
{
|
{
|
||||||
"extends": "./tsconfig.json",
|
"extends": "./tsconfig.base.json",
|
||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
"outDir": "./out-tsc/app",
|
"outDir": "./out-tsc/app",
|
||||||
"baseUrl": "./",
|
"baseUrl": "./",
|
||||||
|
@ -18,5 +18,9 @@
|
||||||
"src/main*.ts",
|
"src/main*.ts",
|
||||||
"src/**/*.d.ts",
|
"src/**/*.d.ts",
|
||||||
"src/shims/*.ts"
|
"src/shims/*.ts"
|
||||||
|
],
|
||||||
|
"exclude": [
|
||||||
|
"../node_modules",
|
||||||
|
"../server"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
48
client/tsconfig.base.json
Normal file
48
client/tsconfig.base.json
Normal file
|
@ -0,0 +1,48 @@
|
||||||
|
{
|
||||||
|
"compileOnSave": false,
|
||||||
|
"compilerOptions": {
|
||||||
|
"downlevelIteration": true,
|
||||||
|
"outDir": "./dist/out-tsc",
|
||||||
|
"sourceMap": true,
|
||||||
|
"declaration": false,
|
||||||
|
"moduleResolution": "node",
|
||||||
|
"module": "esnext",
|
||||||
|
"emitDecoratorMetadata": true,
|
||||||
|
"experimentalDecorators": true,
|
||||||
|
"noImplicitAny": true,
|
||||||
|
"noImplicitThis": true,
|
||||||
|
"suppressImplicitAnyIndexErrors":true,
|
||||||
|
"alwaysStrict": true,
|
||||||
|
"importHelpers": true,
|
||||||
|
"strictBindCallApply": true,
|
||||||
|
"target": "es2015",
|
||||||
|
"typeRoots": [
|
||||||
|
"node_modules/@types"
|
||||||
|
],
|
||||||
|
"lib": [
|
||||||
|
"es2018",
|
||||||
|
"dom"
|
||||||
|
],
|
||||||
|
"baseUrl": "./",
|
||||||
|
"paths": {
|
||||||
|
"video.js": [ "node_modules/video.js/core" ],
|
||||||
|
"@app/*": [ "src/app/*" ],
|
||||||
|
"@shared/models/*": [ "../shared/models/*" ],
|
||||||
|
"@shared/models": [ "../shared/models" ],
|
||||||
|
"@shared/core-utils": [ "../shared/core-utils" ],
|
||||||
|
"@shared/core-utils/*": [ "../shared/core-utils/*" ],
|
||||||
|
"@root-helpers/*": [ "src/root-helpers/*" ],
|
||||||
|
"fs": [ "src/shims/noop.ts" ],
|
||||||
|
"http": [ "src/shims/http.ts" ],
|
||||||
|
"https": [ "src/shims/https.ts" ],
|
||||||
|
"path": [ "src/shims/path.ts" ],
|
||||||
|
"stream": [ "src/shims/noop.ts" ],
|
||||||
|
"crypto": [ "src/shims/noop.ts" ]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"angularCompilerOptions": {
|
||||||
|
"strictInjectionParameters": true,
|
||||||
|
"fullTemplateTypeCheck": true,
|
||||||
|
"strictTemplates": true
|
||||||
|
}
|
||||||
|
}
|
|
@ -1,45 +1,14 @@
|
||||||
|
/*
|
||||||
|
This is a "Solution Style" tsconfig.json file, and is used by editors and TypeScript’s language server to improve development experience.
|
||||||
|
It is not intended to be used to perform a compilation.
|
||||||
|
|
||||||
|
To learn more about this file see: https://angular.io/config/solution-tsconfig.
|
||||||
|
*/
|
||||||
{
|
{
|
||||||
"compileOnSave": false,
|
"files": [],
|
||||||
"compilerOptions": {
|
"references": [
|
||||||
"downlevelIteration": true,
|
{
|
||||||
"outDir": "./dist/out-tsc",
|
"path": "./tsconfig.app.json"
|
||||||
"sourceMap": true,
|
|
||||||
"declaration": false,
|
|
||||||
"moduleResolution": "node",
|
|
||||||
"module": "esnext",
|
|
||||||
"emitDecoratorMetadata": true,
|
|
||||||
"experimentalDecorators": true,
|
|
||||||
"noImplicitAny": true,
|
|
||||||
"noImplicitThis": true,
|
|
||||||
"suppressImplicitAnyIndexErrors":true,
|
|
||||||
"alwaysStrict": true,
|
|
||||||
"importHelpers": true,
|
|
||||||
"strictBindCallApply": true,
|
|
||||||
"target": "es2015",
|
|
||||||
"typeRoots": [
|
|
||||||
"node_modules/@types"
|
|
||||||
],
|
|
||||||
"lib": [
|
|
||||||
"es2018",
|
|
||||||
"dom"
|
|
||||||
],
|
|
||||||
"baseUrl": "./",
|
|
||||||
"paths": {
|
|
||||||
"video.js": [ "node_modules/video.js/core" ],
|
|
||||||
"@app/*": [ "src/app/*" ],
|
|
||||||
"@shared/*": [ "../shared/*" ],
|
|
||||||
"@root-helpers/*": [ "src/root-helpers/*" ],
|
|
||||||
"fs": [ "src/shims/noop.ts" ],
|
|
||||||
"http": [ "src/shims/http.ts" ],
|
|
||||||
"https": [ "src/shims/https.ts" ],
|
|
||||||
"path": [ "src/shims/path.ts" ],
|
|
||||||
"stream": [ "src/shims/noop.ts" ],
|
|
||||||
"crypto": [ "src/shims/noop.ts" ]
|
|
||||||
}
|
}
|
||||||
},
|
]
|
||||||
"angularCompilerOptions": {
|
|
||||||
"strictInjectionParameters": true,
|
|
||||||
"fullTemplateTypeCheck": true,
|
|
||||||
"strictTemplates": true
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,11 +1,13 @@
|
||||||
{
|
{
|
||||||
"extends": [ "tslint-angular", "tslint-config-standard" ],
|
"extends": [ "tslint-angular", "tslint-config-standard" ],
|
||||||
"rules": {
|
"rules": {
|
||||||
|
"deprecation": {
|
||||||
|
"severity": "warning"
|
||||||
|
},
|
||||||
"no-inferrable-types": true,
|
"no-inferrable-types": true,
|
||||||
"eofline": true,
|
"eofline": true,
|
||||||
"max-line-length": [true, 140],
|
"max-line-length": [true, 140],
|
||||||
"no-floating-promises": false,
|
"no-floating-promises": false, // Memory issues
|
||||||
"no-unused-variable": false, // Memory issues
|
|
||||||
"await-promise": [true, "PromiseLike"],
|
"await-promise": [true, "PromiseLike"],
|
||||||
"member-ordering": [true, {
|
"member-ordering": [true, {
|
||||||
"order": [
|
"order": [
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
const helpers = require('./helpers')
|
const helpers = require('./helpers')
|
||||||
const path = require('path')
|
const path = require('path')
|
||||||
|
|
||||||
const CheckerPlugin = require('awesome-typescript-loader').CheckerPlugin
|
|
||||||
const HtmlWebpackPlugin = require('html-webpack-plugin')
|
const HtmlWebpackPlugin = require('html-webpack-plugin')
|
||||||
const TerserPlugin = require('terser-webpack-plugin')
|
const TerserPlugin = require('terser-webpack-plugin')
|
||||||
const LoaderOptionsPlugin = require('webpack/lib/LoaderOptionsPlugin')
|
const LoaderOptionsPlugin = require('webpack/lib/LoaderOptionsPlugin')
|
||||||
|
@ -29,7 +28,7 @@ module.exports = function () {
|
||||||
alias: {
|
alias: {
|
||||||
'video.js$': path.resolve('node_modules/video.js/core.js'),
|
'video.js$': path.resolve('node_modules/video.js/core.js'),
|
||||||
'@root-helpers': path.resolve('src/root-helpers'),
|
'@root-helpers': path.resolve('src/root-helpers'),
|
||||||
'@shared': path.resolve('../shared')
|
'@shared/models': path.resolve('../shared/models'),
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -54,13 +53,12 @@ module.exports = function () {
|
||||||
test: /\.ts$/,
|
test: /\.ts$/,
|
||||||
use: [
|
use: [
|
||||||
{
|
{
|
||||||
loader: 'awesome-typescript-loader',
|
loader: 'ts-loader',
|
||||||
options: {
|
options: {
|
||||||
configFileName: 'tsconfig.json'
|
configFile: 'tsconfig.base.json'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
],
|
]
|
||||||
exclude: [/\.(spec|e2e)\.ts$/]
|
|
||||||
},
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
|
@ -75,12 +73,6 @@ module.exports = function () {
|
||||||
importLoaders: 1
|
importLoaders: 1
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
// {
|
|
||||||
// loader: 'resolve-url-loader',
|
|
||||||
// options: {
|
|
||||||
// debug: true
|
|
||||||
// }
|
|
||||||
// },
|
|
||||||
{
|
{
|
||||||
loader: 'sass-loader',
|
loader: 'sass-loader',
|
||||||
options: {
|
options: {
|
||||||
|
@ -135,8 +127,6 @@ module.exports = function () {
|
||||||
}
|
}
|
||||||
}),
|
}),
|
||||||
|
|
||||||
new CheckerPlugin(),
|
|
||||||
|
|
||||||
new HtmlWebpackPlugin({
|
new HtmlWebpackPlugin({
|
||||||
template: 'src/standalone/videos/embed.html',
|
template: 'src/standalone/videos/embed.html',
|
||||||
filename: 'embed.html',
|
filename: 'embed.html',
|
||||||
|
|
3572
client/yarn.lock
3572
client/yarn.lock
File diff suppressed because it is too large
Load diff
|
@ -5,4 +5,5 @@ set -eu
|
||||||
cd client
|
cd client
|
||||||
|
|
||||||
mkdir -p ./dist/standalone/videos/
|
mkdir -p ./dist/standalone/videos/
|
||||||
|
|
||||||
NODE_ENV=production npm run webpack -- --config webpack/webpack.video-embed.js --mode production --json > "./dist/standalone/videos/embed-stats.json"
|
NODE_ENV=production npm run webpack -- --config webpack/webpack.video-embed.js --mode production --json > "./dist/standalone/videos/embed-stats.json"
|
||||||
|
|
|
@ -5,5 +5,5 @@ set -eu
|
||||||
gawk -i inplace 'BEGIN { found=0 } { if (found || $0 ~ /^{/) { found=1; print }}' ./client/dist/standalone/videos/embed-stats.json
|
gawk -i inplace 'BEGIN { found=0 } { if (found || $0 ~ /^{/) { found=1; print }}' ./client/dist/standalone/videos/embed-stats.json
|
||||||
|
|
||||||
npm run concurrently -- -k \
|
npm run concurrently -- -k \
|
||||||
"cd client && npm run webpack-bundle-analyzer -- -p 8888 ./dist/en-US/stats-es2015.json" \
|
"cd client && npm run webpack-bundle-analyzer -- -p 8888 ./dist/en-US/stats.json" \
|
||||||
"cd client && npm run webpack-bundle-analyzer -- -p 8889 ./dist/standalone/videos/embed-stats.json"
|
"cd client && npm run webpack-bundle-analyzer -- -p 8889 ./dist/standalone/videos/embed-stats.json"
|
||||||
|
|
|
@ -482,6 +482,7 @@ async function getVideoDescription (req: express.Request, res: express.Response)
|
||||||
|
|
||||||
async function getVideoFileMetadata (req: express.Request, res: express.Response) {
|
async function getVideoFileMetadata (req: express.Request, res: express.Response) {
|
||||||
const videoFile = await VideoFileModel.loadWithMetadata(toInt(req.params.videoFileId))
|
const videoFile = await VideoFileModel.loadWithMetadata(toInt(req.params.videoFileId))
|
||||||
|
|
||||||
return res.json(videoFile.metadata)
|
return res.json(videoFile.metadata)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,11 +1,9 @@
|
||||||
import * as Bluebird from 'bluebird'
|
|
||||||
|
|
||||||
export interface PluginSettingsManager {
|
export interface PluginSettingsManager {
|
||||||
getSetting: (name: string) => Bluebird<string | boolean>
|
getSetting: (name: string) => Promise<string | boolean>
|
||||||
|
|
||||||
getSettings: (names: string[]) => Bluebird<{ [settingName: string]: string | boolean }>
|
getSettings: (names: string[]) => Promise<{ [settingName: string]: string | boolean }>
|
||||||
|
|
||||||
setSetting: (name: string, value: string) => Bluebird<any>
|
setSetting: (name: string, value: string) => Promise<any>
|
||||||
|
|
||||||
onSettingsChange: (cb: (names: string[]) => void) => void
|
onSettingsChange: (cb: (names: string[]) => void) => void
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
import * as Bluebird from 'bluebird'
|
|
||||||
|
|
||||||
export interface PluginStorageManager {
|
export interface PluginStorageManager {
|
||||||
getData: (key: string) => Bluebird<string>
|
getData: (key: string) => Promise<string>
|
||||||
|
|
||||||
storeData: (key: string, data: any) => Bluebird<any>
|
storeData: (key: string, data: any) => Promise<any>
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,14 +1,9 @@
|
||||||
import { FfprobeData } from 'fluent-ffmpeg'
|
export class VideoFileMetadata {
|
||||||
import { DeepOmit } from '../../core-utils'
|
|
||||||
|
|
||||||
export type VideoFileMetadataModel = DeepOmit<FfprobeData, 'filename'>
|
|
||||||
|
|
||||||
export class VideoFileMetadata implements VideoFileMetadataModel {
|
|
||||||
streams: { [x: string]: any, [x: number]: any }[]
|
streams: { [x: string]: any, [x: number]: any }[]
|
||||||
format: { [x: string]: any, [x: number]: any }
|
format: { [x: string]: any, [x: number]: any }
|
||||||
chapters: any[]
|
chapters: any[]
|
||||||
|
|
||||||
constructor (hash: Partial<VideoFileMetadataModel>) {
|
constructor (hash: { chapters: any[], format: any, streams: any[] }) {
|
||||||
this.chapters = hash.chapters
|
this.chapters = hash.chapters
|
||||||
this.format = hash.format
|
this.format = hash.format
|
||||||
this.streams = hash.streams
|
this.streams = hash.streams
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import { VideoConstant, VideoResolution } from '@shared/models'
|
|
||||||
import { FfprobeData } from 'fluent-ffmpeg'
|
import { VideoConstant, VideoFileMetadata, VideoResolution } from '@shared/models'
|
||||||
|
|
||||||
export interface VideoFile {
|
export interface VideoFile {
|
||||||
magnetUri: string
|
magnetUri: string
|
||||||
|
@ -10,6 +10,6 @@ export interface VideoFile {
|
||||||
fileUrl: string
|
fileUrl: string
|
||||||
fileDownloadUrl: string
|
fileDownloadUrl: string
|
||||||
fps: number
|
fps: number
|
||||||
metadata?: FfprobeData
|
metadata?: VideoFileMetadata
|
||||||
metadataUrl?: string
|
metadataUrl?: string
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,11 +1,11 @@
|
||||||
import { AccountSummary, VideoChannelSummary, VideoState } from '../../index'
|
import { Account, AccountSummary } from '../actors'
|
||||||
import { Account } from '../actors'
|
import { VideoChannel, VideoChannelSummary } from './channel/video-channel.model'
|
||||||
import { VideoChannel } from './channel/video-channel.model'
|
import { VideoConstant } from './video-constant.model'
|
||||||
|
import { VideoFile } from './video-file.model'
|
||||||
import { VideoPrivacy } from './video-privacy.enum'
|
import { VideoPrivacy } from './video-privacy.enum'
|
||||||
import { VideoScheduleUpdate } from './video-schedule-update.model'
|
import { VideoScheduleUpdate } from './video-schedule-update.model'
|
||||||
import { VideoConstant } from './video-constant.model'
|
import { VideoState } from './video-state.enum'
|
||||||
import { VideoStreamingPlaylist } from './video-streaming-playlist.model'
|
import { VideoStreamingPlaylist } from './video-streaming-playlist.model'
|
||||||
import { VideoFile } from './video-file.model'
|
|
||||||
|
|
||||||
export interface Video {
|
export interface Video {
|
||||||
id: number
|
id: number
|
||||||
|
|
Loading…
Add table
Reference in a new issue