setRemoteVideoRenderListener method Null safety
- CustomRemoteRender param
Start custom video rendering with external texture
For more information on the parameters, please see the definition of CustomRender
Returned value: textureId
For more information, please see Custom Capturing and Rendering
Sample call
var textureId = await trtcCloud.setRemoteVideoRenderListener( CustomRemoteRender( userId: userId, streamType: TRTCCloudDef.TRTC_VIDEO_STREAM_TYPE_BIG, width: 360, height: 369));
Texture(key: valueKey, textureId: textureId)
When to call: call when onUserVideoAvailable
is true
Implementation
Future<int?> setRemoteVideoRenderListener(CustomRemoteRender param) {
return _channel.invokeMethod('setRemoteVideoRenderListener', {
"userId": param.userId,
"streamType": param.streamType,
"width": param.width,
"height": param.height,
});
}