onDuration method

void onDuration(
  1. int? duration
)

Override this method to get notifications when media duration is set or changed. duration is in milliseconds. Returns -1 for live stream

Implementation

void onDuration(int? duration) {/* user implementation */}