I am currently getting an MJPEG stream of data in Swift using NSURLSession.
Is there anyway to get data every X seconds instead of continuously as it does currently?
Incase you are not sure what I mean, here is a graphical representation:
Currently:
Incoming JPEG data
... (small delay, displaying the image)
Incoming JPEG data
... (etc.)
What I want:
Incoming JPEG data
... (displaying image)
... (5 seconds delay)
Incoming JPEG data
EDIT: This is not about the progress on the data download. This is about a delay between each time the didReceiveData delegate function is called.
I receive image A. I want a X second delay between receiving image A and receiving image B.