The image was blank on Firefox, Chrome and Edge browsers. but It’s OK now.
Do you have a suggestion as to what needs to be changed?
I tried altering the order of the code (to move to a safe place before “wait for the buffer” etc) but it had no effect on the delay.