From 43fa978b8b300fb9bc6b3369dfe05f378f2cddc4 Mon Sep 17 00:00:00 2001 From: Tom Jenkinson Date: Wed, 22 Nov 2023 18:39:36 +0000 Subject: [PATCH] Run prettier --- build-config.js | 4 ++-- demo/chart/chartjs-horizontal-bar.ts | 8 ++++---- demo/main.js | 4 ++-- src/controller/abr-controller.ts | 8 ++++---- src/controller/base-playlist-controller.ts | 4 ++-- src/loader/playlist-loader.ts | 4 ++-- src/utils/mp4-tools.ts | 4 ++-- src/utils/vttparser.ts | 4 ++-- 8 files changed, 20 insertions(+), 20 deletions(-) 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/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; }