aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2020-03-31 15:43:17 +0200
committerChocobozzz <me@florianbigard.com>2020-04-01 14:06:46 +0200
commit4adebd513ec207d54e76a09cd4a8554d1900d34a (patch)
tree1c141b43b47609522e6290e8b02a3389b72d1a6b /client/src
parent6541071b4acfff9df7b1ddba53000f0e1bba3257 (diff)
downloadPeerTube-4adebd513ec207d54e76a09cd4a8554d1900d34a.tar.gz
PeerTube-4adebd513ec207d54e76a09cd4a8554d1900d34a.tar.zst
PeerTube-4adebd513ec207d54e76a09cd4a8554d1900d34a.zip
Client dependencies upgrade
Diffstat (limited to 'client/src')
-rw-r--r--client/src/app/shared/images/global-icon.component.ts106
-rw-r--r--client/src/assets/player/p2p-media-loader/hls-plugin.ts6
2 files changed, 57 insertions, 55 deletions
diff --git a/client/src/app/shared/images/global-icon.component.ts b/client/src/app/shared/images/global-icon.component.ts
index a2e2b719d..a8e5a7020 100644
--- a/client/src/app/shared/images/global-icon.component.ts
+++ b/client/src/app/shared/images/global-icon.component.ts
@@ -2,59 +2,59 @@ import { ChangeDetectionStrategy, Component, ElementRef, Input, OnInit } from '@
2import { HooksService } from '@app/core/plugins/hooks.service' 2import { HooksService } from '@app/core/plugins/hooks.service'
3 3
4const icons = { 4const icons = {
5 'add': require('!!raw-loader?!../../../assets/images/global/add.svg'), 5 'add': require('!!raw-loader?!../../../assets/images/global/add.svg').default,
6 'user': require('!!raw-loader?!../../../assets/images/global/user.svg'), 6 'user': require('!!raw-loader?!../../../assets/images/global/user.svg').default,
7 'sign-out': require('!!raw-loader?!../../../assets/images/global/sign-out.svg'), 7 'sign-out': require('!!raw-loader?!../../../assets/images/global/sign-out.svg').default,
8 'syndication': require('!!raw-loader?!../../../assets/images/global/syndication.svg'), 8 'syndication': require('!!raw-loader?!../../../assets/images/global/syndication.svg').default,
9 'help': require('!!raw-loader?!../../../assets/images/global/help.svg'), 9 'help': require('!!raw-loader?!../../../assets/images/global/help.svg').default,
10 'sparkle': require('!!raw-loader?!../../../assets/images/global/sparkle.svg'), 10 'sparkle': require('!!raw-loader?!../../../assets/images/global/sparkle.svg').default,
11 'alert': require('!!raw-loader?!../../../assets/images/global/alert.svg'), 11 'alert': require('!!raw-loader?!../../../assets/images/global/alert.svg').default,
12 'cloud-error': require('!!raw-loader?!../../../assets/images/global/cloud-error.svg'), 12 'cloud-error': require('!!raw-loader?!../../../assets/images/global/cloud-error.svg').default,
13 'clock': require('!!raw-loader?!../../../assets/images/global/clock.svg'), 13 'clock': require('!!raw-loader?!../../../assets/images/global/clock.svg').default,
14 'user-add': require('!!raw-loader?!../../../assets/images/global/user-add.svg'), 14 'user-add': require('!!raw-loader?!../../../assets/images/global/user-add.svg').default,
15 'no': require('!!raw-loader?!../../../assets/images/global/no.svg'), 15 'no': require('!!raw-loader?!../../../assets/images/global/no.svg').default,
16 'cloud-download': require('!!raw-loader?!../../../assets/images/global/cloud-download.svg'), 16 'cloud-download': require('!!raw-loader?!../../../assets/images/global/cloud-download.svg').default,
17 'undo': require('!!raw-loader?!../../../assets/images/global/undo.svg'), 17 'undo': require('!!raw-loader?!../../../assets/images/global/undo.svg').default,
18 'history': require('!!raw-loader?!../../../assets/images/global/history.svg'), 18 'history': require('!!raw-loader?!../../../assets/images/global/history.svg').default,
19 'circle-tick': require('!!raw-loader?!../../../assets/images/global/circle-tick.svg'), 19 'circle-tick': require('!!raw-loader?!../../../assets/images/global/circle-tick.svg').default,
20 'cog': require('!!raw-loader?!../../../assets/images/global/cog.svg'), 20 'cog': require('!!raw-loader?!../../../assets/images/global/cog.svg').default,
21 'download': require('!!raw-loader?!../../../assets/images/global/download.svg'), 21 'download': require('!!raw-loader?!../../../assets/images/global/download.svg').default,
22 'go': require('!!raw-loader?!../../../assets/images/menu/go.svg'), 22 'go': require('!!raw-loader?!../../../assets/images/menu/go.svg').default,
23 'edit': require('!!raw-loader?!../../../assets/images/global/edit.svg'), 23 'edit': require('!!raw-loader?!../../../assets/images/global/edit.svg').default,
24 'im-with-her': require('!!raw-loader?!../../../assets/images/global/im-with-her.svg'), 24 'im-with-her': require('!!raw-loader?!../../../assets/images/global/im-with-her.svg').default,
25 'delete': require('!!raw-loader?!../../../assets/images/global/delete.svg'), 25 'delete': require('!!raw-loader?!../../../assets/images/global/delete.svg').default,
26 'server': require('!!raw-loader?!../../../assets/images/global/server.svg'), 26 'server': require('!!raw-loader?!../../../assets/images/global/server.svg').default,
27 'cross': require('!!raw-loader?!../../../assets/images/global/cross.svg'), 27 'cross': require('!!raw-loader?!../../../assets/images/global/cross.svg').default,
28 'validate': require('!!raw-loader?!../../../assets/images/global/validate.svg'), 28 'validate': require('!!raw-loader?!../../../assets/images/global/validate.svg').default,
29 'tick': require('!!raw-loader?!../../../assets/images/global/tick.svg'), 29 'tick': require('!!raw-loader?!../../../assets/images/global/tick.svg').default,
30 'repeat': require('!!raw-loader?!../../../assets/images/global/repeat.svg'), 30 'repeat': require('!!raw-loader?!../../../assets/images/global/repeat.svg').default,
31 'inbox-full': require('!!raw-loader?!../../../assets/images/global/inbox-full.svg'), 31 'inbox-full': require('!!raw-loader?!../../../assets/images/global/inbox-full.svg').default,
32 'dislike': require('!!raw-loader?!../../../assets/images/video/dislike.svg'), 32 'dislike': require('!!raw-loader?!../../../assets/images/video/dislike.svg').default,
33 'support': require('!!raw-loader?!../../../assets/images/video/support.svg'), 33 'support': require('!!raw-loader?!../../../assets/images/video/support.svg').default,
34 'like': require('!!raw-loader?!../../../assets/images/video/like.svg'), 34 'like': require('!!raw-loader?!../../../assets/images/video/like.svg').default,
35 'more-horizontal': require('!!raw-loader?!../../../assets/images/global/more-horizontal.svg'), 35 'more-horizontal': require('!!raw-loader?!../../../assets/images/global/more-horizontal.svg').default,
36 'more-vertical': require('!!raw-loader?!../../../assets/images/global/more-vertical.svg'), 36 'more-vertical': require('!!raw-loader?!../../../assets/images/global/more-vertical.svg').default,
37 'share': require('!!raw-loader?!../../../assets/images/video/share.svg'), 37 'share': require('!!raw-loader?!../../../assets/images/video/share.svg').default,
38 'upload': require('!!raw-loader?!../../../assets/images/video/upload.svg'), 38 'upload': require('!!raw-loader?!../../../assets/images/video/upload.svg').default,
39 'playlist-add': require('!!raw-loader?!../../../assets/images/video/playlist-add.svg'), 39 'playlist-add': require('!!raw-loader?!../../../assets/images/video/playlist-add.svg').default,
40 'play': require('!!raw-loader?!../../../assets/images/global/play.svg'), 40 'play': require('!!raw-loader?!../../../assets/images/global/play.svg').default,
41 'playlists': require('!!raw-loader?!../../../assets/images/global/playlists.svg'), 41 'playlists': require('!!raw-loader?!../../../assets/images/global/playlists.svg').default,
42 'globe': require('!!raw-loader?!../../../assets/images/menu/globe.svg'), 42 'globe': require('!!raw-loader?!../../../assets/images/menu/globe.svg').default,
43 'home': require('!!raw-loader?!../../../assets/images/menu/home.svg'), 43 'home': require('!!raw-loader?!../../../assets/images/menu/home.svg').default,
44 'recently-added': require('!!raw-loader?!../../../assets/images/menu/recently-added.svg'), 44 'recently-added': require('!!raw-loader?!../../../assets/images/menu/recently-added.svg').default,
45 'trending': require('!!raw-loader?!../../../assets/images/menu/trending.svg'), 45 'trending': require('!!raw-loader?!../../../assets/images/menu/trending.svg').default,
46 'video-lang': require('!!raw-loader?!../../../assets/images/global/video-lang.svg'), 46 'video-lang': require('!!raw-loader?!../../../assets/images/global/video-lang.svg').default,
47 'videos': require('!!raw-loader?!../../../assets/images/global/videos.svg'), 47 'videos': require('!!raw-loader?!../../../assets/images/global/videos.svg').default,
48 'folder': require('!!raw-loader?!../../../assets/images/global/folder.svg'), 48 'folder': require('!!raw-loader?!../../../assets/images/global/folder.svg').default,
49 'subscriptions': require('!!raw-loader?!../../../assets/images/menu/subscriptions.svg'), 49 'subscriptions': require('!!raw-loader?!../../../assets/images/menu/subscriptions.svg').default,
50 'language': require('!!raw-loader?!../../../assets/images/menu/language.svg'), 50 'language': require('!!raw-loader?!../../../assets/images/menu/language.svg').default,
51 'unsensitive': require('!!raw-loader?!../../../assets/images/menu/eye.svg'), 51 'unsensitive': require('!!raw-loader?!../../../assets/images/menu/eye.svg').default,
52 'sensitive': require('!!raw-loader?!../../../assets/images/menu/eye-closed.svg'), 52 'sensitive': require('!!raw-loader?!../../../assets/images/menu/eye-closed.svg').default,
53 'p2p': require('!!raw-loader?!../../../assets/images/menu/p2p.svg'), 53 'p2p': require('!!raw-loader?!../../../assets/images/menu/p2p.svg').default,
54 'users': require('!!raw-loader?!../../../assets/images/global/users.svg'), 54 'users': require('!!raw-loader?!../../../assets/images/global/users.svg').default,
55 'search': require('!!raw-loader?!../../../assets/images/global/search.svg'), 55 'search': require('!!raw-loader?!../../../assets/images/global/search.svg').default,
56 'refresh': require('!!raw-loader?!../../../assets/images/global/refresh.svg'), 56 'refresh': require('!!raw-loader?!../../../assets/images/global/refresh.svg').default,
57 'npm': require('!!raw-loader?!../../../assets/images/global/npm.svg') 57 'npm': require('!!raw-loader?!../../../assets/images/global/npm.svg').default
58} 58}
59 59
60export type GlobalIconName = keyof typeof icons 60export type GlobalIconName = keyof typeof icons
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 d78e1ab90..5bfa39cfa 100644
--- a/client/src/assets/player/p2p-media-loader/hls-plugin.ts
+++ b/client/src/assets/player/p2p-media-loader/hls-plugin.ts
@@ -13,6 +13,8 @@ type Metadata = {
13 levels: Hlsjs.Level[] 13 levels: Hlsjs.Level[]
14} 14}
15 15
16type CustomAudioTrack = AudioTrack & { name?: string, lang?: string }
17
16const registerSourceHandler = function (vjs: typeof videojs) { 18const registerSourceHandler = function (vjs: typeof videojs) {
17 if (!Hlsjs.isSupported()) { 19 if (!Hlsjs.isSupported()) {
18 console.warn('Hls.js is not supported in this browser!') 20 console.warn('Hls.js is not supported in this browser!')
@@ -91,7 +93,7 @@ class Html5Hlsjs {
91 private readonly source: videojs.Tech.SourceObject 93 private readonly source: videojs.Tech.SourceObject
92 private readonly vjs: typeof videojs 94 private readonly vjs: typeof videojs
93 95
94 private hls: Hlsjs & { manualLevel?: number } // FIXME: typings 96 private hls: Hlsjs & { manualLevel?: number, audioTrack?: any, audioTracks?: CustomAudioTrack[] } // FIXME: typings
95 private hlsjsConfig: Partial<Hlsjs.Config & { cueHandler: any }> = null 97 private hlsjsConfig: Partial<Hlsjs.Config & { cueHandler: any }> = null
96 98
97 private _duration: number = null 99 private _duration: number = null
@@ -393,7 +395,7 @@ class Html5Hlsjs {
393 } 395 }
394 396
395 private _onAudioTracks () { 397 private _onAudioTracks () {
396 const hlsAudioTracks = this.hls.audioTracks as (AudioTrack & { name?: string, lang?: string })[] // FIXME typings 398 const hlsAudioTracks = this.hls.audioTracks
397 const playerAudioTracks = this.tech.audioTracks() 399 const playerAudioTracks = this.tech.audioTracks()
398 400
399 if (hlsAudioTracks.length > 1 && playerAudioTracks.length === 0) { 401 if (hlsAudioTracks.length > 1 && playerAudioTracks.length === 0) {