Skip to content
Discussion options

You must be logged in to vote

The same functionality has already been implemented.

mixer = MediaMixer()

// Assuming that the source is attached as follows:
try? await mixer.attachVideo(front, track: 0)
try? await mixer.attachVideo(back, track: 1)

recorder = StreamRecorder()
// - Specifying 0 selects the front camera
// - Specifying 1 selects the back camera
// - Specifying UInt8.max uses the output from VideoEffect
await recorder.selectTrack(1, mediaType: .video)

mixer.addOutput(recorder)

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@noho501
Comment options

Answer selected by noho501
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants