diff --git a/Android/APIExample/app/src/main/java/io/agora/api/example/examples/advanced/LocalVideoTranscoding.java b/Android/APIExample/app/src/main/java/io/agora/api/example/examples/advanced/LocalVideoTranscoding.java index 7852f5d6d..8e64a1256 100644 --- a/Android/APIExample/app/src/main/java/io/agora/api/example/examples/advanced/LocalVideoTranscoding.java +++ b/Android/APIExample/app/src/main/java/io/agora/api/example/examples/advanced/LocalVideoTranscoding.java @@ -6,7 +6,6 @@ import android.annotation.SuppressLint; import android.content.Context; -import android.graphics.Color; import android.os.Bundle; import android.util.DisplayMetrics; import android.util.Log; @@ -472,7 +471,7 @@ public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) { if (buttonView == switchTransparentBackground) { engine.enableVirtualBackground(isChecked, new VirtualBackgroundSource(VirtualBackgroundSource.BACKGROUND_COLOR, - Color.TRANSPARENT, "", + 0x00000000, "", VirtualBackgroundSource.BLUR_DEGREE_HIGH), new SegmentationProperty()); } diff --git a/Android/APIExample/app/src/main/java/io/agora/api/example/examples/advanced/TransparentRendering.java b/Android/APIExample/app/src/main/java/io/agora/api/example/examples/advanced/TransparentRendering.java index afab73e38..1583744b8 100644 --- a/Android/APIExample/app/src/main/java/io/agora/api/example/examples/advanced/TransparentRendering.java +++ b/Android/APIExample/app/src/main/java/io/agora/api/example/examples/advanced/TransparentRendering.java @@ -239,6 +239,7 @@ private void joinChannel(String channelId) { STANDARD_BITRATE, VideoEncoderConfiguration.ORIENTATION_MODE.valueOf(((MainApplication) getActivity().getApplication()).getGlobalSettings().getVideoEncodingOrientation()) ); + config.advanceOptions.encodeAlpha = true; engine.setVideoEncoderConfiguration(config); engine.setExternalVideoSource(true, true, Constants.ExternalVideoSourceType.VIDEO_FRAME);