Skip to content

Commit

Permalink
fix: ts error due to duplicate same dependency
Browse files Browse the repository at this point in the history
  • Loading branch information
luwes committed Dec 4, 2023
1 parent 9fd9978 commit 3c78fd8
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 8 deletions.
2 changes: 1 addition & 1 deletion packages/mux-video/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@
"@mux/playback-core": "0.21.0",
"castable-video": "0.5.2",
"custom-media-element": "0.2.0",
"media-tracks": ">=0.2.3"
"media-tracks": "0.2.4"
},
"devDependencies": {
"@mux/test-esm-exports": "0.1.0",
Expand Down
1 change: 0 additions & 1 deletion packages/playback-core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,6 @@
},
"dependencies": {
"hls.js": "^1.4.10",
"media-tracks": "0.2.3",
"mux-embed": "^4.27.0"
},
"devDependencies": {
Expand Down
4 changes: 2 additions & 2 deletions packages/playback-core/src/media-tracks.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import Hls from './hls';
import type { VideoRenditionList } from 'media-tracks';

export function setupMediaTracks(
customMediaEl: HTMLMediaElement,
Expand Down Expand Up @@ -80,7 +79,8 @@ export function setupMediaTracks(
// 2. if 1 of the renditions is disabled we assume a selection was made
// and lock it to the first rendition that is enabled.
const switchRendition = (event: Event) => {
const level = (event.target as VideoRenditionList).selectedIndex;
// @ts-ignore
const level = event.target.selectedIndex as number;
if (level != hls.nextLevel) {
smoothSwitch(level);
}
Expand Down
8 changes: 4 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -10677,10 +10677,10 @@ media-chrome@~1.5.3:
resolved "https://registry.yarnpkg.com/media-chrome/-/media-chrome-1.5.3.tgz#9ce238d68d055bed39a019e65a5e331a417cb2f9"
integrity sha512-XiE29yNa9jyCMdshDLvSgXb0e/RJauMaTXT9kL9dTJmmZXz0RK+Ol/TsE2z4uO68x+rqZauoGEANUbDEyN8NLg==

media-tracks@0.2.3, media-tracks@>=0.2.3:
version "0.2.3"
resolved "https://registry.yarnpkg.com/media-tracks/-/media-tracks-0.2.3.tgz#ba9a23c45e1ee1be2acdd580f985d25b9036fff9"
integrity sha512-h5HRl1tIyeV+aF59FAmHmxChmdM/Ewf/twpxZkRme1ny46owD24uTA0BmRuPoO+uzvE0lx9ZIkZj1TbXi2VCng==
media-tracks@0.2.4:
version "0.2.4"
resolved "https://registry.yarnpkg.com/media-tracks/-/media-tracks-0.2.4.tgz#aee3bd69bdc8f246b44af5245f7b0a68d4c94540"
integrity sha512-P/TbDCYTFH5gxpQ6r99iabXOwjsFwzKRgK7wiwo64Ii6nHXYhHtwEP7A7ufmEKxkNCoHc4j3Z2hvs+lXL4wPeQ==

media-typer@0.3.0:
version "0.3.0"
Expand Down

0 comments on commit 3c78fd8

Please sign in to comment.