CreateJS / SoundJS

A Javascript library for working with Audio. It provides a consistent API for loading and playing audio on different browsers and devices. Currently supports WebAudio, HTML5 Audio, Cordova / PhoneGap, and a Flash fallback.
http://createjs.com/
MIT License
4.43k stars 835 forks source link

Desktop Safari seems muted on first load. #217

Open lannymcnie opened 8 years ago

lannymcnie commented 8 years ago
  1. Quit Safari if it is open
  2. Open Safari.
  3. Open a new window/tab.
  4. Paste in a testing page, such as http://www.createjs.com/demos/soundjs/02_PlayOnClick.html
  5. Try to play a sound

-- Sound is muted --

  1. Reload the page
  2. Play a sound.

-- Sound Plays --

Note that this doesn't happen if you open the page via a link. Only loading in an existing window via the URL bar.

Currently happens in Safari 9.0.1, tested in both El Capitan and Yosemite. Tested with earlier versions (SoundJS 0.5.2 onward, problem persists)

petermakowski commented 8 years ago

I'm having the same issue.

lannymcnie commented 8 years ago

Tested with earlier versions of SoundJS. This appears to be an issue with Safari. Unable to test in earlier versions (9.0.0, 8.X).

oshh commented 8 years ago

Bug is still present. Safari 9.1 on OSX El Capitan (10.11.4)

CoIin commented 8 years ago

Any news on this issue? It seems to be the same situation on iOS.

petermakowski commented 8 years ago

It's definitely a bug with WebAudioAPI implementation in Safari (definitely on OSX El Capitan). I filed a bug report to Apple few weeks ago, not much feedback from them I'm afraid.

Frozzy6 commented 8 years ago

Which behavior of mobile Safari? Beacuse I'm having the same issue on iPad ( iOS 9.3.1 ) An sound instance have playSuccessed state but, sounds doesn't play.

mwilber commented 8 years ago

Same issue on desktop Safari 9.1. I've said it before, I'll take IE over Safari any day because IE's issues are well documented and Apple never admits a mistake.

NINECUBE commented 8 years ago

Call createjs.Sound.on("fileload", this.loadHandler, this); after 0.5-1.0sec from "DOMContentLoaded". It seems to be solved. But I don't know this is the right way.

pkupiec commented 7 years ago

Same on Safari 10.0.0 few hundred ms delay solves the problem

novwhisky commented 5 years ago

Seeing similar behavior on Safari 12. I found allusion to an "automatic inference engine" in this article that supposedly decides if a given media is allowed to play. My best guess is relative proximity to the user-initiated event handler still applies (or has been made even stricter). The SoundJS demo still works though