setActiveTracks method

void setActiveTracks(
  1. MediaType type,
  2. List<int> value
)

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);
}