setBufferRange method

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

Set duration range(milliseconds) of buffered data.

min default 1000. wait for buffered duration >= min If min < 0, then min, max and drop will be reset to the default value max default 4000. max buffered duration. If max < 0, then max and drop will be reset to the default value If max == 0, same as INT64_MAX drop = true: drop old non-key frame packets to reduce buffered duration until < max. drop = false: wait for buffered duration < max 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);