hydra-synth / hydra

Livecoding networked visuals in the browser
https://hydra.ojack.xyz
GNU Affero General Public License v3.0
2.16k stars 261 forks source link

Not working on iOS #122

Closed laila-chammaa closed 2 years ago

laila-chammaa commented 3 years ago

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!!

laila-chammaa commented 3 years ago

turned out it's not safari, just iPhones and iPads..

zachkrall commented 3 years ago

@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
});

https://github.com/ojack/hydra-synth/pull/37

there's also some known issues with how a few glsl functions are rendering (specifically noise and voronoi) https://github.com/ojack/hydra-synth/pull/79

laila-chammaa commented 3 years ago

@zachkrall yea I am! we tried this, looks fine on desktop, but still gray on iOS. Thanks so much though

ojack commented 3 years ago

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)

shamanicvocalarts commented 3 years ago

Web editor was working on iPad a week ago but is not any longer

ojack commented 2 years ago

This should be working now! please check and confirm :)

laila-chammaa commented 2 years ago

It does, thank you so much!!!