The RenderMode property should be set to VideoRenderMode.Adaptive to once again ensure that a video size that's different than the display window is proportionally resized to fit the window. The View property should be set to the recently added UIView ( remoteVideo). Set the Uid property to 0 to allow Agora to chose a random UID for the stream feed. Next, initialize the AgoraRtcVideoCanvas object and set the object properties as we did above. Inside this method, show the remoteVideo if it's hidden. This callback is hit when another user is connected and the first remote video frame is received and decoded. Add the FirstRemoteVideoDecodedOfUid delegate method with the parameters shown above ( AgoraRtcEngineKit engine, nuint uid, CoreGraphics.CGSize size, nint elapsed). Once completed, create an extention for the ViewController which extends the IAgoraRtcEngineDelegate. As before, within the interface builder, add a UIView to the View Controller in Main.storyboard and create an outlet to it within the corresponding View Controller. Now it’s time to create the view for remote video feed. Lastly, add a String optional ( channel) for the channel name that will be supplied by the user in a different View Controller that will be built later in this tutorial. Call the InitializeAgoraEngine() method inside the ViewDidLoad() method. The Agora Native SDK uses delegates to inform the application on the engine runtime events (joining/leaving a channel, new participants, etc). Provide your App ID as a String and pass in self for the delegate providing the current View Controller (the View Controller controlling the call). In the method call, supply two parameters: AppId and delegate. Next, create a method ( InitializeAgoraEngine()) that will initialize the AgoraRtcEngineKit class as a singleton instance to initialize the service before we use it. Next add interface ( IAgoraRtcEngineDelegate) to your controller. Create a variable that is an AgoraRtcEngineKit object make it an implicitly unwrapped optional. ![]() The AgoraRtcEngineKit object enables the use of Agora Native SDK's communication functionality. AgoraRtcEngineKit is the basic interface class of Agora Native SDK.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |