Some iphone device not able play audio browser jquery
My jquery audio script perfecly play audio, but some iphone device has no audio playing, can anyone tell me the problem,
<script src="https://cdnjs.cloudflare.com/ajax/libs/howler/2.2.1/howler.min.js" integrity="sha512-L6Z/YtIPQ7eU3BProP34WGU5yIRk7tNHk7vaC2dB1Vy1atz6wl9mCkTPPZ2Rn1qPr+vY2mZ9odZLdGYuaBk7dQ==" crossorigin="anonymous"></script>
let autoplay = true;
let soundID;
var sound = new Howl({
src: ['<?php echo base_url(); ?>assets/mp3/<?php echo $nama_musik; ?>'],
autoplay: autoplay,
loop: true,
});
soundID = sound.play();
do you know?
how many words do you know
See also questions close to this topic
-
How to clear user uploaded images if the limit of files exceeded in jquery
I have a simple form where a user can upload multiple images. I only want the user to upload 4 images at once, so I did the following:
$("#myfile").on("change", function() { if ($("#myfile")[0].files.length > 4) { alert("You can select only 4 images"); } });
<input type="file" id="myfile" class="form-control" name="pimage[]" multiple="multiple">
This gives an alert when the user uploads more than 4 images but doesn't stop them from submitting the form.
Can anyone please tell me how to clear the user uploaded images if the limit exceeds or disable the submit button?
-
Whenever I try to add email on mysql server. My page is not responding. why?
I am a little bit confused. see the code below.
$('#submit').click(function() { $('#showdata').html($('#senddata').serialize()); /*Print all data that passed from form.*/ $.ajax({ url: "save.php", /* Here data store on mysql server without email and response to welcome.php. */ type: "POST", /* if i want to add proper email format then data store in mysql but not response on welcome.php. */ data: $('#senddata').serialize(), success: function(r) { alert("ok"); $('#senddata').trigger('reset'); window.location = 'welcome.php'; /*This is welcome page*/ } }) })
I want to submit a form using the ajax post method. If I write any name instead of email then data is stored on the server and responding welcome.php. Whenever I write any name email then data is stored on the server but responding welcome.php. Here is 'save.php' code.
<?php include('./config.php'); print_r($_POST); $name=$_POST['name']; $email=mysqli_real_escape_string($con,$_POST['email']); $pwd=$_POST['password']; $vill=$_POST['address'].$_POST['city'].$_POST['state'].$_POST['zip']; $insertdata="INSERT INTO `persons`(`name`,`email`,`pwd`,`vill`)VALUE('$name','$email','$pwd','$vill')"; print_r($insertdata); if(mysqli_query($con,$insertdata)){ echo "data added"; }else{ echo "not added"; } ?>
Note: if I put my button
<button class="btn btn-primary" id="submit">sign up</button>
outside form then everting is right. -
Command failed: xcrun instruments -s
I want to run my react native app on a real ios device with this line :
npx react-native run-ios --udid SOME-UDID
but i got this error :
xcrun: error: sh -c '/Applications/Xcode.app/Contents/Developer/usr/bin/xcodebuild -sdk /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk -find instruments 2> /dev/null' failed with exit code 17664: (null) (errno=No such file or directory) xcrun: error: unable to find utility "instruments", not a developer tool or in PATH error Command failed: xcrun instruments -s xcrun: error: sh -c '/Applications/Xcode.app/Contents/Developer/usr/bin/xcodebuild -sdk /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk -find instruments 2> /dev/null' failed with exit code 17664: (null) (errno=No such file or directory) xcrun: error: unable to find utility "instruments", not a developer tool or in PATH
everything is ok on simulator
I'm using XCODE 13
-
IOS Launcher in android studio
I'm trying to change the whole Android OS installed app icons into IOS icons, please help me with the proper code or library for android kotlin
-
Debugging undefined is not an object (evaluating 'Object.keys(routeConfigs)')
I'm using Expo and React Native to create a simple iOS app. I am currently getting this error and have no idea how to fix it. I've tried various other solutions on Stack Overflow to no avail.
My code is:
import 'react-native-gesture-handler'; import React from 'react'; import { createStackNavigator } from 'react-navigation-stack'; import { NavigationContainer } from '@react-navigation/native'; import HomeScreen from './src/screens/HomeScreen'; const Stack = createStackNavigator(); export default function App() { return ( <NavigationContainer> <Stack.Navigator> <Stack.Screen name="Home" component={HomeScreen} /> </Stack.Navigator> </NavigationContainer> ); }
Here is my
HomeScreen.js
import React from 'react'; import { Text, View } from 'react-native'; export default function HomeScreen () { return ( <View> <Text>Welcome Home!</Text> </View> ) }
My packages:
"packages": { "": { "name": "safey", "version": "1.0.0", "dependencies": { "@react-native-community/masked-view": "^0.1.11", "@react-navigation/native": "^6.0.10", "@react-navigation/stack": "^6.0.10", "expo": "~45.0.0", "expo-splash-screen": "~0.15.1", "expo-status-bar": "~1.3.0", "react": "17.0.2", "react-dom": "17.0.2", "react-native": "0.68.1", "react-native-gesture-handler": "^2.4.2", "react-native-reanimated": "^2.8.0", "react-native-safe-area-context": "^4.2.5", "react-native-screens": "^3.13.1", "react-native-web": "0.17.7", "react-navigation": "^4.4.4", "react-navigation-stack": "^2.10.4" },
-
Play songs one after another with Howler and NextJS
I have a list of songs on github, the goal is to play all songs one by one and post messages in console. But I faced a problem, how to find if the song is finished? Otherwise my code tries to play all songs without waiting the song's end.
import { Howl } from 'howler' import { useState } from 'react' export default function PlaySound() { let [initSong, updatedSong] = useState(0) const songs = [ 'https://raw.githubusercontent.com/Sound/master/play1.mp3', 'https://raw.githubusercontent.com/Sound/master/play2.mp3', 'https://raw.githubusercontent.com/Sound/master/play3.mp3', 'https://raw.githubusercontent.com/Sound/master/play4.mp3', 'https://raw.githubusercontent.com/Sound/master/play5.mp3', ] var sound = new Howl({ src: songs[initSong], }) function postAMessage() { for (let i = 0; i < songs.length; i++) { if (initSong >= songs.length) return console.log('New song ' + i) sound.play() updatedSong(initSong++) i++ } } return ( <div> <button onClick={postAMessage}>Play</button> </div> ) }
-
how do i fix "HTML5 Audio pool exhausted, returning potentially locked audio object." i have tried add sound
this is my code it creates a new howl called sound, which defines some variables, than it plays a random song from a list of songs than after it ends, it ends the sound, unloads it and plays a different song from the list after it unloads and stops
function PlaySong(Choice, Songs) { var Choice = Math.floor(Math.random() * 16); var sound = new Howl({ src: [Songs[Choice]], html5: true, onend: function () { sound.stop(); sound.unload(); PlaySong(Choice, Songs) } }); sound.play(); }
-
Is there a way to seek music with Web Audio API without buffering
I'm trying to make a music player for my dj mixes(Most over an hour long), whilst also taking advantage of Web Audio Contexts analyzer node to have some audio reactive elements on my website on playback. When looking into it, I found that to do music seeking with audio context I need to buffer it.
Buffering an hour long mix takes up a lot of ram and internet bandwidth before it even starts playing, so that's not something I can do on a website. But also listening to mixes with many songs without the ability to skip around is annoying as well.
How do big websites like mixcloud or soundcloud do it?
Is there an alternative way to get both AnalyserNodes functionality and music seeking for long audio content?
I also looked into howler.js hoping it would solve something, but I can't get it to do what I need without buffering either, since its built on top of the same API.