Michdd Posted May 25, 2009 Share Posted May 25, 2009 I have a simple thing that plays a sound during certain times. However in browsers (or with users..) that don't have quicktime installed it seems to just break the javascript function completely. Is there a way to check if a user has quicktime installed? Link to comment https://forums.phpfreaks.com/topic/159615-solved-sound-breaks-things-in-certain-browsers/ Share on other sites More sharing options...
Michdd Posted May 25, 2009 Author Share Posted May 25, 2009 Or possibly a more universal way to play sound. Currently the way that I'm doing which is causing problems in certain browsers (especially Opera) is: <embed src="recv_4.wav" autostart=false width=0 height=0 id="sound1" enablejavascript="true"> function EvalSound(soundobj) { var thissound=document.getElementById(soundobj); thissound.Play(); } Then a call like EvalSound('sound1'); Link to comment https://forums.phpfreaks.com/topic/159615-solved-sound-breaks-things-in-certain-browsers/#findComment-841886 Share on other sites More sharing options...
Axeia Posted May 25, 2009 Share Posted May 25, 2009 Think your best bet would be using flash Link to comment https://forums.phpfreaks.com/topic/159615-solved-sound-breaks-things-in-certain-browsers/#findComment-841898 Share on other sites More sharing options...
Michdd Posted May 25, 2009 Author Share Posted May 25, 2009 Think your best bet would be using flash I don't think that would work good because I'm playing this whenever I get a certain result from ajax. Link to comment https://forums.phpfreaks.com/topic/159615-solved-sound-breaks-things-in-certain-browsers/#findComment-841902 Share on other sites More sharing options...
Axeia Posted May 25, 2009 Share Posted May 25, 2009 Well get creative, make it autoplay, add it to the document when ajax does whatever you have it doing, then remove it x seconds later when it's done. Or do it the proper way and do some reading up as javascript can interact with flash Link to comment https://forums.phpfreaks.com/topic/159615-solved-sound-breaks-things-in-certain-browsers/#findComment-841904 Share on other sites More sharing options...
Michdd Posted May 25, 2009 Author Share Posted May 25, 2009 Well get creative, make it autoplay, add it to the document when ajax does whatever you have it doing, then remove it x seconds later when it's done. How does that help me in making it work in other browsers? Link to comment https://forums.phpfreaks.com/topic/159615-solved-sound-breaks-things-in-certain-browsers/#findComment-841906 Share on other sites More sharing options...
Axeia Posted May 25, 2009 Share Posted May 25, 2009 By the number of people with flash installed being far greater than that of those with quicktime installed? And flash is available crossbrowser and crossplatform. Link to comment https://forums.phpfreaks.com/topic/159615-solved-sound-breaks-things-in-certain-browsers/#findComment-841907 Share on other sites More sharing options...
DarkSuperHero Posted May 25, 2009 Share Posted May 25, 2009 look into the built in ExternalInterface in AS3.... http://livedocs.adobe.com/flash/9.0/ActionScriptLangRefV3/flash/external/ExternalInterface.html this allows javascript to call a function/method inside your Flash Movie...... I would suggest flash is the best way to go for sound also.... Link to comment https://forums.phpfreaks.com/topic/159615-solved-sound-breaks-things-in-certain-browsers/#findComment-841919 Share on other sites More sharing options...
Michdd Posted May 25, 2009 Author Share Posted May 25, 2009 Thanks, this is solved. I used Flash with javascript. Link to comment https://forums.phpfreaks.com/topic/159615-solved-sound-breaks-things-in-certain-browsers/#findComment-841925 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.