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

feat: add audio provider #154

Merged
merged 23 commits into from
Nov 20, 2024
Merged

feat: add audio provider #154

merged 23 commits into from
Nov 20, 2024

Conversation

HolbyFPV
Copy link
Member

@HolbyFPV HolbyFPV commented Nov 17, 2024

Use

const providers = zebar.createProviderGroup({
  audio: { type: 'audio' }
})

{output.audio?.defaultPlaybackDevice?.name}
{output.audio?.defaultPlaybackDevice?.volume}

Sample output

"output": {
  "defaultPlaybackDevice": {
    "deviceId": "{0.0.0.00000000}.{799aa664-9aa0-43b1-ba2b-e571d8d82644}",
    "isDefault": true,
    "name": "Speakers (High Definition Audio Device)",
    "volume": 20
  },
  "playbackDevices": [
    {
      "deviceId": "{0.0.0.00000000}.{0dda7b4f-ee76-46c6-b06f-8a065ab8443b}",
      "isDefault": false,
      "name": "DELL P2416D (NVIDIA High Definition Audio)",
      "volume": 24
    },
    {
      "deviceId": "{0.0.0.00000000}.{53b3315a-61b1-417e-b9ea-4ab6adcd0059}",
      "isDefault": false,
      "name": "ROG PG279QM (NVIDIA High Definition Audio)",
      "volume": 37
    },
    {
      "deviceId": "{0.0.0.00000000}.{799aa664-9aa0-43b1-ba2b-e571d8d82644}",
      "isDefault": true,
      "name": "Speakers (High Definition Audio Device)",
      "volume": 20
    }
  ]
}

Closes #127. Only available on Windows.

@lars-berger lars-berger merged commit a1e18f9 into main Nov 20, 2024
7 of 8 checks passed
@lars-berger lars-berger deleted the feat/audio-provider branch November 20, 2024 13:22
Copy link

github-actions bot commented Dec 2, 2024

🎉 This PR is included in version 2.6.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: ✅ Done
Development

Successfully merging this pull request may close these issues.

[Feature Request] Volume/sound provider
2 participants