IJK player (iOS) how to ensure player is always at most recent point in stream

502 views Asked by At

Is there a way to ensure the current playback time is as close to live as possible? For example if it was buffering - how do I ensure when it starts playing again it skips ahead to most current time?

1

There are 1 answers

0
Waqar Ahmed On

Adding these options will ensure current playback time.

    let options = IJKFFOptions.byDefault()!
    options.setFormatOptionValue("nobuffer", forKey: "fflags")
    options.setPlayerOptionIntValue(0, forKey: "packet-buffering")
    options.setFormatOptionIntValue(0, forKey: "max_delay")
    options.setFormatOptionIntValue(0, forKey: "reorder_queue_size")
    options.setFormatOptionValue("udp", forKey: "rtsp_transport")
    options.setCodecOptionIntValue(0, forKey: "skip_frame")
    options.setCodecOptionIntValue(0, forKey: "skip_loop_filter")
    options.setPlayerOptionIntValue(1, forKey: "framedrop")
    options.setPlayerOptionValue("ext", forKey: "sync")