File tree Expand file tree Collapse file tree
macOS/APIExample/Examples/Advanced/StreamEncryption Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -249,19 +249,20 @@ class StreamEncryption: BaseViewController {
249249 self . showAlert ( title: " Error " , message: " enableEncryption call failed: \( ret) , please check your params " )
250250 }
251251 // set up local video to render your local camera preview
252- let localVideo = videos [ 0 ]
253- let videoCanvas = AgoraRtcVideoCanvas ( )
254- videoCanvas. uid = 0
255- // the view to be binded
256- videoCanvas. view = localVideo. videocanvas
257- videoCanvas. renderMode = . hidden
258- agoraKit. setupLocalVideo ( videoCanvas)
259252
260253 } else {
261254 // your own custom algorithm encryption
262255 AgoraCustomEncryption . registerPacketProcessing ( agoraKit)
263256 }
264257
258+ let localVideo = videos [ 0 ]
259+ let videoCanvas = AgoraRtcVideoCanvas ( )
260+ videoCanvas. uid = 0
261+ // the view to be binded
262+ videoCanvas. view = localVideo. videocanvas
263+ videoCanvas. renderMode = . hidden
264+ agoraKit. setupLocalVideo ( videoCanvas)
265+
265266 // start joining channel
266267 // 1. Users can only see each other after they join the
267268 // same channel successfully using the same app id.
You can’t perform that action at this time.
0 commit comments