mylisabox / flutter_mjpeg

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

Add support for frameTimeout option #39

Open cybrox opened 4 months ago

cybrox commented 4 months ago

Implements the request from https://github.com/mylisabox/flutter_mjpeg/issues/36.

This adds a frameTimeout option that can be passed a Duration. The option is expected to be used with streams where isLive=true, so that there is a timeout between receiving frames. If no new frame is received for the given timeout duration, the stream is automatically reloaded.

We have been using this in our desktop app to get streams to reload after the machine entered sleep mode and it has worked very well for the past (almost) two months.