Skip to content

Conversation

@ipavlidakis
Copy link
Contributor

🔗 Issue Links

Resolves https://linear.app/stream/issue/IOS-1121/allow-overriding-the-viewfactory-used-by-picture-in-picture

📝 Summary

This revision provides a way to override the ViewFactory instance that is being used by Picture-in-Picture.

In order to update the ViewFactory, prior to joining a call, use

@Injected(\.pictureInPictureAdapter) var pictureInPictureAdapter

...

@MainActor
func updateViewFactory<V: ViewFactory>(_ viewFactory: V) {
    pictureInPictureAdapter.setViewFactory(viewFactory)
}

🛠 Implementation

Provide a detailed description of the implementation and explain your decisions if you find them relevant.

🎨 Showcase

Add relevant screenshots and/or videos/gifs to easily see what this PR changes, if applicable.

Before After
img img

🧪 Manual Testing Notes

Explain how this change can be tested manually, if applicable.

☑️ Contributor Checklist

  • I have signed the Stream CLA (required)
  • This change follows zero ⚠️ policy (required)
  • This change should receive manual QA
  • Changelog is updated with client-facing changes
  • New code is covered by unit tests
  • Comparison screenshots added for visual changes
  • Affected documentation updated (tutorial, CMS)

@ipavlidakis ipavlidakis self-assigned this Sep 4, 2025
@ipavlidakis ipavlidakis requested a review from a team as a code owner September 4, 2025 12:40
@ipavlidakis ipavlidakis added the enhancement New feature or request label Sep 4, 2025
@Stream-SDK-Bot
Copy link
Collaborator

Stream-SDK-Bot commented Sep 4, 2025

SDK Size

title develop branch diff status
StreamVideo 8.53 MB 8.53 MB 0 KB 🟢
StreamVideoSwiftUI 2.36 MB 2.36 MB 0 KB 🟢
StreamVideoUIKit 2.48 MB 2.48 MB 0 KB 🟢
StreamWebRTC 9.85 MB 9.85 MB 0 KB 🟢

@github-actions
Copy link

github-actions bot commented Sep 4, 2025

Public Interface

 public final class StreamPictureInPictureAdapter: @unchecked Sendable  
+   
+ 
+   @MainActor public func setViewFactory(_ viewFactory: V)

@sonarqubecloud
Copy link

sonarqubecloud bot commented Sep 4, 2025

@ipavlidakis ipavlidakis merged commit fee1bd8 into develop Sep 4, 2025
20 of 21 checks passed
@ipavlidakis ipavlidakis deleted the fix/picture-in-picture-factory-passing branch September 4, 2025 16:35
@Stream-SDK-Bot Stream-SDK-Bot mentioned this pull request Sep 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants