diff --git a/build-config.js b/build-config.js index ad3fb6dadc4..22182676c89 100644 --- a/build-config.js +++ b/build-config.js @@ -266,8 +266,8 @@ const buildRollupConfig = ({ file: outputFile ? outputFile : minified - ? `./dist/${outputName}.min.${extension}` - : `./dist/${outputName}.${extension}`, + ? `./dist/${outputName}.min.${extension}` + : `./dist/${outputName}.${extension}`, format, banner: shouldBundleWorker(format) ? workerFnBanner : null, footer: shouldBundleWorker(format) ? workerFnFooter : null, diff --git a/demo/chart/chartjs-horizontal-bar.ts b/demo/chart/chartjs-horizontal-bar.ts index 1b0f835e6e1..3c36125505b 100644 --- a/demo/chart/chartjs-horizontal-bar.ts +++ b/demo/chart/chartjs-horizontal-bar.ts @@ -19,14 +19,14 @@ Chart.controllers.horizontalBar.prototype.calculateBarValuePixels = function ( value.start === undefined ? 0 : value.max >= 0 && value.min >= 0 - ? value.min - : value.max; + ? value.min + : value.max; const length = value.start === undefined ? value.end : value.max >= 0 && value.min >= 0 - ? value.max - value.min - : value.min - value.max; + ? value.max - value.min + : value.min - value.max; const base = scale.getPixelForValue(start); const head = scale.getPixelForValue(start + length); const size = head - base; diff --git a/demo/main.js b/demo/main.js index 286be542149..f3d7b2235ff 100644 --- a/demo/main.js +++ b/demo/main.js @@ -1465,8 +1465,8 @@ function getURLParam(sParam, defaultValue) { return sParameterName[1] === 'undefined' ? undefined : sParameterName[1] === 'false' - ? false - : sParameterName[1]; + ? false + : sParameterName[1]; } } return defaultValue; diff --git a/package-lock.json b/package-lock.json index 4102c70b9b9..6f43accd9f7 100644 --- a/package-lock.json +++ b/package-lock.json @@ -63,7 +63,7 @@ "mocha": "10.2.0", "node-fetch": "3.3.2", "npm-run-all": "4.1.5", - "prettier": "3.0.3", + "prettier": "3.1.0", "promise-polyfill": "8.3.0", "rollup": "3.29.4", "rollup-plugin-istanbul": "4.0.0", @@ -10406,9 +10406,9 @@ } }, "node_modules/prettier": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.0.3.tgz", - "integrity": "sha512-L/4pUDMxcNa8R/EthV08Zt42WBO4h1rarVtK0K+QJG0X187OLo7l699jWw0GKuwzkPQ//jMFA/8Xm6Fh3J/DAg==", + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.1.0.tgz", + "integrity": "sha512-TQLvXjq5IAibjh8EpBIkNKxO749UEWABoiIZehEPiY4GNpVdhaFKqSTu+QrlU6D2dPAfubRmtJTi4K4YkQ5eXw==", "dev": true, "bin": { "prettier": "bin/prettier.cjs" @@ -20680,9 +20680,9 @@ "dev": true }, "prettier": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.0.3.tgz", - "integrity": "sha512-L/4pUDMxcNa8R/EthV08Zt42WBO4h1rarVtK0K+QJG0X187OLo7l699jWw0GKuwzkPQ//jMFA/8Xm6Fh3J/DAg==", + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.1.0.tgz", + "integrity": "sha512-TQLvXjq5IAibjh8EpBIkNKxO749UEWABoiIZehEPiY4GNpVdhaFKqSTu+QrlU6D2dPAfubRmtJTi4K4YkQ5eXw==", "dev": true }, "printable-characters": { diff --git a/package.json b/package.json index 60d1a135963..8f64eafe915 100644 --- a/package.json +++ b/package.json @@ -117,7 +117,7 @@ "mocha": "10.2.0", "node-fetch": "3.3.2", "npm-run-all": "4.1.5", - "prettier": "3.0.3", + "prettier": "3.1.0", "promise-polyfill": "8.3.0", "rollup": "3.29.4", "rollup-plugin-istanbul": "4.0.0", diff --git a/src/controller/abr-controller.ts b/src/controller/abr-controller.ts index 90a576658aa..e974527fb87 100644 --- a/src/controller/abr-controller.ts +++ b/src/controller/abr-controller.ts @@ -504,8 +504,8 @@ class AbrController implements AbrComponentAPI { const currentFragDuration = partCurrent ? partCurrent.duration : fragCurrent - ? fragCurrent.duration - : 0; + ? fragCurrent.duration + : 0; // playbackRate is the absolute value of the playback rate; if media.playbackRate is 0, we use 1 to load as // if we're playing back at the normal rate. @@ -647,8 +647,8 @@ class AbrController implements AbrComponentAPI { const currentFragDuration = partCurrent ? partCurrent.duration : fragCurrent - ? fragCurrent.duration - : 0; + ? fragCurrent.duration + : 0; const ttfbEstimateSec = this.bwEstimator.getEstimateTTFB() / 1000; const levelsSkipped: number[] = []; diff --git a/src/controller/base-playlist-controller.ts b/src/controller/base-playlist-controller.ts index beea1d2f18f..dde6a5f7fe7 100644 --- a/src/controller/base-playlist-controller.ts +++ b/src/controller/base-playlist-controller.ts @@ -152,8 +152,8 @@ export default class BasePlaylistController implements NetworkComponentAPI { details.advanced ? 'REFRESHED ' + details.lastPartSn + '-' + details.lastPartIndex : details.updated - ? 'UPDATED' - : 'MISSED' + ? 'UPDATED' + : 'MISSED' }`, ); } diff --git a/src/loader/playlist-loader.ts b/src/loader/playlist-loader.ts index 59c93d71eb9..31968125a49 100644 --- a/src/loader/playlist-loader.ts +++ b/src/loader/playlist-loader.ts @@ -457,8 +457,8 @@ class PlaylistLoader implements NetworkComponentAPI { const levelId = Number.isFinite(level as number) ? (level as number) : Number.isFinite(id as number) - ? (id as number) - : 0; + ? (id as number) + : 0; const levelType = mapContextToLevelType(context); const levelDetails: LevelDetails = M3U8Parser.parseLevelPlaylist( response.data as string, diff --git a/src/utils/mp4-tools.ts b/src/utils/mp4-tools.ts index 2d132002a66..6861e48f7e4 100644 --- a/src/utils/mp4-tools.ts +++ b/src/utils/mp4-tools.ts @@ -382,8 +382,8 @@ function parseStsd(stsd: Uint8Array): { codec: string; encrypted: boolean } { ? 12 : 10 : highBitDepth - ? 10 - : 8; + ? 10 + : 8; const monochrome = (av1CBox[2] & 0x10) >> 4; const chromaSubsamplingX = (av1CBox[2] & 0x08) >> 3; const chromaSubsamplingY = (av1CBox[2] & 0x04) >> 2; diff --git a/src/utils/vttparser.ts b/src/utils/vttparser.ts index 3bc0e9ab615..248b3415684 100644 --- a/src/utils/vttparser.ts +++ b/src/utils/vttparser.ts @@ -221,8 +221,8 @@ function parseCue(input: string, cue: VTTCue, regionList: Region[]) { cue.align === 'start' || cue.align === 'left' ? 0 : cue.align === 'end' || cue.align === 'right' - ? 100 - : 50; + ? 100 + : 50; } cue.position = position; }