I am new to twilio and i am trying to add a subview
to localVideoTrack
in quickstart tutorial, the UIView
is getting added to the renderer being shown on mobile but not to the localVideoTrack
and is not transmitted to the other user. Please can anyone guide me through here ? I checked on internet but there was not material to help out if i want to add a mask or UIView to the Captured view from camera and send it over mobile. Thank you in advance.
UIImageView *imageView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"mask.png"]];
imageView.bounds = self.camera.previewView.bounds;
[self.camera.previewView addSubview:imageView];
imageView.bounds = self.previewView.bounds;
[self.previewView addSubview:imageView];
self.localVideoTrack = [TVILocalVideoTrack trackWithCapturer:self.camera];
if (!self.localVideoTrack) {
[self logMessage:@"Failed to add video track"];
} else {
// Add renderer to video track for local preview
[self.localVideoTrack addRenderer:self.previewView];
}