-
Notifications
You must be signed in to change notification settings - Fork 388
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
sendMetadata is not working #236
Comments
PlatformException(7, not initialized, null, null) you should init engine first |
Hi @LichKing-2234, thank you for the reply. I'm initializing the engine before anything else: _engine = await RtcEngine.create(AGORA_APP_ID);
await _engine.enableVideo();
await _engine.setChannelProfile(ChannelProfile.LiveBroadcasting);
await _engine.setClientRole(ClientRole.Audience); I don't think this is the problem, because I try to send the metadata during an active live streaming. |
Sorry, my mistake, you should call |
Great thank you @LichKing-2234, the error is gone now. This is a simplified snippet: RtcEngine _engine;
Future<void> initializeAgora() async {
_engine = await RtcEngine.create(AGORA_APP_ID);
_engine.setEventHandler(RtcEngineEventHandler(
metadataReceived: (buffer, _, __) {
print('Metadata received $buffer');
},
));
await _engine.registerMediaMetadataObserver();
}
Future<void> sendAgoraMetadata() async {
await _engine.sendMetadata( 'test');
} And |
maybe you should call |
That actually solves the issue (surprisingly), thank you very much @LichKing-2234. |
I find the same issue which I can't receive any metadata sent. Could you tell me the solution about this? Thank you. |
this work for me. Thanks |
i have successfully sentMetadata but still get nothing in metadataReceived in _rtcEngine?.setEventHandler. Can you make me your sample code? // Init the app
}
} |
@hovanhung98hust same to me, have you found the solution? |
@Miko2x Can you please raise a new issue for your case, thanks. |
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. |
Describe the bug
Can't send a metadata.
To Reproduce
Try sending some metadata using
The metadata is not sent to the other users and this error is shown in the console:
Expected behavior
The metadata is being sent successfully, and caught by the other users using the
metadataReceived
event listener.Smartphone (please complete the following information):
Additional context
Using
agora_rtc_engine: 3.2.1
The text was updated successfully, but these errors were encountered: