diff --git a/examples/vanilla-ts-esm/public/mux-player-theme-classic.html b/examples/vanilla-ts-esm/public/mux-player-theme-classic.html
index e97c9327b..b892571e0 100644
--- a/examples/vanilla-ts-esm/public/mux-player-theme-classic.html
+++ b/examples/vanilla-ts-esm/public/mux-player-theme-classic.html
@@ -47,7 +47,8 @@
diff --git a/examples/vanilla-ts-esm/public/mux-player.html b/examples/vanilla-ts-esm/public/mux-player.html
index 4144e5753..c1ac814f6 100644
--- a/examples/vanilla-ts-esm/public/mux-player.html
+++ b/examples/vanilla-ts-esm/public/mux-player.html
@@ -44,7 +44,8 @@
>
diff --git a/package.json b/package.json
index bb01877c4..2427b2b9d 100644
--- a/package.json
+++ b/package.json
@@ -16,7 +16,7 @@
"lerna": "^4.0.0",
"prettier": "^2.3.2",
"pretty-quick": "^3.1.1",
- "turbo": "^1.11.0"
+ "turbo": "^1.11.2"
},
"workspaces": [
"packages/*",
diff --git a/packages/mux-player/scripts/build-themes.mjs b/packages/mux-player/scripts/build-themes.mjs
index be12938f0..bb0f98ee9 100644
--- a/packages/mux-player/scripts/build-themes.mjs
+++ b/packages/mux-player/scripts/build-themes.mjs
@@ -26,12 +26,11 @@ for (const theme of themes) {
outdir: `./dist/themes/${theme}`,
};
+ await esbuild.build(esm);
+
if (devMode) {
const context = await esbuild.context(esm);
- await context.rebuild();
await context.watch();
- } else {
- await esbuild.build(esm);
}
//@ts-ignore
@@ -43,12 +42,11 @@ for (const theme of themes) {
outdir: `./dist/themes/${theme}`,
};
+ await esbuild.build(cjs);
+
if (devMode) {
const context = await esbuild.context(cjs);
- await context.rebuild();
await context.watch();
- } else {
- await esbuild.build(cjs);
}
//@ts-ignore
@@ -60,11 +58,10 @@ for (const theme of themes) {
outdir: `./dist/themes/${theme}`,
};
+ await esbuild.build(iife);
+
if (devMode) {
const context = await esbuild.context(iife);
- await context.rebuild();
await context.watch();
- } else {
- await esbuild.build(iife);
}
}
diff --git a/packages/mux-player/src/index.ts b/packages/mux-player/src/index.ts
index 0c0056ac0..d54930b88 100644
--- a/packages/mux-player/src/index.ts
+++ b/packages/mux-player/src/index.ts
@@ -684,7 +684,14 @@ class MuxPlayerElement extends VideoApiElement implements MuxPlayerElement {
// NOTE: For now, since we are continuing support of the deprecated stream types (namely, "dvr" types) and not advertising the
// new APIs such as `targetLiveWindow`/`target-live-window`, we will (presumpuously) update the `targetLiveWindow` based on the
// stream type (CJP).
- this.targetLiveWindow = newValue === StreamTypes.LIVE ? 0 : Number.NaN;
+ if (newValue === StreamTypes.LIVE) {
+ // Don't override if the user has already set a value.
+ if (this.getAttribute(PlayerAttributes.TARGET_LIVE_WINDOW) == null) {
+ this.targetLiveWindow = 0;
+ }
+ } else {
+ this.targetLiveWindow = Number.NaN;
+ }
}
}
}
@@ -1382,7 +1389,7 @@ class MuxPlayerElement extends VideoApiElement implements MuxPlayerElement {
set targetLiveWindow(val: number | undefined) {
// don't cause an infinite loop and avoid change event dispatching
- if (val == this.targetLiveWindow) return;
+ if (val == this.targetLiveWindow || (Number.isNaN(val) && Number.isNaN(this.targetLiveWindow))) return;
if (val == null) {
this.removeAttribute(PlayerAttributes.TARGET_LIVE_WINDOW);
diff --git a/packages/playback-core/src/util.ts b/packages/playback-core/src/util.ts
index 108b2dd28..57a96837f 100644
--- a/packages/playback-core/src/util.ts
+++ b/packages/playback-core/src/util.ts
@@ -41,7 +41,7 @@ export function inSeekableRange(seekable: TimeRanges, duration: number, time: nu
if (duration && time > duration) {
time = duration;
}
- for (let i = 0; i < seekable.length ?? 0; i++) {
+ for (let i = 0; i < seekable.length; i++) {
if (seekable.start(i) <= time && seekable.end(i) >= time) {
return true;
}
diff --git a/scripts/esbuilder/esbuilder.js b/scripts/esbuilder/esbuilder.js
index 5ba75d8ef..1b1b41928 100755
--- a/scripts/esbuilder/esbuilder.js
+++ b/scripts/esbuilder/esbuilder.js
@@ -84,10 +84,9 @@ if (esmScriptModule) {
options.format = 'esm';
}
+await esbuild.build(options);
+
if (args.watch) {
const context = await esbuild.context(options);
- await context.rebuild();
await context.watch();
-} else {
- await esbuild.build(options);
}
diff --git a/yarn.lock b/yarn.lock
index f9d0d3a7f..fa3796162 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -14687,47 +14687,47 @@ tunnel-agent@^0.6.0:
dependencies:
safe-buffer "^5.0.1"
-turbo-darwin-64@1.11.0:
- version "1.11.0"
- resolved "https://registry.yarnpkg.com/turbo-darwin-64/-/turbo-darwin-64-1.11.0.tgz#a3c62e833b83ae769c13e8b1f0814d3b111c471e"
- integrity sha512-yLDeJ7QgpI1Niw87ydRNvygX67Dra+6MnxR88vwXnQJKsmHTKycBhY9w3Bhe5xvnIg4JoEWoEF5EJtw6ShrlEw==
-
-turbo-darwin-arm64@1.11.0:
- version "1.11.0"
- resolved "https://registry.yarnpkg.com/turbo-darwin-arm64/-/turbo-darwin-arm64-1.11.0.tgz#29ace24b724fce44422c7d447337779cbb50ca15"
- integrity sha512-lZGlfTG6+u3R7+6eVY9j/07WpVF/tx8UNkmRWfMNt4ZGSEBMg6A+Vimvp+rni92WdPhD/rhxv+qYI/kco9hNXg==
-
-turbo-linux-64@1.11.0:
- version "1.11.0"
- resolved "https://registry.yarnpkg.com/turbo-linux-64/-/turbo-linux-64-1.11.0.tgz#bc7b78924ddae107a2066004aace925f1f8ddfbe"
- integrity sha512-I88/WieHzTZ8V2y0j79RSjVERPp0IJTynTwLi7ddYX0PahkuyaHs1p8ktFMcs6awnJMeT6spaXlyzv5ZxnAdkg==
-
-turbo-linux-arm64@1.11.0:
- version "1.11.0"
- resolved "https://registry.yarnpkg.com/turbo-linux-arm64/-/turbo-linux-arm64-1.11.0.tgz#13be0290136b83540eeaf1704dc6dc3a22c50cf9"
- integrity sha512-jHsKuTFa7KwrA/FIxOnyXnfSEgDEUv0UVcseqQhP0VbdL+En93ZdBZ9S9/lI6VWooXrCqPooBmC+M/6jmwY/Ig==
-
-turbo-windows-64@1.11.0:
- version "1.11.0"
- resolved "https://registry.yarnpkg.com/turbo-windows-64/-/turbo-windows-64-1.11.0.tgz#750f1cf49fa6e235c7a5fca17224aaad453131e7"
- integrity sha512-7u/1GoMallGDOTg4fnKoJmvBkf2pUCOcA0Z7NbwFB6GOa7q1Su4AaPs6Iy6Tyqrmj3vDHKSXByHwfz+o0cng/g==
-
-turbo-windows-arm64@1.11.0:
- version "1.11.0"
- resolved "https://registry.yarnpkg.com/turbo-windows-arm64/-/turbo-windows-arm64-1.11.0.tgz#7e18c948cfabf695a089aa376e202e4241b2d897"
- integrity sha512-39MNaZ7RnbINEnpeAfB++fmH6p99RhbeeC8n2IXqG61Zrck5AA59Jm8DXpfOGR6Im93iHXSDox8qF3bb8V4amQ==
-
-turbo@^1.11.0:
- version "1.11.0"
- resolved "https://registry.yarnpkg.com/turbo/-/turbo-1.11.0.tgz#8212cd50f89858ecbc69f3fee5d1b68e0b64a6bf"
- integrity sha512-zIqJs/x1zzIIdwufhk80o7cQc9fIdHdweWRNXbK+Vjf9IaM2eSslcYyo40s+Kg/oiIOpdLM8hV7IUQst8KIyDA==
+turbo-darwin-64@1.11.2:
+ version "1.11.2"
+ resolved "https://registry.yarnpkg.com/turbo-darwin-64/-/turbo-darwin-64-1.11.2.tgz#fc3d4d74b325a27aef11b6a52a61f07d466846b9"
+ integrity sha512-toFmRG/adriZY3hOps7nYCfqHAS+Ci6xqgX3fbo82kkLpC6OBzcXnleSwuPqjHVAaRNhVoB83L5njcE9Qwi2og==
+
+turbo-darwin-arm64@1.11.2:
+ version "1.11.2"
+ resolved "https://registry.yarnpkg.com/turbo-darwin-arm64/-/turbo-darwin-arm64-1.11.2.tgz#583a4d0025bc3f953a9eeb7065cb173f481a9965"
+ integrity sha512-FCsEDZ8BUSFYEOSC3rrARQrj7x2VOrmVcfrMUIhexTxproRh4QyMxLfr6LALk4ymx6jbDCxWa6Szal8ckldFbA==
+
+turbo-linux-64@1.11.2:
+ version "1.11.2"
+ resolved "https://registry.yarnpkg.com/turbo-linux-64/-/turbo-linux-64-1.11.2.tgz#55ef996d856cb397b9fb2855a554ccef1cee9dd7"
+ integrity sha512-Vzda/o/QyEske5CxLf0wcu7UUS+7zB90GgHZV4tyN+WZtoouTvbwuvZ3V6b5Wgd3OJ/JwWR0CXDK7Sf4VEMr7A==
+
+turbo-linux-arm64@1.11.2:
+ version "1.11.2"
+ resolved "https://registry.yarnpkg.com/turbo-linux-arm64/-/turbo-linux-arm64-1.11.2.tgz#64d6093c9a2f32f410624564fd10685c847d947e"
+ integrity sha512-bRLwovQRz0yxDZrM4tQEAYV0fBHEaTzUF0JZ8RG1UmZt/CqtpnUrJpYb1VK8hj1z46z9YehARpYCwQ2K0qU4yw==
+
+turbo-windows-64@1.11.2:
+ version "1.11.2"
+ resolved "https://registry.yarnpkg.com/turbo-windows-64/-/turbo-windows-64-1.11.2.tgz#f4164be9c42796c86ca3929e27f1992a4310b9ed"
+ integrity sha512-LgTWqkHAKgyVuLYcEPxZVGPInTjjeCnN5KQMdJ4uQZ+xMDROvMFS2rM93iQl4ieDJgidwHCxxCxaU9u8c3d/Kg==
+
+turbo-windows-arm64@1.11.2:
+ version "1.11.2"
+ resolved "https://registry.yarnpkg.com/turbo-windows-arm64/-/turbo-windows-arm64-1.11.2.tgz#ca1b4d7ac6fe8c931baef1a270ac07bbd924277b"
+ integrity sha512-829aVBU7IX0c/B4G7g1VI8KniAGutHhIupkYMgF6xPkYVev2G3MYe6DMS/vsLt9GGM9ulDtdWxWrH5P2ngK8IQ==
+
+turbo@^1.11.2:
+ version "1.11.2"
+ resolved "https://registry.yarnpkg.com/turbo/-/turbo-1.11.2.tgz#7bae6df12c210e9b12973aad8f0e7b077039d4ce"
+ integrity sha512-jPC7LVQJzebs5gWf8FmEvsvXGNyKbN+O9qpvv98xpNaM59aS0/Irhd0H0KbcqnXfsz7ETlzOC3R+xFWthC4Z8A==
optionalDependencies:
- turbo-darwin-64 "1.11.0"
- turbo-darwin-arm64 "1.11.0"
- turbo-linux-64 "1.11.0"
- turbo-linux-arm64 "1.11.0"
- turbo-windows-64 "1.11.0"
- turbo-windows-arm64 "1.11.0"
+ turbo-darwin-64 "1.11.2"
+ turbo-darwin-arm64 "1.11.2"
+ turbo-linux-64 "1.11.2"
+ turbo-linux-arm64 "1.11.2"
+ turbo-windows-64 "1.11.2"
+ turbo-windows-arm64 "1.11.2"
tweetnacl@^0.14.3, tweetnacl@~0.14.0:
version "0.14.5"