diff options
25 files changed, 26 insertions, 25 deletions
diff --git a/client/src/assets/player/bezels/bezels-plugin.ts b/client/src/assets/player/bezels/bezels-plugin.ts index ad8bfa703..ca88bc1f9 100644 --- a/client/src/assets/player/bezels/bezels-plugin.ts +++ b/client/src/assets/player/bezels/bezels-plugin.ts | |||
@@ -1,4 +1,4 @@ | |||
1 | import videojs from 'video.js/dist/alt/video.core.js' | 1 | import videojs from 'video.js' |
2 | import './pause-bezel' | 2 | import './pause-bezel' |
3 | 3 | ||
4 | const Plugin = videojs.getPlugin('plugin') | 4 | const Plugin = videojs.getPlugin('plugin') |
diff --git a/client/src/assets/player/bezels/pause-bezel.ts b/client/src/assets/player/bezels/pause-bezel.ts index d9ef9a390..886574380 100644 --- a/client/src/assets/player/bezels/pause-bezel.ts +++ b/client/src/assets/player/bezels/pause-bezel.ts | |||
@@ -1,4 +1,4 @@ | |||
1 | import videojs from 'video.js/dist/alt/video.core.js' | 1 | import videojs from 'video.js' |
2 | 2 | ||
3 | function getPauseBezel () { | 3 | function getPauseBezel () { |
4 | return ` | 4 | return ` |
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 6937d147a..9e2ac1aa4 100644 --- a/client/src/assets/player/p2p-media-loader/hls-plugin.ts +++ b/client/src/assets/player/p2p-media-loader/hls-plugin.ts | |||
@@ -2,7 +2,7 @@ | |||
2 | // We duplicated this plugin to choose the hls.js version we want, because streamroot only provide a bundled file | 2 | // We duplicated this plugin to choose the hls.js version we want, because streamroot only provide a bundled file |
3 | 3 | ||
4 | import * as Hlsjs from 'hls.js/dist/hls.light.js' | 4 | import * as Hlsjs from 'hls.js/dist/hls.light.js' |
5 | import videojs from 'video.js/dist/alt/video.core.js' | 5 | import videojs from 'video.js' |
6 | import { HlsjsConfigHandlerOptions, QualityLevelRepresentation, QualityLevels, VideoJSTechHLS } from '../peertube-videojs-typings' | 6 | import { HlsjsConfigHandlerOptions, QualityLevelRepresentation, QualityLevels, VideoJSTechHLS } from '../peertube-videojs-typings' |
7 | 7 | ||
8 | type ErrorCounts = { | 8 | type ErrorCounts = { |
diff --git a/client/src/assets/player/p2p-media-loader/p2p-media-loader-plugin.ts b/client/src/assets/player/p2p-media-loader/p2p-media-loader-plugin.ts index 161c92b5e..46c6bbaf2 100644 --- a/client/src/assets/player/p2p-media-loader/p2p-media-loader-plugin.ts +++ b/client/src/assets/player/p2p-media-loader/p2p-media-loader-plugin.ts | |||
@@ -1,4 +1,4 @@ | |||
1 | import videojs from 'video.js/dist/alt/video.core.js' | 1 | import videojs from 'video.js' |
2 | import { P2PMediaLoaderPluginOptions, PlayerNetworkInfo } from '../peertube-videojs-typings' | 2 | import { P2PMediaLoaderPluginOptions, PlayerNetworkInfo } from '../peertube-videojs-typings' |
3 | import { Engine, initHlsJsPlayer, initVideoJsContribHlsJsPlayer } from 'p2p-media-loader-hlsjs' | 3 | import { Engine, initHlsJsPlayer, initVideoJsContribHlsJsPlayer } from 'p2p-media-loader-hlsjs' |
4 | import { Events, Segment } from 'p2p-media-loader-core' | 4 | import { Events, Segment } from 'p2p-media-loader-core' |
diff --git a/client/src/assets/player/peertube-player-manager.ts b/client/src/assets/player/peertube-player-manager.ts index 50701eefe..12e460f03 100644 --- a/client/src/assets/player/peertube-player-manager.ts +++ b/client/src/assets/player/peertube-player-manager.ts | |||
@@ -1,6 +1,6 @@ | |||
1 | import { VideoFile } from '../../../../shared/models/videos' | 1 | import { VideoFile } from '../../../../shared/models/videos' |
2 | import videojs from 'video.js/dist/alt/video.core.js' | 2 | import videojs from 'video.js' |
3 | import 'videojs-hotkeys' | 3 | import 'videojs-hotkeys/videojs.hotkeys' |
4 | import 'videojs-dock' | 4 | import 'videojs-dock' |
5 | import 'videojs-contextmenu-ui' | 5 | import 'videojs-contextmenu-ui' |
6 | import 'videojs-contrib-quality-levels' | 6 | import 'videojs-contrib-quality-levels' |
diff --git a/client/src/assets/player/peertube-plugin.ts b/client/src/assets/player/peertube-plugin.ts index afd8d678b..5085f7f86 100644 --- a/client/src/assets/player/peertube-plugin.ts +++ b/client/src/assets/player/peertube-plugin.ts | |||
@@ -1,4 +1,4 @@ | |||
1 | import videojs from 'video.js/dist/alt/video.core' | 1 | import videojs from 'video.js' |
2 | import './videojs-components/settings-menu-button' | 2 | import './videojs-components/settings-menu-button' |
3 | import { | 3 | import { |
4 | PeerTubePluginOptions, | 4 | PeerTubePluginOptions, |
diff --git a/client/src/assets/player/peertube-videojs-typings.ts b/client/src/assets/player/peertube-videojs-typings.ts index 9616dd326..a4e4c580c 100644 --- a/client/src/assets/player/peertube-videojs-typings.ts +++ b/client/src/assets/player/peertube-videojs-typings.ts | |||
@@ -4,7 +4,7 @@ import { P2pMediaLoaderPlugin } from './p2p-media-loader/p2p-media-loader-plugin | |||
4 | import { PlayerMode } from './peertube-player-manager' | 4 | import { PlayerMode } from './peertube-player-manager' |
5 | import { RedundancyUrlManager } from './p2p-media-loader/redundancy-url-manager' | 5 | import { RedundancyUrlManager } from './p2p-media-loader/redundancy-url-manager' |
6 | import { VideoFile } from '@shared/models' | 6 | import { VideoFile } from '@shared/models' |
7 | import videojs from 'video.js/dist/alt/video.core.js' | 7 | import videojs from 'video.js' |
8 | import { Config, Level } from 'hls.js' | 8 | import { Config, Level } from 'hls.js' |
9 | 9 | ||
10 | declare module 'video.js' { | 10 | declare module 'video.js' { |
diff --git a/client/src/assets/player/upnext/end-card.ts b/client/src/assets/player/upnext/end-card.ts index c39a9c913..8fabfc3fd 100644 --- a/client/src/assets/player/upnext/end-card.ts +++ b/client/src/assets/player/upnext/end-card.ts | |||
@@ -1,4 +1,4 @@ | |||
1 | import videojs from 'video.js/dist/alt/video.core.js' | 1 | import videojs from 'video.js' |
2 | 2 | ||
3 | function getMainTemplate (options: any) { | 3 | function getMainTemplate (options: any) { |
4 | return ` | 4 | return ` |
diff --git a/client/src/assets/player/upnext/upnext-plugin.ts b/client/src/assets/player/upnext/upnext-plugin.ts index ac7699e9a..db969024d 100644 --- a/client/src/assets/player/upnext/upnext-plugin.ts +++ b/client/src/assets/player/upnext/upnext-plugin.ts | |||
@@ -1,4 +1,4 @@ | |||
1 | import videojs from 'video.js/dist/alt/video.core.js' | 1 | import videojs from 'video.js' |
2 | import { EndCardOptions } from './end-card' | 2 | import { EndCardOptions } from './end-card' |
3 | 3 | ||
4 | const Plugin = videojs.getPlugin('plugin') | 4 | const Plugin = videojs.getPlugin('plugin') |
diff --git a/client/src/assets/player/videojs-components/next-video-button.ts b/client/src/assets/player/videojs-components/next-video-button.ts index c97ecdda6..22b32f06b 100644 --- a/client/src/assets/player/videojs-components/next-video-button.ts +++ b/client/src/assets/player/videojs-components/next-video-button.ts | |||
@@ -1,4 +1,4 @@ | |||
1 | import videojs from 'video.js/dist/alt/video.core.js' | 1 | import videojs from 'video.js' |
2 | 2 | ||
3 | const Button = videojs.getComponent('Button') | 3 | const Button = videojs.getComponent('Button') |
4 | 4 | ||
diff --git a/client/src/assets/player/videojs-components/p2p-info-button.ts b/client/src/assets/player/videojs-components/p2p-info-button.ts index e340337ed..db6806fed 100644 --- a/client/src/assets/player/videojs-components/p2p-info-button.ts +++ b/client/src/assets/player/videojs-components/p2p-info-button.ts | |||
@@ -1,5 +1,5 @@ | |||
1 | import { PlayerNetworkInfo } from '../peertube-videojs-typings' | 1 | import { PlayerNetworkInfo } from '../peertube-videojs-typings' |
2 | import videojs from 'video.js/dist/alt/video.core.js' | 2 | import videojs from 'video.js' |
3 | import { bytes } from '../utils' | 3 | import { bytes } from '../utils' |
4 | 4 | ||
5 | const Button = videojs.getComponent('Button') | 5 | const Button = videojs.getComponent('Button') |
diff --git a/client/src/assets/player/videojs-components/peertube-link-button.ts b/client/src/assets/player/videojs-components/peertube-link-button.ts index 4151758d4..63e92eb77 100644 --- a/client/src/assets/player/videojs-components/peertube-link-button.ts +++ b/client/src/assets/player/videojs-components/peertube-link-button.ts | |||
@@ -1,5 +1,5 @@ | |||
1 | import { buildVideoLink } from '../utils' | 1 | import { buildVideoLink } from '../utils' |
2 | import videojs from 'video.js/dist/alt/video.core.js' | 2 | import videojs from 'video.js' |
3 | 3 | ||
4 | const Button = videojs.getComponent('Button') | 4 | const Button = videojs.getComponent('Button') |
5 | class PeerTubeLinkButton extends Button { | 5 | class PeerTubeLinkButton extends Button { |
diff --git a/client/src/assets/player/videojs-components/peertube-load-progress-bar.ts b/client/src/assets/player/videojs-components/peertube-load-progress-bar.ts index 395720c53..7869b56ce 100644 --- a/client/src/assets/player/videojs-components/peertube-load-progress-bar.ts +++ b/client/src/assets/player/videojs-components/peertube-load-progress-bar.ts | |||
@@ -1,4 +1,4 @@ | |||
1 | import videojs from 'video.js/dist/alt/video.core.js' | 1 | import videojs from 'video.js' |
2 | 2 | ||
3 | const Component = videojs.getComponent('Component') | 3 | const Component = videojs.getComponent('Component') |
4 | 4 | ||
diff --git a/client/src/assets/player/videojs-components/resolution-menu-button.ts b/client/src/assets/player/videojs-components/resolution-menu-button.ts index d49ca0230..98e7f56fc 100644 --- a/client/src/assets/player/videojs-components/resolution-menu-button.ts +++ b/client/src/assets/player/videojs-components/resolution-menu-button.ts | |||
@@ -1,4 +1,4 @@ | |||
1 | import videojs from 'video.js/dist/alt/video.core.js' | 1 | import videojs from 'video.js' |
2 | 2 | ||
3 | import { LoadedQualityData } from '../peertube-videojs-typings' | 3 | import { LoadedQualityData } from '../peertube-videojs-typings' |
4 | import { ResolutionMenuItem } from './resolution-menu-item' | 4 | import { ResolutionMenuItem } from './resolution-menu-item' |
diff --git a/client/src/assets/player/videojs-components/resolution-menu-item.ts b/client/src/assets/player/videojs-components/resolution-menu-item.ts index cb0d219ad..73ad47d2b 100644 --- a/client/src/assets/player/videojs-components/resolution-menu-item.ts +++ b/client/src/assets/player/videojs-components/resolution-menu-item.ts | |||
@@ -1,4 +1,4 @@ | |||
1 | import videojs from 'video.js/dist/alt/video.core.js' | 1 | import videojs from 'video.js' |
2 | import { AutoResolutionUpdateData, ResolutionUpdateData } from '../peertube-videojs-typings' | 2 | import { AutoResolutionUpdateData, ResolutionUpdateData } from '../peertube-videojs-typings' |
3 | 3 | ||
4 | const MenuItem = videojs.getComponent('MenuItem') | 4 | const MenuItem = videojs.getComponent('MenuItem') |
diff --git a/client/src/assets/player/videojs-components/settings-dialog.ts b/client/src/assets/player/videojs-components/settings-dialog.ts index 8fd5ad96c..41911e7e8 100644 --- a/client/src/assets/player/videojs-components/settings-dialog.ts +++ b/client/src/assets/player/videojs-components/settings-dialog.ts | |||
@@ -1,4 +1,4 @@ | |||
1 | import videojs from 'video.js/dist/alt/video.core.js' | 1 | import videojs from 'video.js' |
2 | 2 | ||
3 | const Component = videojs.getComponent('Component') | 3 | const Component = videojs.getComponent('Component') |
4 | 4 | ||
diff --git a/client/src/assets/player/videojs-components/settings-menu-button.ts b/client/src/assets/player/videojs-components/settings-menu-button.ts index 749128bdc..011323267 100644 --- a/client/src/assets/player/videojs-components/settings-menu-button.ts +++ b/client/src/assets/player/videojs-components/settings-menu-button.ts | |||
@@ -1,7 +1,7 @@ | |||
1 | // Thanks to Yanko Shterev: https://github.com/yshterev/videojs-settings-menu | 1 | // Thanks to Yanko Shterev: https://github.com/yshterev/videojs-settings-menu |
2 | import { SettingsMenuItem } from './settings-menu-item' | 2 | import { SettingsMenuItem } from './settings-menu-item' |
3 | import { toTitleCase } from '../utils' | 3 | import { toTitleCase } from '../utils' |
4 | import videojs from 'video.js/dist/alt/video.core.js' | 4 | import videojs from 'video.js' |
5 | 5 | ||
6 | import { SettingsDialog } from './settings-dialog' | 6 | import { SettingsDialog } from './settings-dialog' |
7 | import { SettingsPanel } from './settings-panel' | 7 | import { SettingsPanel } from './settings-panel' |
diff --git a/client/src/assets/player/videojs-components/settings-menu-item.ts b/client/src/assets/player/videojs-components/settings-menu-item.ts index 8d364591b..f1342f179 100644 --- a/client/src/assets/player/videojs-components/settings-menu-item.ts +++ b/client/src/assets/player/videojs-components/settings-menu-item.ts | |||
@@ -1,6 +1,6 @@ | |||
1 | // Thanks to Yanko Shterev: https://github.com/yshterev/videojs-settings-menu | 1 | // Thanks to Yanko Shterev: https://github.com/yshterev/videojs-settings-menu |
2 | import { toTitleCase } from '../utils' | 2 | import { toTitleCase } from '../utils' |
3 | import videojs from 'video.js/dist/alt/video.core.js' | 3 | import videojs from 'video.js' |
4 | import { SettingsButton } from './settings-menu-button' | 4 | import { SettingsButton } from './settings-menu-button' |
5 | import { SettingsDialog } from './settings-dialog' | 5 | import { SettingsDialog } from './settings-dialog' |
6 | import { SettingsPanel } from './settings-panel' | 6 | import { SettingsPanel } from './settings-panel' |
diff --git a/client/src/assets/player/videojs-components/settings-panel-child.ts b/client/src/assets/player/videojs-components/settings-panel-child.ts index 6dee6d7df..d1582412c 100644 --- a/client/src/assets/player/videojs-components/settings-panel-child.ts +++ b/client/src/assets/player/videojs-components/settings-panel-child.ts | |||
@@ -1,4 +1,4 @@ | |||
1 | import videojs from 'video.js/dist/alt/video.core.js' | 1 | import videojs from 'video.js' |
2 | 2 | ||
3 | const Component = videojs.getComponent('Component') | 3 | const Component = videojs.getComponent('Component') |
4 | 4 | ||
diff --git a/client/src/assets/player/videojs-components/settings-panel.ts b/client/src/assets/player/videojs-components/settings-panel.ts index 833ee2f21..1ad8bb1fc 100644 --- a/client/src/assets/player/videojs-components/settings-panel.ts +++ b/client/src/assets/player/videojs-components/settings-panel.ts | |||
@@ -1,4 +1,4 @@ | |||
1 | import videojs from 'video.js/dist/alt/video.core.js' | 1 | import videojs from 'video.js' |
2 | 2 | ||
3 | const Component = videojs.getComponent('Component') | 3 | const Component = videojs.getComponent('Component') |
4 | 4 | ||
diff --git a/client/src/assets/player/videojs-components/theater-button.ts b/client/src/assets/player/videojs-components/theater-button.ts index 41875af71..f862ee224 100644 --- a/client/src/assets/player/videojs-components/theater-button.ts +++ b/client/src/assets/player/videojs-components/theater-button.ts | |||
@@ -1,4 +1,4 @@ | |||
1 | import videojs from 'video.js/dist/alt/video.core.js' | 1 | import videojs from 'video.js' |
2 | import { saveTheaterInStore, getStoredTheater } from '../peertube-player-local-storage' | 2 | import { saveTheaterInStore, getStoredTheater } from '../peertube-player-local-storage' |
3 | 3 | ||
4 | const Button = videojs.getComponent('Button') | 4 | const Button = videojs.getComponent('Button') |
diff --git a/client/src/assets/player/webtorrent/webtorrent-plugin.ts b/client/src/assets/player/webtorrent/webtorrent-plugin.ts index 26fb5a245..cb3deacc6 100644 --- a/client/src/assets/player/webtorrent/webtorrent-plugin.ts +++ b/client/src/assets/player/webtorrent/webtorrent-plugin.ts | |||
@@ -1,4 +1,4 @@ | |||
1 | import videojs from 'video.js/dist/alt/video.core.js' | 1 | import videojs from 'video.js' |
2 | import * as WebTorrent from 'webtorrent' | 2 | import * as WebTorrent from 'webtorrent' |
3 | import { renderVideo } from './video-renderer' | 3 | import { renderVideo } from './video-renderer' |
4 | import { LoadedQualityData, PlayerNetworkInfo, WebtorrentPluginOptions } from '../peertube-videojs-typings' | 4 | import { LoadedQualityData, PlayerNetworkInfo, WebtorrentPluginOptions } from '../peertube-videojs-typings' |
diff --git a/client/src/standalone/videos/embed.ts b/client/src/standalone/videos/embed.ts index 6616fab48..286757e5e 100644 --- a/client/src/standalone/videos/embed.ts +++ b/client/src/standalone/videos/embed.ts | |||
@@ -15,7 +15,7 @@ import { | |||
15 | import { VideoStreamingPlaylistType } from '../../../../shared/models/videos/video-streaming-playlist.type' | 15 | import { VideoStreamingPlaylistType } from '../../../../shared/models/videos/video-streaming-playlist.type' |
16 | import { PeerTubeEmbedApi } from './embed-api' | 16 | import { PeerTubeEmbedApi } from './embed-api' |
17 | import { TranslationsManager } from '../../assets/player/translations-manager' | 17 | import { TranslationsManager } from '../../assets/player/translations-manager' |
18 | import videojs from 'video.js/dist/alt/video.core.js' | 18 | import videojs from 'video.js' |
19 | import { VideoJSCaption } from '../../assets/player/peertube-videojs-typings' | 19 | import { VideoJSCaption } from '../../assets/player/peertube-videojs-typings' |
20 | 20 | ||
21 | type Translations = { [ id: string ]: string } | 21 | type Translations = { [ id: string ]: string } |
diff --git a/client/tsconfig.json b/client/tsconfig.json index d9e798f91..ce83a4f11 100644 --- a/client/tsconfig.json +++ b/client/tsconfig.json | |||
@@ -24,6 +24,7 @@ | |||
24 | ], | 24 | ], |
25 | "baseUrl": "./", | 25 | "baseUrl": "./", |
26 | "paths": { | 26 | "paths": { |
27 | "video.js": [ "node_modules/video.js/core" ], | ||
27 | "@app/*": [ "src/app/*" ], | 28 | "@app/*": [ "src/app/*" ], |
28 | "@shared/*": [ "../shared/*" ], | 29 | "@shared/*": [ "../shared/*" ], |
29 | "fs": [ "src/shims/noop.ts" ], | 30 | "fs": [ "src/shims/noop.ts" ], |
diff --git a/client/webpack/webpack.video-embed.js b/client/webpack/webpack.video-embed.js index 84ab83669..252040bb7 100644 --- a/client/webpack/webpack.video-embed.js +++ b/client/webpack/webpack.video-embed.js | |||
@@ -27,7 +27,7 @@ module.exports = function () { | |||
27 | modules: [ helpers.root('src'), helpers.root('node_modules') ], | 27 | modules: [ helpers.root('src'), helpers.root('node_modules') ], |
28 | 28 | ||
29 | alias: { | 29 | alias: { |
30 | 'video.js$': path.resolve('node_modules/video.js/dist/alt/video.core.novtt.js') | 30 | 'video.js$': path.resolve('node_modules/video.js/core.js') |
31 | } | 31 | } |
32 | }, | 32 | }, |
33 | 33 | ||