You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I found this bug and tested it in the Example Demo. Luckily I thought I had located the issue.
Just simply update the NetStream.multiCamCaptureSettings through the setter method, it doesn't work.
func switchToSideMode(){print("[LiveViewModel] switchToSideMode")
stream.multiCamCaptureSettings =MultiCamCaptureSettings(
mode:.splitView,// set to .splitView through the setter method
cornerRadius: 16.0,
regionOfInterest:.init(
origin:CGPoint(x:16, y:16),
size:.init(width:160, height:160)),
direction:.east
)}
However, it works when I directly modify the library source code:
/// The default setting for the stream.publicstaticlet`default`=MultiCamCaptureSettings(// mode: .pip, // this is the origin value
mode:.splitView,// I hardcoded the default value and it can take effect
cornerRadius: 16.0,
regionOfInterest:.init(
origin:CGPoint(x:16, y:16),
size:.init(width:160, height:160)),
direction:.east
)
Lastly, after debugging, I found where the bug came from:
/// Specifies the multi camera capture properties.publicvarmultiCamCaptureSettings:MultiCamCaptureSettings{get{
mixer.videoIO.multiCamCaptureSettings
}set{// it doesn't take effect
mixer.videoIO.multiCamCaptureSettings = newValue
// only the multiCamCaptureSettings.mode// from IOVideoMixer takes effect in multi-cam mode
mixer.videoIO.videoMixer.multiCamCaptureSettings = newValue
// (I changed the videoMixer property from private to public)}}
I know the videoMixer should remain private.
However, I don't know how to solve this in a better way, or I can open a pull request.
To Reproduce
(update the Mode in NetStream.multiCamCaptureSettings through the setter method)
the original value is expected to be .pip
attach camera, public stream, connect streaming link
change the Mode to .splitMode through the multiCamCaptureSettings setter method
nothing happens although the multiCamCaptureSettings has already been modified
Expected behavior
The multi-cam Mode should be updated to .splitMode
Version
1.7.1
or
the newest main branch
Smartphone info.
iPhone 14pro
Additional context
No response
Screenshots
No response
Relevant log output
No response
The text was updated successfully, but these errors were encountered:
Describe the bug
I found this bug and tested it in the Example Demo. Luckily I thought I had located the issue.
Just simply update the NetStream.multiCamCaptureSettings through the setter method, it doesn't work.
However, it works when I directly modify the library source code:
Lastly, after debugging, I found where the bug came from:
I know the videoMixer should remain private.
However, I don't know how to solve this in a better way, or I can open a pull request.
To Reproduce
(update the Mode in NetStream.multiCamCaptureSettings through the setter method)
Expected behavior
The multi-cam Mode should be updated to .splitMode
Version
1.7.1
or
the newest main branch
Smartphone info.
iPhone 14pro
Additional context
No response
Screenshots
No response
Relevant log output
No response
The text was updated successfully, but these errors were encountered: