setBufferRange method

void setBufferRange({
  1. int min = -1,
  2. int max = -1,
  3. bool drop = false,
})

Set duration range of buffered data.

minMs default 1000. wait for buffered duration >= minMs If minMs < 0, then minMs, maxMs and drop will be reset to the default value maxMs default 4000. max buffered duration. If maxMs < 0, then maxMs and drop will be reset to the default value If maxMs == 0, same as INT64_MAX drop = true: drop old non-key frame packets to reduce buffered duration until < maxMs. drop = false: wait for buffered duration < maxMs before pushing packets

https://github.com/wang-bin/mdk-sdk/wiki/Player-APIs#void-setbufferrangeint64_t-minms-int64_t-maxms-bool-drop--false

Implementation

void setBufferRange({int min = -1, int max = -1, bool drop = false}) =>
    _player.ref.setBufferRange
            .asFunction<void Function(Pointer<mdkPlayer>, int, int, bool)>()(
        _player.ref.object, min, max, drop);