Agora-Flutter-SDK
Agora-Flutter-SDK copied to clipboard
How to use VirtualBackground when Live Streaming
How to use set VirtualBackground when Live Streaming
I use lean link :
and i custom in link becouse i want streaming to rtmp + key other
@override
Future
i tryeing set method then Call this method after enableVideo
VirtualBackgroundSource backgroundSource = VirtualBackgroundSource( color: Color.fromRGBO(38, 38, 38, 0.4), source: "/data/user/0/com.hollysoft.ar_live_ais/cache/file.jpg", backgroundSourceType: VirtualBackgroundSourceType.Img);
await _engine.enableVirtualBackground(true, backgroundSource);
Future<void> _initAgora() async {
_engine = await RtcEngine.createWithConfig(RtcEngineConfig(appId));
_client = await AgoraRtmClient.createInstance(appId);
//AssetSetup
await _engine.enableVideo();
VirtualBackgroundSource backgroundSource = VirtualBackgroundSource(
color: Color.fromRGBO(38, 38, 38, 0.4),
source: "/data/user/0/com.hollysoft.ar_live_ais/cache/file.jpg",
backgroundSourceType: VirtualBackgroundSourceType.Img);
await _engine.enableVirtualBackground(true, backgroundSource);
await _engine.startPreview();
await _engine.muteLocalAudioStream(true);
await _engine.muteLocalVideoStream(true);
await _engine.setChannelProfile(ChannelProfile.LiveBroadcasting);
await _engine.setClientRole(ClientRole.Broadcaster);
_joinChannel();
}
_joinChannel() async {
if (defaultTargetPlatform == TargetPlatform.android) {
await [Permission.microphone, Permission.camera].request();
}
await _engine.joinChannel(config.token, config.channelId, null, config.uid);
}

and run bulid and the result turned out to be change color black background not show file set , no color, no background, and wallpaper doesn't show.
but i not understant you write detail because you hot have example for VirtualBackground in Live Streaming
i not understant String? source How to use please example code
Any advice please?
ask more
and more question if can try to get gif files and text, text or fonts can be dragged and drag files freely and if not, is there any one that can try to accept withCan Agora?
Please fully example for VirtualBackground when Live Streaming
Thank you
Is it working without VirtualBackgroundSource?
ok bro. thank you
If you still face issues, please try upgrading to the new version to see if it works for you.
Without additional information, we are unfortunately not sure how to resolve this issue. We are therefore reluctantly going to close this bug for now. If you find this problem please file a new issue with the same description, what happens, logs and the output. All system setups can be slightly different so it's always better to open new issues and reference the related ones. Thanks for your contribution.
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please raise a new issue.