No audio/sound at all in snap version
Describe the bug Audio does not play at all on the snap version of codium. It plays normally on the flathub version.
Please confirm that this problem is VSCodium-specific
- This bug doesn't happen in the flathub version of Microsoft's Visual Studio Code either.
- I don't know if it happens in the snap version of MS VSCode (I won't install it) but some issues seem to indicate it happens:
- https://github.com/microsoft/vscode/issues/179385
- https://github.com/microsoft/vscode/issues/229786.
Please confirm that the issue/resolution isn't already documented
- [x] I checked the Docs page and the Troubleshooting page and my issue is not mentioned there.
To Reproduce Just open some music file e.g. .mp3, .ogg in the IDE and click play in the widget.
Alternatively, open the developer tools and paste this in the console to play a beep:
const audioContext = new AudioContext();
const oscillator = audioContext.createOscillator();
oscillator.type = 'sine';
oscillator.frequency.value = 440;
oscillator.connect(audioContext.destination);
oscillator.start();
setTimeout(() => { oscillator.stop(); }, 1000);
Expected behavior You get audio normally (music or the beep).
Desktop (please complete the following information):
- OS: Kubuntu 24.04
- Architecture: x64
- Version: 1.96.2
- App Manager: Snap
- Sandboxed: no? Snap was installed with
--classic
Additional context
$ snap connections codium
# shows nothing
$ snap info codium
name: codium
summary: Code editing. Redefined.
publisher: VSCodium
store-url: https://snapcraft.io/codium
contact: https://github.com/VSCodium/vscodium/issues
license: unset
description: |
Binary releases of Visual Studio Code without branding/telemetry/licensing
commands:
- codium
- codium.url-handler
snap-id: lIZWXTqmo6LFSts5Cgk2VPlNwtysZAeH
tracking: latest/stable
refresh-date: 9 days ago, at 14:21 -03
channels:
latest/stable: 1.96.2.24355 2024-12-21 (436) 321MB classic
latest/candidate: ^
latest/beta: ^
latest/edge: 1.95.3.24321 2024-11-16 (428) 320MB classic
installed: 1.96.2.24355 (436) 321MB classic
I thinks it's a permission issue.
Have you tried snap connect codium:audio-playback?
It seems like it would need the following in the snapcraft.yaml:
apps:
codium:
plugs:
- audio-playback
I think I can't even try it without the changes in snapcraft, unless there's another way?
$ sudo snap connect codium:audio-playback
error: snap "codium" has no plug named "audio-playback"
+1, I have the exact same issue. Got the same error of no plug.
It doesn't work! It won't publish because snap doesn't allow slots/plugs in classic confinement. (https://launchpad.net/bugs/1655369)
Errors
------
- lint-snap-v2:confinement_classic_with_interfaces
confinement 'classic' not allowed with plugs/slots
https://launchpad.net/bugs/1655369
codium_1.97.1.[25](https://github.com/VSCodium/vscodium/actions/runs/13312119161/job/37177884081#step:7:26)044_amd64.snap: FAIL
Error: The process '/snap/bin/review-tools.snap-review' failed with exit code 2
https://github.com/VSCodium/vscodium/actions/runs/13312119161/job/37177884081
Just checked v1.97.1 (snap) and audio is working for me! I tested a .ogg file and the code above in the devtools.
I'm curious, how did you solve it @daiyam ? Or did something change upstream?
Unless running that snap connect command solved it for me despite the error or something? Can someone else that didn't run this command confirm that audio works now?
No, I haven't changed anything...
OK, I have no idea what is going on. Sometimes the audio just works, sometimes it just doesn't. I can't understand if there is any pattern, like another app (such as Godot) using audio too or something. Or that web behavior of "you have to click the page first to play audio" (doesn't seem to be the case? or at least in any consistent pattern?)
In any case it doesn't seem to be a snap permission issue. In fact, I'm not even sure anymore that is necessarily snap-specific... that would require extensive testing...
This issue has been automatically marked as stale. If this issue is still affecting you, please leave any comment, and we'll keep it open. If you have any new additional information, please include it with your comment!
This issue has been closed due to inactivity, and will not be monitored. If this is a bug and you can reproduce this issue, please open a new issue.