Git Product home page Git Product logo

Comments (5)

heyarne avatar heyarne commented on June 16, 2024

Thanks for reporting this! This seems to be quite a common problem and I'm not 100% sure how to solve it yet and it unfortunately breaks audio completely in Safari currently (also the audio controls in the bottom bar). I'm not sure how Safari figures out the "user interaction" part.
I took a stab at solving it, so far unsuccesfully. What didn't work:

  • creating the audio element non-lazily
  • using <source> elements instead of setting the src attribute
  • calling .load on the audio element before calling play

Apparently working with AudioContext directly still works but I don't know if I want to go down that route. Looks more like an oversight to me that might stop working soon as well, considering the intent appears to be disabling automatically starting media altogether.

(Oh, and a fun-fact: Spotify doesn't work on Safari (for unrelated reasons), but maybe we can beat them there ;))

from airsonic-ui.

heyarne avatar heyarne commented on June 16, 2024

I've had some success by causing the audio effects using rf/dispatch-sync instead of rf/dispatch. Still not working 100% but I think it's promising. It's also nice to not have to pull in another lib, but we'll see if audio works well enough across browsers and devices for it to stay that way.

from airsonic-ui.

heyarne avatar heyarne commented on June 16, 2024

@khannurien Can you verify that the fix is working? I've tested it on macOS 10.13.6 with Safari Version 12.0.1 (13606.2.104.1.2) and it seems to be okay. It's deployed at https://heyarne.github.io/airsonic-ui.

from airsonic-ui.

khannurien avatar khannurien commented on June 16, 2024

Sorry for the late reply, and thank you for the patch. It's working here with 10.13.6 and Safari 12.0.1.

from airsonic-ui.

heyarne avatar heyarne commented on June 16, 2024

Actually I only just deployed it, so not such a late reply at all. Glad to hear that it worked!

from airsonic-ui.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.