Skip to content

localParticipant.publish(videoTrack:) does not have sound until microphone is turned on #720

Open
@lucasfischer

Description

@lucasfischer

Describe the bug
For the macOS app I am building I want to stream the systems's audio or app's audio to other participants in the room. Currently this only seems to work when I also enable the microphone via localParticipant.setMicrophone(enabled: true).

This creates some issues for me because users should be able to use my app without giving microphone permissions.

To have at least some working solution I used the following code to mute the user's microphone and only play the app audio via screen sharing.

AudioManager.shared.mixer.micVolume = 0
AudioManager.shared.mixer.appVolume = 1.0

But this always shows the microphone indicator and means that macOS automatically ducks/turns down the system volume, which is unwanted behavior for my app.

SDK Version
2.6.0

iOS/macOS Version
macOS 15.5

Xcode Version
Xcode 16.4 w/ Swift 6.1.2

Steps to Reproduce

let track = LocalVideoTrack.createMacOSScreenShareTrack(
    source: screenShareSource,
    options: ScreenShareCaptureOptions(dimensions: .zero, fps: 0, appAudio: true)
)
screenShareTrack = try await room.localParticipant.publish(videoTrack: track)

Expected behavior
I expect to be able to stream the audio of a display or window to other participants without having to activate the microphone.

Thank you for your work on this SDK. It's very simple to use and got me up and running really fast. I acknowledge that this library seems to be more optimized for conferencing and my use-case is live-streaming. I would be thankful for your help.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions