File tree Expand file tree Collapse file tree
iOS/APIExample/APIExample/Examples/Advanced/TransparentRender Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -67,6 +67,10 @@ class TransparentRenderViewController: BaseViewController {
6767
6868 openMedia ( )
6969
70+ let config = AgoraVideoEncoderConfiguration ( )
71+ config. advancedVideoOptions? . encodeAlpha = true
72+ agoraKit. setVideoEncoderConfiguration ( config)
73+
7074 agoraKit. setExternalVideoSource ( true , useTexture: false , sourceType: . videoFrame)
7175 agoraKit. enableVideo ( )
7276 agoraKit. startPreview ( )
@@ -173,6 +177,7 @@ extension TransparentRenderViewController: AgoraRtcMediaPlayerVideoFrameDelegate
173177 newVideoFrame. format = 12
174178 newVideoFrame. textureBuf = videoFrame. pixelBuffer
175179 newVideoFrame. rotation = videoFrame. rotation
180+ let pb = videoFrame. pixelBuffer
176181 newVideoFrame. alphaStitchMode = . alphaStitchRight
177182 let _ = agoraKit. pushExternalVideoFrame ( newVideoFrame)
178183// LogUtils.log(message: "pushExternalVideoFrame: \(ret)", level: .info)
You can’t perform that action at this time.
0 commit comments