File tree 1 file changed +5
-0
lines changed
iOS/APIExample/APIExample/Examples/Advanced/TransparentRender
1 file changed +5
-0
lines changed Original file line number Diff line number Diff line change @@ -67,6 +67,10 @@ class TransparentRenderViewController: BaseViewController {
67
67
68
68
openMedia ( )
69
69
70
+ let config = AgoraVideoEncoderConfiguration ( )
71
+ config. advancedVideoOptions? . encodeAlpha = true
72
+ agoraKit. setVideoEncoderConfiguration ( config)
73
+
70
74
agoraKit. setExternalVideoSource ( true , useTexture: false , sourceType: . videoFrame)
71
75
agoraKit. enableVideo ( )
72
76
agoraKit. startPreview ( )
@@ -173,6 +177,7 @@ extension TransparentRenderViewController: AgoraRtcMediaPlayerVideoFrameDelegate
173
177
newVideoFrame. format = 12
174
178
newVideoFrame. textureBuf = videoFrame. pixelBuffer
175
179
newVideoFrame. rotation = videoFrame. rotation
180
+ let pb = videoFrame. pixelBuffer
176
181
newVideoFrame. alphaStitchMode = . alphaStitchRight
177
182
let _ = agoraKit. pushExternalVideoFrame ( newVideoFrame)
178
183
// LogUtils.log(message: "pushExternalVideoFrame: \(ret)", level: .info)
You can’t perform that action at this time.
0 commit comments