There is a problem with continuous play when picture ads are displayed. It takes pictures way too quickly and does not show the ad for 10 seconds. It seems to take 2 pictures at once then delay for some time (not 10 seconds), and then take 2 pictures again. I am uncertain of the behavior of video ads, but we need to ensure that any combination of ads (picture video, video video, picture picture) all follow the correct continuous play logic.
Also there is an issue when no ads are returned, the continuous play stops and does not take a picture at a later time. The behavior should be, if no ads are returned, play the next ad in the queue, and if the queue is exhausted, repeat the current ad again, but at the next cycle, attempt to take another picture. Right now no attempt is made to take another picture, and the continuous play simply stops.
Again to clarify the role of the client in continuous play, I have outlined the suggested behavior:
On begin capture button, request a list of ads from server
When server returns the list, there are 2 possibilities:
If the list of returned ads is empty, don't update the recommendedAdQueue
If it is not empty, clear the recommendedAdQueue and add advertisements who's ids are not already in the previousAdList
Pop an ad from the recommendedAdQueue and show the ad. Also add the shown advertisement to the previousAdList. Note: the size of the previousAdList should be smaller then the amount of ads returned by the server.
After the ad has been shown ensure that a future call to fetch ads from the server is queued at the right time if the user wants to keep continuously showing ads.
There is a problem with continuous play when picture ads are displayed. It takes pictures way too quickly and does not show the ad for 10 seconds. It seems to take 2 pictures at once then delay for some time (not 10 seconds), and then take 2 pictures again. I am uncertain of the behavior of video ads, but we need to ensure that any combination of ads (picture video, video video, picture picture) all follow the correct continuous play logic.
Also there is an issue when no ads are returned, the continuous play stops and does not take a picture at a later time. The behavior should be, if no ads are returned, play the next ad in the queue, and if the queue is exhausted, repeat the current ad again, but at the next cycle, attempt to take another picture. Right now no attempt is made to take another picture, and the continuous play simply stops.
Again to clarify the role of the client in continuous play, I have outlined the suggested behavior:
previousAdList = []
,recommendedAdQueue=[]
recommendedAdQueue
recommendedAdQueue
and add advertisements who's ids are not already in thepreviousAdList
recommendedAdQueue
and show the ad. Also add the shown advertisement to thepreviousAdList
. Note: the size of thepreviousAdList
should be smaller then the amount of ads returned by the server.