buildBridge function
MedeaFlutterWebrtcNative?
buildBridge()
Opens the dynamic library and instantiates ffi.MedeaFlutterWebrtcNative
.
Implementation
ffi.MedeaFlutterWebrtcNative? buildBridge() {
const base = 'medea_flutter_webrtc_native';
final path = Platform.isWindows ? '$base.dll' : 'lib$base.so';
late final dylib = Platform.isMacOS
? DynamicLibrary.executable()
: DynamicLibrary.open(path);
return ffi.MedeaFlutterWebrtcNativeImpl(dylib);
}