Closed devknown closed 9 years ago
First of all, you cannot set the volume in android, so don't bother. The same goes for iOS. But it does not harm, so I imagine you want it for desktop and other browsers.
The .jPlayer("play")
will be causing the problem. Remove it. It does nothing on Android, oh except as you have fount it kills the Android audio element. So again, remove it. Android was poor with html5 audio until very recently, so make sure you have an up to date version of jPlayer. It has been a minefield lately with the last few Android updates.
yes i have the last Version 2.9.1 IF i remove .jPlayer("play") how can i use "autoplay" and Thanks.
You cannot auto play on mobile devices. Do not try. Trying is what causes your problem on Android and its quality Audio element.
OK Thanks for reply - & autoplay it's working fine on android 2.3.6 & in rooted device on android 4.2.2
i'm using this but not working on android 4.1> vol = getVolume(); $.ajax( { url : "post.php?stream=true", type: "POST", data : "id="+id, cache: false, success: function(data) { $("#main-player").jPlayer({ ready: function () { $(this).jPlayer("setMedia", { mp3: data }).jPlayer("play"); }, swfPath: "/template/js", supplied: "mp3", wmode: "window", smoothPlayBar: true, keyEnabled: true, remainingDuration: true, toggleDuration: true, volume: vol }); } });