Open iamimsh opened 4 years ago
@iamimsh I believe the issue is with storyboard settings
please make sure you set a custom view class (CallRemoteVideoView) there for your view (see a screenshot)
@DaveLomber , Yes I already did that...
After setting the class to my view, I dragged a link from that view in storyboard to my class which results in
@IBOutlet weak var otherCamView: CallRemoteVideoView!
And it still crashes.
Seems it's still something wrong with Storyboard settings
as it says it's a UIView here [UIView setVideoTrack:]:
and not a CallRemoteVideoView
which in fact has a method - (void)setVideoTrack:(CallVideoTrack *)videoTrack;
can you log the otherCamView's class and double check, e.g.
let t = type(of: otherCamView)
print("'\(value)' of type '\(t)'")
Okay, let me try this and I'll let you know...
@DaveLomber , Here's what it printed
value of type 'Optional<CYBCallRemoteVideoView>'
So it's ok but this is so strange...
Here is the class interface in SDK:
NS_SWIFT_NAME(CallRemoteVideoView)
@interface CYBCallRemoteVideoView : UIView <RTCVideoRenderer>
@property (nonatomic, assign, class) BOOL preferMetal;
@property (nonatomic, weak) id<CYBCallRemoteVideoViewDelegate> delegate;
@property (nonatomic, copy) NSString *videoGravity;
- (void)setVideoTrack:(CYBCallVideoTrack *)videoTrack;
@end
so the method is here
Yes, that's strange.
But I realized something, when I'm trying to set the class name for UIView, it doesn't auto complete...
So somehow it doesn't recognize CallRemoteVideoView
May be that's the problem.. @DaveLomber is there anything I could do for this?
@iamimsh can you try to set it to CYBCallRemoteVideoView
?
Yes I tried to set to CYBCallRemoteVideoView
. It doesn't work... It doesn't auto complete..
@DaveLomber Can you please help us on this one?
@iamimsh let me do more tests tomorrow in my test environment and I will get back to you asap
Hi @DaveLomber Any update please?
Hi @marab2 @iamimsh
We have reproduced the issue and the strangest thing is that the standard Xcode Storyboard feature of UIVIew custom class just stopped working.
We tried diff solutions but still no understanding what it does not work..
What I can propose for now - is to create a CallRemoteVideoView manually inside view controller
e.g.
private var videoView: CallRemoteVideoView?
...
videoView = CallRemoteVideoView()
videoView!.videoGravity = AVLayerVideoGravity.resizeAspect.rawValue
videoView!.clipsToBounds = true
self.view.insertSubview(videoView!, at: 0)
videoView!.translatesAutoresizingMaskIntoConstraints = false
// add more styles/constraints as required
...
// then we can add a track
videoView!.setVideoTrack(videoTrack)
In this case everything works as expected, no crashes
We will investigate the 'unrecognized selector' issue later, so you can use the above solution for now
Great! This way works fine without crash..
videoView!.videoGravity = AVLayerVideoGravity.resizeAspectFill.rawValue
This doesn't work though...
@DaveLomber We do appreciate your help on this, we are on the latest stages of start using Connectycub, please support us on solving the issues that we are facing so we can start using it.
@iamimsh you can set any properties to the view Just use this approach as a basis - to create a view in code, not via Storyboard
Hello @DaveLomber
I'm using an UIView and set its class to
CallRemoteVideoView
Now,
When I do this, it crashes the app. Here's the crash log.
Could you please help on this?