record method
Start to record if to
is not null. Stop recording if to
is null.
https://github.com/wang-bin/mdk-sdk/wiki/Player-APIs#void-recordconst-char-url--nullptr-const-char-format--nullptr
Implementation
void record({String? to, String? format}) {
final cto = to?.toNativeUtf8();
final cfmt = format?.toNativeUtf8();
_player.ref.record
.asFunction<
void Function(Pointer<mdkPlayer>, Pointer<Char>, Pointer<Char>)
>()(
_player.ref.object,
cto?.cast() ?? nullptr,
cfmt?.cast() ?? nullptr,
);
if (cto != null) {
malloc.free(cto);
}
if (cfmt != null) {
malloc.free(cfmt);
}
}