Fix videojs
This commit is contained in:
parent
193272b8a0
commit
512decf37e
|
@ -1,4 +1,4 @@
|
||||||
import videojs from 'video.js/dist/alt/video.core.js'
|
import videojs from 'video.js'
|
||||||
import './pause-bezel'
|
import './pause-bezel'
|
||||||
|
|
||||||
const Plugin = videojs.getPlugin('plugin')
|
const Plugin = videojs.getPlugin('plugin')
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
import videojs from 'video.js/dist/alt/video.core.js'
|
import videojs from 'video.js'
|
||||||
|
|
||||||
function getPauseBezel () {
|
function getPauseBezel () {
|
||||||
return `
|
return `
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
// We duplicated this plugin to choose the hls.js version we want, because streamroot only provide a bundled file
|
// We duplicated this plugin to choose the hls.js version we want, because streamroot only provide a bundled file
|
||||||
|
|
||||||
import * as Hlsjs from 'hls.js/dist/hls.light.js'
|
import * as Hlsjs from 'hls.js/dist/hls.light.js'
|
||||||
import videojs from 'video.js/dist/alt/video.core.js'
|
import videojs from 'video.js'
|
||||||
import { HlsjsConfigHandlerOptions, QualityLevelRepresentation, QualityLevels, VideoJSTechHLS } from '../peertube-videojs-typings'
|
import { HlsjsConfigHandlerOptions, QualityLevelRepresentation, QualityLevels, VideoJSTechHLS } from '../peertube-videojs-typings'
|
||||||
|
|
||||||
type ErrorCounts = {
|
type ErrorCounts = {
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
import videojs from 'video.js/dist/alt/video.core.js'
|
import videojs from 'video.js'
|
||||||
import { P2PMediaLoaderPluginOptions, PlayerNetworkInfo } from '../peertube-videojs-typings'
|
import { P2PMediaLoaderPluginOptions, PlayerNetworkInfo } from '../peertube-videojs-typings'
|
||||||
import { Engine, initHlsJsPlayer, initVideoJsContribHlsJsPlayer } from 'p2p-media-loader-hlsjs'
|
import { Engine, initHlsJsPlayer, initVideoJsContribHlsJsPlayer } from 'p2p-media-loader-hlsjs'
|
||||||
import { Events, Segment } from 'p2p-media-loader-core'
|
import { Events, Segment } from 'p2p-media-loader-core'
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
import { VideoFile } from '../../../../shared/models/videos'
|
import { VideoFile } from '../../../../shared/models/videos'
|
||||||
import videojs from 'video.js/dist/alt/video.core.js'
|
import videojs from 'video.js'
|
||||||
import 'videojs-hotkeys'
|
import 'videojs-hotkeys/videojs.hotkeys'
|
||||||
import 'videojs-dock'
|
import 'videojs-dock'
|
||||||
import 'videojs-contextmenu-ui'
|
import 'videojs-contextmenu-ui'
|
||||||
import 'videojs-contrib-quality-levels'
|
import 'videojs-contrib-quality-levels'
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
import videojs from 'video.js/dist/alt/video.core'
|
import videojs from 'video.js'
|
||||||
import './videojs-components/settings-menu-button'
|
import './videojs-components/settings-menu-button'
|
||||||
import {
|
import {
|
||||||
PeerTubePluginOptions,
|
PeerTubePluginOptions,
|
||||||
|
|
|
@ -4,7 +4,7 @@ import { P2pMediaLoaderPlugin } from './p2p-media-loader/p2p-media-loader-plugin
|
||||||
import { PlayerMode } from './peertube-player-manager'
|
import { PlayerMode } from './peertube-player-manager'
|
||||||
import { RedundancyUrlManager } from './p2p-media-loader/redundancy-url-manager'
|
import { RedundancyUrlManager } from './p2p-media-loader/redundancy-url-manager'
|
||||||
import { VideoFile } from '@shared/models'
|
import { VideoFile } from '@shared/models'
|
||||||
import videojs from 'video.js/dist/alt/video.core.js'
|
import videojs from 'video.js'
|
||||||
import { Config, Level } from 'hls.js'
|
import { Config, Level } from 'hls.js'
|
||||||
|
|
||||||
declare module 'video.js' {
|
declare module 'video.js' {
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
import videojs from 'video.js/dist/alt/video.core.js'
|
import videojs from 'video.js'
|
||||||
|
|
||||||
function getMainTemplate (options: any) {
|
function getMainTemplate (options: any) {
|
||||||
return `
|
return `
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
import videojs from 'video.js/dist/alt/video.core.js'
|
import videojs from 'video.js'
|
||||||
import { EndCardOptions } from './end-card'
|
import { EndCardOptions } from './end-card'
|
||||||
|
|
||||||
const Plugin = videojs.getPlugin('plugin')
|
const Plugin = videojs.getPlugin('plugin')
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
import videojs from 'video.js/dist/alt/video.core.js'
|
import videojs from 'video.js'
|
||||||
|
|
||||||
const Button = videojs.getComponent('Button')
|
const Button = videojs.getComponent('Button')
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import { PlayerNetworkInfo } from '../peertube-videojs-typings'
|
import { PlayerNetworkInfo } from '../peertube-videojs-typings'
|
||||||
import videojs from 'video.js/dist/alt/video.core.js'
|
import videojs from 'video.js'
|
||||||
import { bytes } from '../utils'
|
import { bytes } from '../utils'
|
||||||
|
|
||||||
const Button = videojs.getComponent('Button')
|
const Button = videojs.getComponent('Button')
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import { buildVideoLink } from '../utils'
|
import { buildVideoLink } from '../utils'
|
||||||
import videojs from 'video.js/dist/alt/video.core.js'
|
import videojs from 'video.js'
|
||||||
|
|
||||||
const Button = videojs.getComponent('Button')
|
const Button = videojs.getComponent('Button')
|
||||||
class PeerTubeLinkButton extends Button {
|
class PeerTubeLinkButton extends Button {
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
import videojs from 'video.js/dist/alt/video.core.js'
|
import videojs from 'video.js'
|
||||||
|
|
||||||
const Component = videojs.getComponent('Component')
|
const Component = videojs.getComponent('Component')
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
import videojs from 'video.js/dist/alt/video.core.js'
|
import videojs from 'video.js'
|
||||||
|
|
||||||
import { LoadedQualityData } from '../peertube-videojs-typings'
|
import { LoadedQualityData } from '../peertube-videojs-typings'
|
||||||
import { ResolutionMenuItem } from './resolution-menu-item'
|
import { ResolutionMenuItem } from './resolution-menu-item'
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
import videojs from 'video.js/dist/alt/video.core.js'
|
import videojs from 'video.js'
|
||||||
import { AutoResolutionUpdateData, ResolutionUpdateData } from '../peertube-videojs-typings'
|
import { AutoResolutionUpdateData, ResolutionUpdateData } from '../peertube-videojs-typings'
|
||||||
|
|
||||||
const MenuItem = videojs.getComponent('MenuItem')
|
const MenuItem = videojs.getComponent('MenuItem')
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
import videojs from 'video.js/dist/alt/video.core.js'
|
import videojs from 'video.js'
|
||||||
|
|
||||||
const Component = videojs.getComponent('Component')
|
const Component = videojs.getComponent('Component')
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
// Thanks to Yanko Shterev: https://github.com/yshterev/videojs-settings-menu
|
// Thanks to Yanko Shterev: https://github.com/yshterev/videojs-settings-menu
|
||||||
import { SettingsMenuItem } from './settings-menu-item'
|
import { SettingsMenuItem } from './settings-menu-item'
|
||||||
import { toTitleCase } from '../utils'
|
import { toTitleCase } from '../utils'
|
||||||
import videojs from 'video.js/dist/alt/video.core.js'
|
import videojs from 'video.js'
|
||||||
|
|
||||||
import { SettingsDialog } from './settings-dialog'
|
import { SettingsDialog } from './settings-dialog'
|
||||||
import { SettingsPanel } from './settings-panel'
|
import { SettingsPanel } from './settings-panel'
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
// Thanks to Yanko Shterev: https://github.com/yshterev/videojs-settings-menu
|
// Thanks to Yanko Shterev: https://github.com/yshterev/videojs-settings-menu
|
||||||
import { toTitleCase } from '../utils'
|
import { toTitleCase } from '../utils'
|
||||||
import videojs from 'video.js/dist/alt/video.core.js'
|
import videojs from 'video.js'
|
||||||
import { SettingsButton } from './settings-menu-button'
|
import { SettingsButton } from './settings-menu-button'
|
||||||
import { SettingsDialog } from './settings-dialog'
|
import { SettingsDialog } from './settings-dialog'
|
||||||
import { SettingsPanel } from './settings-panel'
|
import { SettingsPanel } from './settings-panel'
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
import videojs from 'video.js/dist/alt/video.core.js'
|
import videojs from 'video.js'
|
||||||
|
|
||||||
const Component = videojs.getComponent('Component')
|
const Component = videojs.getComponent('Component')
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
import videojs from 'video.js/dist/alt/video.core.js'
|
import videojs from 'video.js'
|
||||||
|
|
||||||
const Component = videojs.getComponent('Component')
|
const Component = videojs.getComponent('Component')
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
import videojs from 'video.js/dist/alt/video.core.js'
|
import videojs from 'video.js'
|
||||||
import { saveTheaterInStore, getStoredTheater } from '../peertube-player-local-storage'
|
import { saveTheaterInStore, getStoredTheater } from '../peertube-player-local-storage'
|
||||||
|
|
||||||
const Button = videojs.getComponent('Button')
|
const Button = videojs.getComponent('Button')
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
import videojs from 'video.js/dist/alt/video.core.js'
|
import videojs from 'video.js'
|
||||||
import * as WebTorrent from 'webtorrent'
|
import * as WebTorrent from 'webtorrent'
|
||||||
import { renderVideo } from './video-renderer'
|
import { renderVideo } from './video-renderer'
|
||||||
import { LoadedQualityData, PlayerNetworkInfo, WebtorrentPluginOptions } from '../peertube-videojs-typings'
|
import { LoadedQualityData, PlayerNetworkInfo, WebtorrentPluginOptions } from '../peertube-videojs-typings'
|
||||||
|
|
|
@ -15,7 +15,7 @@ import {
|
||||||
import { VideoStreamingPlaylistType } from '../../../../shared/models/videos/video-streaming-playlist.type'
|
import { VideoStreamingPlaylistType } from '../../../../shared/models/videos/video-streaming-playlist.type'
|
||||||
import { PeerTubeEmbedApi } from './embed-api'
|
import { PeerTubeEmbedApi } from './embed-api'
|
||||||
import { TranslationsManager } from '../../assets/player/translations-manager'
|
import { TranslationsManager } from '../../assets/player/translations-manager'
|
||||||
import videojs from 'video.js/dist/alt/video.core.js'
|
import videojs from 'video.js'
|
||||||
import { VideoJSCaption } from '../../assets/player/peertube-videojs-typings'
|
import { VideoJSCaption } from '../../assets/player/peertube-videojs-typings'
|
||||||
|
|
||||||
type Translations = { [ id: string ]: string }
|
type Translations = { [ id: string ]: string }
|
||||||
|
|
|
@ -24,6 +24,7 @@
|
||||||
],
|
],
|
||||||
"baseUrl": "./",
|
"baseUrl": "./",
|
||||||
"paths": {
|
"paths": {
|
||||||
|
"video.js": [ "node_modules/video.js/core" ],
|
||||||
"@app/*": [ "src/app/*" ],
|
"@app/*": [ "src/app/*" ],
|
||||||
"@shared/*": [ "../shared/*" ],
|
"@shared/*": [ "../shared/*" ],
|
||||||
"fs": [ "src/shims/noop.ts" ],
|
"fs": [ "src/shims/noop.ts" ],
|
||||||
|
|
|
@ -27,7 +27,7 @@ module.exports = function () {
|
||||||
modules: [ helpers.root('src'), helpers.root('node_modules') ],
|
modules: [ helpers.root('src'), helpers.root('node_modules') ],
|
||||||
|
|
||||||
alias: {
|
alias: {
|
||||||
'video.js$': path.resolve('node_modules/video.js/dist/alt/video.core.novtt.js')
|
'video.js$': path.resolve('node_modules/video.js/core.js')
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue