Skip to content

v1.0.5

Compare
Choose a tag to compare
@warren-bank warren-bank released this 27 Feb 20:34
fixed a timing issue when replacing the queue with a new video.

all operations that modify the queue are asynchronous,
and accept a callback function (ie: Runnable).

previously, no callbacks were used.
the queue was cleared and a new item was immediately added.
this usually worked, but it's a race condition;
sometimes the new video wouldn't appear.

this commit changes the order of operations, and adds a callback.
1) new video is added to end of existing queue
2) wait for callback
3) clear all elements in queue EXCEPT the last video

result: works great. no race condition. new video always loads.