Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrate video player from video.js to shaka-player #4978

Merged
merged 128 commits into from
Sep 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
128 commits
Select commit Hold shift + click to select a range
fb01262
Migrate video player from video.js to shaka-player
absidue Apr 18, 2024
cecb33f
Fix syntax error introduced during cleanup
absidue Apr 18, 2024
1be8648
Fix typo
absidue Apr 22, 2024
2341b62
Merge branch 'development' into shaka-migration
absidue Apr 29, 2024
89217a3
Show bitrate in stats for Invidious legacy formats
absidue Apr 29, 2024
5e1731f
Sort legacy formats by bitrate instead of qualityLabel
absidue Apr 29, 2024
6eef018
Use Invidious' newly added isPostLiveDvr property
absidue Apr 29, 2024
500ef3d
Invidious correctly returns the ratelimit for DASH manifests now
absidue Apr 29, 2024
7eb03fb
Properly hide unsupported screenshot functionality outside of Electron
absidue Apr 29, 2024
c45c84f
Sort captions in data initialiser
absidue Apr 29, 2024
e8ffd0d
Merge branch 'development' into shaka-migration
absidue Apr 30, 2024
aa6326b
Update shaka-player to version 4.8.1
absidue Apr 30, 2024
96df390
Use textTrackLabelFormat configuration option
absidue Apr 30, 2024
5983de2
Switch to manifestPreprocessorTXml
absidue Apr 30, 2024
4bf7d04
Add support for VR videos that use equirectangular projection
absidue May 1, 2024
e406fb1
The AV1 video streams work okay for vr, so allow list them too
absidue May 1, 2024
e9f9fbd
Merge branch 'development' into shaka-migration
absidue May 1, 2024
3221642
Use woff2 (169 KB) Material Icons font instead of otf (390 KB)
absidue May 1, 2024
8b533d1
Use material icons for custom player elements
absidue May 1, 2024
b3b05e9
Fix legacy formats exception
absidue May 6, 2024
cb4d0f2
Merge branch 'development' into shaka-migration
absidue May 6, 2024
5a701b7
Merge branch 'development' into shaka-migration
absidue May 8, 2024
ead227e
Update shaka-player to version 4.8.3
absidue May 8, 2024
334e302
Sort default quality values the same as in the player
absidue May 8, 2024
1408f5f
Merge branch 'development' into shaka-migration
absidue May 13, 2024
29b2128
Cleanup representations search in live subtitle fix
absidue May 13, 2024
b8626f2
Slightly speed up sortCaptions
absidue May 13, 2024
b80909c
Fix setPositionState error when playback rate is 0
absidue May 13, 2024
9f0cef1
Merge branch 'development' into shaka-migration
absidue May 14, 2024
be46412
Update shaka-player to version 4.8.4
absidue May 14, 2024
da81416
Fix playback rate changes getting overridden
absidue May 16, 2024
6bf7805
Fix current chapter index not updating
absidue May 16, 2024
00b4809
Fix next video not automatically playing
absidue May 16, 2024
977f0d7
Fix volume changes not propagating to the mute button
absidue May 16, 2024
de19bb7
Reduce work done during UI config updates
absidue May 16, 2024
449b708
Fix UI customizations not applying after UI config changes
absidue May 16, 2024
5f7980d
Update shaka-player to version 4.8.5
absidue May 19, 2024
bcbb498
Replace non-reactive workaround with a Vue 3 friendly one
absidue May 19, 2024
8db84d4
Merge branch 'development' into shaka-migration
absidue May 20, 2024
2e5fe8e
Fix error when all sponsorblock segments are set to do nothing
absidue May 20, 2024
a9a4c07
Add some guards to hopefully reduce errors during fast naviagtions
absidue May 20, 2024
287dbff
Make SponsorBlock failure non-fatal
absidue May 20, 2024
ef275f2
Merge branch 'development' into shaka-migration
absidue May 20, 2024
a5f75ab
Merge branch 'development' into shaka-migration
absidue May 26, 2024
ff9fd8a
Merge branch 'development' into shaka-migration
absidue May 27, 2024
0db16c3
Update shaka-player to version 4.8.6
absidue May 27, 2024
4540173
Merge branch 'development' into shaka-migration
absidue May 29, 2024
d847a0f
Update shaka-player to version 4.8.8
absidue May 29, 2024
a6f02a6
Merge branch 'development' into shaka-migration
absidue Jun 1, 2024
b0262f5
Update shaka-player to version 4.9.0
absidue Jun 1, 2024
90018d7
Merge branch 'development' into shaka-migration
absidue Jun 3, 2024
399e318
Update shaka-player to version 4.9.1
absidue Jun 3, 2024
475b5b8
Minor performance improvements
absidue Jun 3, 2024
d421924
Merge branch 'development' into shaka-migration
absidue Jun 18, 2024
a54cbf3
Update shaka-player to version 4.9.6
absidue Jun 18, 2024
581b9a2
Merge branch 'development' into shaka-migration
absidue Jun 23, 2024
a239ec6
Update shaka-player to version 4.9.9
absidue Jun 23, 2024
2918b09
Merge branch 'development' into shaka-migration
absidue Jun 24, 2024
bd25335
Fix sponsor block markers not showing up
absidue Jun 24, 2024
1c951b2
Add some basic error messages for expired urls and ratelimits
absidue Jun 24, 2024
6410f81
Add some basic error messages for 403s
absidue Jun 24, 2024
7c2505b
Cleanup code comments
absidue Jun 24, 2024
80fe87c
Migrate player to composition API for better performance
absidue Jun 27, 2024
a4a485b
Merge branch 'development' into shaka-migration
absidue Jun 27, 2024
64ccb66
Use reactive for stats instead of ref, as it never gets reassigned
absidue Jun 27, 2024
0ad03f5
Merge branch 'development' into shaka-migration
absidue Jul 2, 2024
ee4c9a0
Update shaka-player to version 4.10.0
absidue Jul 2, 2024
816d1ea
Fix i18n import in custom player components
absidue Jul 2, 2024
570d518
Add chapter markers
absidue Jul 2, 2024
92e3c1b
Move shaka-player CSS import into the Vue file
absidue Jul 2, 2024
7935335
Bump mpd_version from 5 to 7
absidue Jul 3, 2024
c85062a
Apply suggestions from code review
absidue Jul 7, 2024
0ebf3c4
Merge branch 'development' into shaka-migration
absidue Jul 7, 2024
50a42c0
Fix seeking with the arrow keys
absidue Jul 7, 2024
70cdb0d
Merge branch 'development' into shaka-migration
absidue Jul 9, 2024
d30666a
Update shaka-player to version 4.10.3
absidue Jul 9, 2024
aca8c8b
Truncate long video titles to the screen width in the full screen ove…
absidue Jul 10, 2024
4151fad
Merge branch 'development' into shaka-migration
absidue Jul 10, 2024
9db9622
Merge branch 'development' into shaka-migration
absidue Jul 11, 2024
8308e47
Fix mouse scroll handlers firing multiple times
absidue Jul 11, 2024
15184f8
Cleanup unneeded code
absidue Jul 11, 2024
a554c91
Merge branch 'development' into shaka-migration
absidue Jul 16, 2024
af7e5a9
Update shaka-player to version 4.10.6
absidue Jul 16, 2024
308aa43
Various small optimisations
absidue Jul 16, 2024
f24d7ed
Move skipped sponsorblock segement messages to the top right corner
absidue Jul 17, 2024
7fcc1d8
Support prefers-reduced-transparency in overlays
absidue Jul 17, 2024
eff7062
Merge branch 'development' into shaka-migration
absidue Jul 18, 2024
2de5a1a
Fix stylelint errors
absidue Jul 18, 2024
c6e9184
Update shaka-player to version 4.10.7
absidue Jul 18, 2024
193c0b9
Merge branch 'development' into shaka-migration
absidue Jul 23, 2024
13f5654
Update shaka-player to version 4.10.8
absidue Jul 23, 2024
2ba01f9
Only use variants that are predicted to play smoothly
absidue Jul 23, 2024
64446ee
Only set preferredDecodingAttributes for DASH playback
absidue Jul 23, 2024
dfe3b4b
Implement a custom audio track selector instead of using shaka-player's
absidue Jul 23, 2024
1aeffee
Move skipped sponsorblock segement messages to the bottom right corner
absidue Jul 23, 2024
db42898
Merge branch 'development' into shaka-migration
absidue Jul 26, 2024
e4eca34
Fix scrolling over the big play pause button not working
absidue Jul 26, 2024
d38d40e
Update shaka-player to version 4.10.9
absidue Jul 26, 2024
b152ac4
Fix some type issues
absidue Jul 26, 2024
f600465
Add support for secondary audio tracks
absidue Jul 26, 2024
8d4d4bf
Downgrade shaka-player to fix subtitle alignment
absidue Jul 26, 2024
6f665f1
Actually downgrade shaka-player
absidue Jul 26, 2024
3ef3d0f
Fix Invidious API error
absidue Jul 26, 2024
8e4beb8
Update outdated comment
absidue Jul 26, 2024
ae78771
Fix multiple audio track detection for Invidious
absidue Jul 26, 2024
8d07c12
Fix duplicate qualities with the Invidious API
absidue Jul 30, 2024
942df17
Use vp9 streams if the Invidious instance is running a new enough ver…
absidue Jul 30, 2024
6a94be2
Merge branch 'development' into shaka-migration
absidue Jul 30, 2024
9b9c067
Merge branch 'development' into shaka-migration
absidue Aug 2, 2024
4202fe4
When an error occurs with the thumbnails just log it
absidue Aug 3, 2024
d8bea95
Include the video ID in the error logs
absidue Aug 3, 2024
52dc3f3
Merge branch 'development' into shaka-migration
absidue Aug 7, 2024
639d2df
Merge branch 'development' into shaka-migration
absidue Aug 10, 2024
6908a9e
Gracefully handle the internet connection disappearing during playback
absidue Aug 10, 2024
704e49e
Show a message while buffering if it was caused by the internet conne…
absidue Aug 11, 2024
64aec23
Fix the text color and RTL handling
absidue Aug 12, 2024
816e5f5
Merge branch 'development' into shaka-migration
absidue Aug 14, 2024
489a668
Cleanup the Invidious DASH manifest in builds without the local API
absidue Aug 15, 2024
3d313bf
Fix quality selection when switching from audio to DASH
absidue Aug 18, 2024
060f271
Merge branch 'development' into shaka-migration
absidue Aug 20, 2024
4c26976
Update shaka-player to version 4.10.10
absidue Aug 20, 2024
6e2e888
Fix position and alignment for auto-generated subtitles
absidue Aug 20, 2024
0801740
Merge branch 'development' into shaka-migration
absidue Aug 25, 2024
9f8f868
Update shaka-player to version 4.10.11
absidue Aug 25, 2024
2ce0726
Use the HLS manifests for live streams
absidue Aug 25, 2024
a36c497
Merge branch 'development' into shaka-migration
absidue Aug 26, 2024
14b8ea8
Merge branch 'development' into shaka-migration
absidue Aug 28, 2024
f49c9ed
Update shaka-player to version 4.10.12
absidue Aug 28, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .stylelintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
"selector-pseudo-class-no-unknown": [
true,
{
"ignorePseudoClasses": ["deep"]
"ignorePseudoClasses": ["deep", "global"]
}
],
"a11y/no-outline-none": true,
Expand Down
5 changes: 0 additions & 5 deletions _scripts/_domParser.js

This file was deleted.

34 changes: 24 additions & 10 deletions _scripts/dev-runner.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,14 @@ const web = process.argv.indexOf('--web') !== -1
let mainConfig
let rendererConfig
let webConfig
let SHAKA_LOCALES_TO_BE_BUNDLED

if (!web) {
mainConfig = require('./webpack.main.config')
rendererConfig = require('./webpack.renderer.config')

SHAKA_LOCALES_TO_BE_BUNDLED = rendererConfig.SHAKA_LOCALES_TO_BE_BUNDLED
delete rendererConfig.SHAKA_LOCALES_TO_BE_BUNDLED
} else {
webConfig = require('./webpack.web.config')
}
Expand Down Expand Up @@ -128,17 +132,27 @@ function startRenderer(callback) {
})

const server = new WebpackDevServer({
static: {
directory: path.resolve(__dirname, '..', 'static'),
watch: {
ignored: [
/(dashFiles|storyboards)\/*/,
'/**/.DS_Store',
'**/static/locales/*'
]
static: [
{
directory: path.resolve(__dirname, '..', 'static'),
watch: {
ignored: [
/(dashFiles|storyboards)\/*/,
'/**/.DS_Store',
'**/static/locales/*'
]
},
publicPath: '/static'
},
publicPath: '/static'
},
{
directory: path.resolve(__dirname, '..', 'node_modules', 'shaka-player', 'ui', 'locales'),
publicPath: '/static/shaka-player-locales',
watch: {
// Ignore everything that isn't one of the locales that we would bundle in production mode
ignored: `**/!(${SHAKA_LOCALES_TO_BE_BUNDLED.join('|')}).json`
}
}
],
port
}, compiler)

Expand Down
114 changes: 114 additions & 0 deletions _scripts/getShakaLocales.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,114 @@
const { readFileSync, readdirSync } = require('fs')

function getPreloadedLocales() {
const localesFile = readFileSync(`${__dirname}/../node_modules/shaka-player/dist/locales.js`, 'utf-8')

const localesLine = localesFile.match(/^\/\/ LOCALES: ([\w, -]+)$/m)

if (!localesLine) {
throw new Error("Failed to parse shaka-player's preloaded locales")
}

return localesLine[1].split(',').map(locale => locale.trim())
}

function getAllLocales() {
const filenames = readdirSync(`${__dirname}/../node_modules/shaka-player/ui/locales`)

return new Set(filenames
.filter(filename => filename !== 'source.json' && filename.endsWith('.json'))
.map(filename => filename.replace('.json', '')))
}

/**
* Maps the shaka locales to FreeTube's active ones
* This allows us to know which locale files are actually needed
* and which shaka locale needs to be activated for a given FreeTube one.
* @param {Set<string>} shakaLocales
* @param {string[]} freeTubeLocales
*/
function getMappings(shakaLocales, freeTubeLocales) {
/**
* @type {[string, string][]}
* Using this structure as it gets passed to `new Map()` in the player component
* The first element is the FreeTube locale, the second one is the shaka-player one
**/
const mappings = []

for (const locale of freeTubeLocales) {
if (shakaLocales.has(locale)) {
mappings.push([
locale,
locale
])
} else if (shakaLocales.has(locale.replace('_', '-'))) {
mappings.push([
locale,
locale.replace('_', '-')
])
} else if (shakaLocales.has(locale.split(/[-_]/)[0])) {
mappings.push([
locale,
locale.split(/[-_]/)[0]
])
}
}

// special cases

mappings.push(
// according to https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes
// "no" is the macro language for "nb" and "nn"
[
'nb_NO',
'no'
],
[
'nn',
'no'
],

// according to https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes
// "iw" is the old/original code for Hebrew, these days it's "he"
[
'he',
'iw'
],

// not sure why we have pt, pt-PT and pt-BR in the FreeTube locales
// as pt and pt-PT are the same thing, but we should handle it here anyway
[
'pt',
'pt-PT'
]
)

return mappings
}

function getShakaLocales() {
const shakaLocales = getAllLocales()

/** @type {string[]} */
const freeTubeLocales = JSON.parse(readFileSync(`${__dirname}/../static/locales/activeLocales.json`, 'utf-8'))

const mappings = getMappings(shakaLocales, freeTubeLocales)

const preloaded = getPreloadedLocales()

const shakaMappings = mappings.map(mapping => mapping[1])

// use a set to deduplicate the list
// we don't need to bundle any locale files that are already embedded in shaka-player/preloaded

/** @type {string[]} */
const toBeBundled = [...new Set(shakaMappings.filter(locale => !preloaded.includes(locale)))]

return {
SHAKA_LOCALE_MAPPINGS: mappings,
SHAKA_LOCALES_PREBUNDLED: preloaded,
SHAKA_LOCALES_TO_BE_BUNDLED: toBeBundled
}
}

module.exports = getShakaLocales()
135 changes: 135 additions & 0 deletions _scripts/patchShaka.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,135 @@
// This script fixes shaka not exporting its type definitions and referencing remote google fonts in its CSS
// by adding an export line to the type definitions and downloading the fonts and updating the CSS to point to the local files
// this script only makes changes if they are needed, so running it multiple times doesn't cause any problems

import { appendFileSync, closeSync, ftruncateSync, openSync, readFileSync, writeFileSync, writeSync } from 'fs'
import { resolve } from 'path'

const SHAKA_DIST_DIR = resolve(import.meta.dirname, '../node_modules/shaka-player/dist')

function fixTypes() {
let fixedTypes = false

let fileHandleNormal
try {
fileHandleNormal = openSync(`${SHAKA_DIST_DIR}/shaka-player.ui.d.ts`, 'a+')

const contents = readFileSync(fileHandleNormal, 'utf-8')

// This script is run after every `yarn install`, even if shaka-player wasn't updated
// So we want to check first, if we actually need to make any changes
// or if the ones from the previous run are still intact
if (!contents.includes('export default shaka')) {
appendFileSync(fileHandleNormal, 'export default shaka;\n')

fixedTypes = true
}
} finally {
if (typeof fileHandleNormal !== 'undefined') {
closeSync(fileHandleNormal)
}
}

let fileHandleDebug
try {
fileHandleDebug = openSync(`${SHAKA_DIST_DIR}/shaka-player.ui.debug.d.ts`, 'a+')

const contents = readFileSync(fileHandleDebug, 'utf-8')

// This script is run after every `yarn install`, even if shaka-player wasn't updated
// So we want to check first, if we actually need to make any changes
// or if the ones from the previous run are still intact
if (!contents.includes('export default shaka')) {
appendFileSync(fileHandleDebug, 'export default shaka;\n')

fixedTypes = true
}
} finally {
if (typeof fileHandleDebug !== 'undefined') {
closeSync(fileHandleDebug)
}
}

if (fixedTypes) {
console.log('Fixed shaka-player types')
}
}

async function removeRobotoFont() {
let cssFileHandle
try {
cssFileHandle = openSync(`${SHAKA_DIST_DIR}/controls.css`, 'r+')

let cssContents = readFileSync(cssFileHandle, 'utf-8')

const beforeReplacement = cssContents.length
cssContents = cssContents.replace(/@font-face\{font-family:Roboto;[^}]+\}/, '')

if (cssContents.length !== beforeReplacement) {
ftruncateSync(cssFileHandle)
writeSync(cssFileHandle, cssContents, 0, 'utf-8')

console.log('Removed shaka-player Roboto font, so it uses ours')
}
} finally {
if (typeof cssFileHandle !== 'undefined') {
closeSync(cssFileHandle)
}
}
}

async function replaceAndDownloadMaterialIconsFont() {
let cssFileHandle
try {
cssFileHandle = openSync(`${SHAKA_DIST_DIR}/controls.css`, 'r+')

let cssContents = readFileSync(cssFileHandle, 'utf-8')

const fontFaceRegex = /@font-face{font-family:'Material Icons Round'[^}]+format\('opentype'\)}/

if (fontFaceRegex.test(cssContents)) {
const cssResponse = await fetch('https://fonts.googleapis.com/icon?family=Material+Icons+Round', {
headers: {
// Without the user-agent it returns the otf file instead of the woff2 one
'user-agent': 'Firefox/125.0'
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not super important since it is only ran for developers but maybe we could include this in another file so we can keep it up to date (doesn't need to be changed for this PR imo)

}
})

const text = await cssResponse.text()

let newFontCSS = text.match(/(@font-face\s*{[^}]+})/)[1].replaceAll('\n', '')


const urlMatch = newFontCSS.match(/https:\/\/fonts\.gstatic\.com\/s\/materialiconsround\/(?<version>[^\/]+)\/[^.]+\.(?<extension>[\w]+)/)

const url = urlMatch[0]
const { version, extension } = urlMatch.groups

const fontResponse = await fetch(url)
const fontContent = new Uint8Array(await fontResponse.arrayBuffer())

const filename = `shaka-materialiconsround-${version}.${extension}`
writeFileSync(`${SHAKA_DIST_DIR}/${filename}`, fontContent)

newFontCSS = newFontCSS.replace(url, `./${filename}`)

cssContents = cssContents.replace(fontFaceRegex, newFontCSS)

ftruncateSync(cssFileHandle)
writeSync(cssFileHandle, cssContents, 0, 'utf-8')

console.log('Changed shaka-player Material Icons Rounded font to use the smaller woff2 format instead of otf')
console.log('Downloaded shaka-player Material Icons Rounded font')
}
} catch (e) {
console.error(e)
} finally {
if (typeof cssFileHandle !== 'undefined') {
closeSync(cssFileHandle)
}
}
}

fixTypes()
await removeRobotoFont()
await replaceAndDownloadMaterialIconsFont()
37 changes: 31 additions & 6 deletions _scripts/webpack.renderer.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@ const MiniCssExtractPlugin = require('mini-css-extract-plugin')
const CssMinimizerPlugin = require('css-minimizer-webpack-plugin')
const ProcessLocalesPlugin = require('./ProcessLocalesPlugin')
const CopyWebpackPlugin = require('copy-webpack-plugin')
const {
SHAKA_LOCALE_MAPPINGS,
SHAKA_LOCALES_PREBUNDLED,
SHAKA_LOCALES_TO_BE_BUNDLED
} = require('./getShakaLocales')

const isDevMode = process.env.NODE_ENV === 'development'

Expand Down Expand Up @@ -122,7 +127,9 @@ const config = {
'process.env.SUPPORTS_LOCAL_API': true,
'process.env.LOCALE_NAMES': JSON.stringify(processLocalesPlugin.localeNames),
'process.env.GEOLOCATION_NAMES': JSON.stringify(readdirSync(path.join(__dirname, '..', 'static', 'geolocations')).map(filename => filename.replace('.json', ''))),
'process.env.SWIPER_VERSION': `'${swiperVersion}'`
'process.env.SWIPER_VERSION': `'${swiperVersion}'`,
'process.env.SHAKA_LOCALE_MAPPINGS': JSON.stringify(SHAKA_LOCALE_MAPPINGS),
'process.env.SHAKA_LOCALES_PREBUNDLED': JSON.stringify(SHAKA_LOCALES_PREBUNDLED)
}),
new HtmlWebpackPlugin({
excludeChunks: ['processTaskWorker'],
Expand All @@ -143,7 +150,21 @@ const config = {
transformAll: (assets) => {
return Buffer.concat(assets.map(asset => asset.data))
}
}
},
// Don't need to copy them in dev mode,
// as we configure WebpackDevServer to serve them
...(isDevMode ? [] : [
{
from: path.join(__dirname, '../node_modules/shaka-player/ui/locales', `{${SHAKA_LOCALES_TO_BE_BUNDLED.join(',')}}.json`).replaceAll('\\', '/'),
to: path.join(__dirname, '../dist/static/shaka-player-locales'),
context: path.join(__dirname, '../node_modules/shaka-player/ui/locales'),
transform: {
transformer: (input) => {
return JSON.stringify(JSON.parse(input.toString('utf-8')))
}
}
}
])
]
})
],
Expand All @@ -156,14 +177,18 @@ const config = {

'youtubei.js$': 'youtubei.js/web',

// video.js's mpd-parser uses @xmldom/xmldom so that it can support both node and web browsers
// as FreeTube only runs in electron and web browsers we can use the native DOMParser class, instead of the "polyfill"
// https://caniuse.com/mdn-api_domparser
'@xmldom/xmldom$': path.resolve(__dirname, '_domParser.js')
// change to "shaka-player.ui.debug.js" to get debug logs (update jsconfig to get updated types)
'shaka-player$': 'shaka-player/dist/shaka-player.ui.js',
},
extensions: ['.js', '.vue']
},
target: 'electron-renderer',
}

if (isDevMode) {
// hack to pass it through to the dev-runner.js script
// gets removed there before the config object is passed to webpack
config.SHAKA_LOCALES_TO_BE_BUNDLED = SHAKA_LOCALES_TO_BE_BUNDLED
}

module.exports = config
Loading