mylisabox / flutter_mjpeg

Flutter widget to show mjpeg stream from URL
BSD 2-Clause "Simplified" License
30 stars 23 forks source link

Pause the player #30

Closed HedgeHao closed 1 year ago

HedgeHao commented 1 year ago

Can I pause and resume the player?

cybrox commented 1 year ago

I don't think there's a way to pause the player directly but you can wrap it in a stateful widget and change the isLive value in its state, which should cause it to re-build.

When isLive is set to true, it will continuously fetch frames and "play". When isLive is set to false, it will fetch the latest frame once and then stay at that ("paused") until it is re-built.

jaumard commented 1 year ago

Yes isLive is here to support pause/resume action so please use that