Not working on iOS
laila-chammaa opened this issue · 7 comments
hi! I'm doing some hydra backgrounds for a website but it's not working with Safari, but I saw some other sites that are using hydra and it's working for them, so I'm wondering if anyone can share some advice on that. Is there anything that I might've done, or something that I'd need to add to get it to work there? Thanks so much!!
turned out it's not safari, just iPhones and iPads..
@laila-chammaa how are you currently adding hydra to your website?
here's an example of how i've added hydra to my website in the past
const Hydra = require('hydra-synth');
const canvas = document.createElement('canvas')
document.body.appendChild(canvas)
let isIOS =
(/iPad|iPhone|iPod/.test(navigator.platform) ||
(navigator.platform === 'MacIntel' && navigator.maxTouchPoints > 1)) &&
!window.MSStream;
let precisionValue = isIOS ? 'highp' : 'mediump';
let hydra = new Hydra({
canvas: canvas,
enableStreamCapture: false,
detectAudio: false,
// etc
precision: precisionValue
});
there's also some known issues with how a few glsl functions are rendering (specifically noise and voronoi)
hydra-synth/hydra-synth#79
@zachkrall yea I am! we tried this, looks fine on desktop, but still gray on iOS. Thanks so much though
There was a bug with this -- it should be working with the latest version of hydra-synth (1.3.7) (the web editor has not been updated yet)
Web editor was working on iPad a week ago but is not any longer
This should be working now! please check and confirm :)
It does, thank you so much!!!