setActiveTracks method
Set active tracks of type
. Other tracks of type
will be disabled.
https://github.com/wang-bin/mdk-sdk/wiki/Player-APIs#void-setactivetracksmediatype-type-const-stdsetint-tracks
Implementation
void setActiveTracks(MediaType type, List<int> value) {
switch (type) {
case MediaType.audio:
_activeAT = value;
case MediaType.video:
_activeVT = value;
case MediaType.subtitle:
_activeST = value;
default:
}
final ca = calloc<Int>(value.length);
for (int i = 0; i < value.length; ++i) {
ca[i] = value[i];
}
_player.ref.setActiveTracks.asFunction<
void Function(Pointer<mdkPlayer>, int, Pointer<Int>, int)>()(
_player.ref.object, type.rawValue, ca.cast(), value.length);
calloc.free(ca);
}