I'm working on a HTML5 game for mobile phone. The sound work sometimes and disappear others.
DO you have any idea about library like SoundManager 2 without flash for mobile phones ?
To use HTML5 with SoundManager simply add the settings:
useHTML5Audio: true,
preferFlash: true,
This will always use HTML5 over flash, and will work on iOS products.
http://www.ibm.com/developerworks/library/wa-ioshtml5/index.html
This should help with HTML5 in ios products. Android can have flash, so normal SoundManager should work there.
As long as your sounds are mp3, wav or acc safari should play them fine, so it would help if you use the debug version of soundmanager2 and post the error you get when the sound doesn't work, because it might well be a separate problem that can be solved without a different audio library.
You could look into HTML5 Audio API. I have to say though, at this point support is little so be sure to check out if Safari on iOS is supported.
There's http://zohararad.github.io/audio5js/ which is a simpler SoundManager alternative.
Related
I need a way to detect when people tap their laptop.
The sound will be captured by the microphone. I want to determine if the tap occurs in the audio stream.
I need to do this in javascript as I want to enable this feature on the webpage.
What way should I go doing this? Do you know any js libraries that can help me?
The only solution that I considered so far is Web Audio API, but I don't like it as it is something recently introduced and is not compatible with many(older versions) of browsers.
https://dvcs.w3.org/hg/audio/raw-file/tip/webaudio/specification.html
About the solution:
-it shouldn't be flash
-it doesn't need to work on mobile browsers. Just desktop/laptop browsers.
Thank you all in advance.
I have a Flash MP3 player for a website that works on web browsers and Android but doesn't work on iPhones or Windows Phone. I know it's because iPhones don't support Flash and I presume that's also the reason it doesn't work on Windows Phone.
I can't just a HTML 5 MP3 players as that won't work on older browsers (and might not work on Android?). So do I need to use two separate players and decide which one to use based on the user's browser or is there a better solution such as a plugin that handles all this for me?
Basically, are there any MP3 player solutions that will handle both web browsers (version 7+ for IE) and smartphones?
How about http://mediaelementjs.com/
You could also drop in a link for the iphone that will use the native player (Something along the lines of 'iphone users click here' underneath your mp3 player) if you're trying to play a single file. It's quick and dirty but it does the job. There's more information here: http://www.boutell.com/newfaq/creating/iphoneaudio.html
That being said, I do like user1285360's answer quite a bit if you can implement it.
I wonder how can i run web flash application on IOS?
Because i heard some information about Flash application can run on IOs using Javascript
But i dont know how to write javascript code to make flash run on IOs
Do you have any tutorial or resources to help me to do this ?
Thank you very much
There have been a number of attempts to get Flash onto iOS devices (converting Flash apps to iOS apps, or recreating the runtime in JavaScript) but I doubt any of the solutions would be suitable.
You’d be better off building your application in HTML5, CSS3 and JavaScript.
Apple does not support Flash on its iOS devices. Apple and Adobe had quite a nasty bust-up over this issue. And, to make matters worse, it doesn't look like its going to improve any time soon (see here). So the only thing you can do is use HTML5, CSS3 and JavaScript to develop your web apps for iOS.
I'm trying to build a simple webapp that leverages the embedded youtube javascript api (http://code.google.com/apis/youtube/js_api_reference.html). It works well on my Chrome, Safari, etc... but it fails to work on the Android and iOS web browsers because of its SWF object dependency. I'm hoping for mobile compatibility.
Am I doing something wrong, or is there a is there a way to get around this?
(My requirements are as one would expect: I have a youtube video id that I'd like to use to create an embedded youtube video object w/ javascript api access.)
Thanks.
I'm not well versed with Android, but I know that iOS devices will recognize and convert a standard <object><embed></embed></object> Youtube embed code to a compatible player, as long as the object wasn't created with Javascript, such as with swfobject.
However, I'm not sure if the javascript controls will work in the mobile player. I've not tested this.
Unfortunately, there is not currently a way to interact with the html5 (<iframe>) embedded player. I'm not sure what the status is, but controlling the <iframe> player with javascript introduces some interesting challenges.
Is there a reason that all of the audio javascript libraries I'm finding (jPlayer, SoundManager 2, etc.) try to use HTML 5, and if that doesn't work attempt to use Flash but then don't fall back to anything else? Why wouldn't they try to fall back to the default HTML sound tags like <embed>, <object>, or <bgsound>?
Is there a library out there that does? I'd like to be able to play a sound if the user is using IE6 without Flash installed.
Thanks!
You can have it fallback so that if the person doesn't support HTML5 and you want to use basic HTML then just download a sound file and let the browser run an application to play it.
It isn't ideal, but as was pointed out, before HTML5 you have very few options, and since you don't like Flash your options just got reduced.