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: audio track API for 1 track #776

Merged
merged 1 commit into from
Sep 22, 2023
Merged

Conversation

luwes
Copy link
Contributor

@luwes luwes commented Sep 22, 2023

reverts a bug fix in #759

it was a good patch but it prevented the audio tracks API to be populated if there was just 1 audio track.
it's still expected that with 1 audio track, the API returns an item for video.audioTracks[0].

this change adds that back in.

the root issue in hls.js I believe was that we were trying to select an audio track with a string ID and hls.js works with numeric ID's.
this change also adds a check if hls.js audioTracks has the ID to which the player tries to switch.

@luwes luwes requested a review from a team as a code owner September 22, 2023 15:27
@luwes luwes self-assigned this Sep 22, 2023
@vercel
Copy link

vercel bot commented Sep 22, 2023

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

Name Status Preview Comments Updated (UTC)
elements-demo-create-react-app ✅ Ready (Inspect) Visit Preview 💬 Add feedback Sep 22, 2023 3:28pm
elements-demo-nextjs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Sep 22, 2023 3:28pm
elements-demo-svelte-kit ✅ Ready (Inspect) Visit Preview 💬 Add feedback Sep 22, 2023 3:28pm
elements-demo-vanilla ✅ Ready (Inspect) Visit Preview 💬 Add feedback Sep 22, 2023 3:28pm
elements-demo-vue ✅ Ready (Inspect) Visit Preview 💬 Add feedback Sep 22, 2023 3:28pm

@codecov
Copy link

codecov bot commented Sep 22, 2023

Codecov Report

Merging #776 (14e14eb) into main (bfbe4f0) will decrease coverage by 0.02%.
The diff coverage is 45.45%.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #776      +/-   ##
==========================================
- Coverage   82.18%   82.16%   -0.02%     
==========================================
  Files          40       40              
  Lines        7862     7868       +6     
  Branches      456      456              
==========================================
+ Hits         6461     6465       +4     
- Misses       1395     1397       +2     
  Partials        6        6              
Files Changed Coverage Δ
packages/playback-core/src/media-tracks.ts 15.78% <40.00%> (+1.72%) ⬆️
packages/playback-core/src/index.ts 75.89% <100.00%> (+0.03%) ⬆️

Copy link
Contributor

@cjpillsbury cjpillsbury left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👌

@luwes luwes merged commit 4222fd1 into muxinc:main Sep 22, 2023
16 of 18 checks passed
@luwes luwes deleted the llhls-audiotrack branch September 22, 2023 15:42
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.

None yet

2 participants