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

fix: cap level controller import in cjs build #1045

Merged
merged 1 commit into from
Dec 17, 2024

Conversation

luwes
Copy link
Contributor

@luwes luwes commented Dec 17, 2024

CapLevelController doesn't seem to be exported directly in the CJS bundle,
https://cdn.jsdelivr.net/npm/hls.js@1.5.17/dist/hls.js

See in
https://cdn.jsdelivr.net/npm/@mux/playback-core@0.28.0/dist/index.cjs.js

var ye=require("hls.js"),Z=class Z extends ye.CapLevelController{constructor(t){super(t)}get levels(){var t;return(t=this.hls.levels)!=null?t:[]}getValidLevels(t){return this.levels.filter((r,n)=>this.isLevelAllowed(r)&&n<=t)}getMaxLevel(t){let r=super.getMaxLevel(t),n=this.getValidLevels(t);if(!n[r])return r;let o=Math.min(n[r].width,n[r].height),a=Z.minMaxResolution;return o>=a?r:ye.CapLevelController.getMaxLevelByMediaSize(n,a*(16/9),a)}};Z.minMaxRe
SCR-20241217-lobb

@luwes luwes self-assigned this Dec 17, 2024
@luwes luwes requested a review from a team as a code owner December 17, 2024 19:52
Copy link

vercel bot commented Dec 17, 2024

@luwes is attempting to deploy a commit to the Mux Team on Vercel.

A member of the Team first needs to authorize it.

Copy link

vercel bot commented Dec 17, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
elements-demo-astro ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 17, 2024 8:01pm
elements-demo-create-react-app ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 17, 2024 8:01pm
elements-demo-nextjs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 17, 2024 8:01pm
elements-demo-svelte-kit ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 17, 2024 8:01pm
elements-demo-vanilla ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 17, 2024 8:01pm
elements-demo-vue ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 17, 2024 8:01pm

@luwes luwes merged commit 23045a3 into muxinc:main Dec 17, 2024
12 checks passed
@luwes luwes deleted the fix-cap-level-controller-import branch December 17, 2024 20:08
@github-actions github-actions bot mentioned this pull request Dec 17, 2024
luwes pushed a commit that referenced this pull request Dec 17, 2024
🤖 I have created a release *beep* *boop*
---


<details><summary>@mux/mux-audio: 0.15.1</summary>

##
[0.15.1](https://github.com/muxinc/elements/compare/@mux/mux-audio@0.15.0...@mux/mux-audio@0.15.1)
(2024-12-17)


### Dependencies

* The following workspace dependencies were updated
  * dependencies
    * @mux/playback-core bumped from 0.28.0 to 0.28.1
</details>

<details><summary>@mux/mux-audio-react: 0.12.1</summary>

##
[0.12.1](https://github.com/muxinc/elements/compare/@mux/mux-audio-react@0.12.0...@mux/mux-audio-react@0.12.1)
(2024-12-17)


### Dependencies

* The following workspace dependencies were updated
  * dependencies
    * @mux/playback-core bumped from 0.28.0 to 0.28.1
</details>

<details><summary>@mux/mux-player: 3.2.1</summary>

##
[3.2.1](https://github.com/muxinc/elements/compare/@mux/mux-player@3.2.0...@mux/mux-player@3.2.1)
(2024-12-17)


### Dependencies

* The following workspace dependencies were updated
  * dependencies
    * @mux/mux-video bumped from 0.23.0 to 0.23.1
    * @mux/playback-core bumped from 0.28.0 to 0.28.1
</details>

<details><summary>@mux/mux-player-react: 3.2.1</summary>

##
[3.2.1](https://github.com/muxinc/elements/compare/@mux/mux-player-react@3.2.0...@mux/mux-player-react@3.2.1)
(2024-12-17)


### Dependencies

* The following workspace dependencies were updated
  * dependencies
    * @mux/mux-player bumped from 3.2.0 to 3.2.1
    * @mux/playback-core bumped from 0.28.0 to 0.28.1
</details>

<details><summary>@mux/mux-video: 0.23.1</summary>

##
[0.23.1](https://github.com/muxinc/elements/compare/@mux/mux-video@0.23.0...@mux/mux-video@0.23.1)
(2024-12-17)


### Dependencies

* The following workspace dependencies were updated
  * dependencies
    * @mux/playback-core bumped from 0.28.0 to 0.28.1
</details>

<details><summary>@mux/mux-video-react: 0.13.1</summary>

##
[0.13.1](https://github.com/muxinc/elements/compare/@mux/mux-video-react@0.13.0...@mux/mux-video-react@0.13.1)
(2024-12-17)


### Dependencies

* The following workspace dependencies were updated
  * dependencies
    * @mux/playback-core bumped from 0.28.0 to 0.28.1
</details>

<details><summary>@mux/playback-core: 0.28.1</summary>

##
[0.28.1](https://github.com/muxinc/elements/compare/@mux/playback-core@0.28.0...@mux/playback-core@0.28.1)
(2024-12-17)


### Bug Fixes

* cap level controller import in cjs build
([#1045](#1045))
([23045a3](23045a3))
</details>

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant