This is quite strange! I noticed my audio player was not working on iOS, but in every desktop browser it was fine. Took a really long time to figure this out, but it boils down to passing a variable returned from getMeteorData into my component. Apparently on iOS, it doesn't see this as a user-generated play command, so it ignores it. It's easier to demonstrate it, so here's the repo:
This is quite strange! I noticed my audio player was not working on iOS, but in every desktop browser it was fine. Took a really long time to figure this out, but it boils down to passing a variable returned from
getMeteorData
into my component. Apparently on iOS, it doesn't see this as a user-generated play command, so it ignores it. It's easier to demonstrate it, so here's the repo:https://github.com/ffxsam/meteor-react-ios-bug
The way to fix this is to edit
Home.jsx
and change theAudioPlayer
line to:And modify
doit
so that it sets state instead of the reactive var.This StackOverflow answer illustrates the problem.
Strange that a state change works ok, but reactive var change fails.