an autoplay workaround for ipad works but only after adding a code I don't understand.
I've been recently working on compatibility with i devices when streaming.
I heard autoplay didn't work on ipad and yet I had seen some websites doing it.
I googled and found a tick, and it was a simple js like this:
it worked for ff, safari, and chrome but not ie nor my ipad.
after adding some random codes, I changed it to this:
and it worked a magic. it worked for every browser but still ipad wouldn't budge.
And here is the weird thing.
when i changed the time value from 200 to 2000,
it started autoplaying on ipad.
(btw, a video tag works fine using the first coding without the help of settimeout.)
Now that I got autoplay working, I wanted to get rid of this 2 sec wait, and having no idea where to start I've come here to get help.
my quetions are:
1.what was preventing ipad browser from loading and playing in the first and second codings?
2.why does jwplayer need settimeout to make it happen on ipad, while the video tag doesn't?
thanks in advance ;)