Skip to content

Commit

Permalink
Fix publishOptions missing when start screenSharing
Browse files Browse the repository at this point in the history
  • Loading branch information
ipavlidakis committed Dec 12, 2024
1 parent 59f87b9 commit 3c89ca9
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -197,10 +197,10 @@ final class LocalAudioMediaAdapter: LocalMediaAdapting {
func didUpdatePublishOptions(
_ publishOptions: PublishOptions
) async throws {
self.publishOptions = publishOptions.audio

guard primaryTrack.isEnabled else { return }

self.publishOptions = publishOptions.audio

for publishOption in self.publishOptions {
addOrUpdateTransceiver(
for: publishOption,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -195,13 +195,13 @@ final class LocalScreenShareMediaAdapter: LocalMediaAdapting, @unchecked Sendabl
func didUpdatePublishOptions(
_ publishOptions: PublishOptions
) async throws {
self.publishOptions = publishOptions.screenShare

guard
primaryTrack.isEnabled,
let activeSession = screenShareSessionProvider.activeSession
else { return }

self.publishOptions = publishOptions.screenShare

for publishOption in self.publishOptions {
addOrUpdateTransceiver(
for: publishOption,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -241,10 +241,10 @@ final class LocalVideoMediaAdapter: LocalMediaAdapting, @unchecked Sendable {
func didUpdatePublishOptions(
_ publishOptions: PublishOptions
) async throws {
self.publishOptions = publishOptions.video

guard primaryTrack.isEnabled else { return }

self.publishOptions = publishOptions.video

for publishOption in self.publishOptions {
addOrUpdateTransceiver(
for: publishOption,
Expand Down

0 comments on commit 3c89ca9

Please sign in to comment.