audio-player

playing sound without the need to install media player extension

自作多情 提交于 2019-12-08 12:00:33
问题 I am trying to embed a sound in an auction website. I want that every time someone's bid, a sound will be played. I tried a simple <embed> tag with given ID, and then sound.play() through javascript. The sound is playing, but in IE, a new user is asked to install a media player extension "if he/she trusts the website". Is there a way to make it play without this message. The following code is in the page: In the HTML: <embed src="success.wav" autostart="false" width="0" height="0" id="sound1"

C# play MP3 file from specified time for the specified time

百般思念 提交于 2019-12-08 08:29:30
I'm wanting to create a program that you can import an mp3 file into, and tell it to play it starting at a specific position, and to play for a specified amount of time. I've looked into NAudio, and got it to play and stop the mp3 file, but I can't figure out how to start at a specific position. Anybody know what I should do? If you're using NAudio, look for a Seek method on the output stream -- the information returned from this Google search, http://www.google.com/search?q=seek+site:naudio.codeplex.com , should get you started. You could also use some old but functional Windows APIs (the MCI

C# play MP3 file from specified time for the specified time

风流意气都作罢 提交于 2019-12-08 06:19:29
问题 I'm wanting to create a program that you can import an mp3 file into, and tell it to play it starting at a specific position, and to play for a specified amount of time. I've looked into NAudio, and got it to play and stop the mp3 file, but I can't figure out how to start at a specific position. Anybody know what I should do? 回答1: If you're using NAudio, look for a Seek method on the output stream -- the information returned from this Google search, http://www.google.com/search?q=seek+site

Create HTML dropdown list of music that can be played inside an audio player

♀尐吖头ヾ 提交于 2019-12-08 05:10:31
I am trying to create a simple music player for my website where the user can select from a number of different music tracks from a drop down list. The music is stored on our server. This is what I have so far: http://jsfiddle.net/rUf6j/7/ I just need to move the options into a drop down list. HTML: <audio id="player" controls="controls"> <source id="mp3_src" src="/teachings/2011_01_09_Cut.mp3" type="audio/mp3" /> Your browser does not support the audio element. </audio> <table> <tr> <td>Flying in clouds</td> <td><a href="#" source="http://www.culturedub.com/assets/04-Forward.mp3">Listen</a><

iPhone Allow Other App to Play Audio While Recording Audio / Shazam

白昼怎懂夜的黑 提交于 2019-12-07 16:57:43
问题 Looking to do pretty much what Shazam is doing as far as recording audio while another app is playing audio. 1) Recording audio fine, no problem here 2) When app starts and starts recording, the music from another app stops (itunes, etc). 3) I have played with all of the incantations of the AV Audio settings with no luck in having the audio continue / resume. 4) When Shazam starts, the audio stop for a bit, and then resumes. I assume that Shazam is doing something to restart the audio with

My App is not working in API 23

不想你离开。 提交于 2019-12-07 15:26:20
问题 The music app which is <uses-sdk android:minSdkVersion="16" android:targetSdkVersion="23" /> , it works on API 16 , but not in API 23. The listview is not loaded with songs, it shows empty when checked in API23, working fine in API16. In API22 also working fine import java.io.File; import java.util.ArrayList; import java.util.HashMap; import android.app.ListActivity; import android.content.Context; import android.content.Intent; import android.graphics.Color; import android.os.Bundle; import

Control Embedded Grooveshark Widgets using Javascript?

萝らか妹 提交于 2019-12-07 14:24:58
问题 How would I play/pause an embedded Grooveshark widget using Javascript? Would like to play separate single-song widgets in sequence, ala separate tracks on a soundcloud user's page. I didn't see anything officially supported, and couldn't find anything via googling. 回答1: I took a quick glance at the decompiled actionscript and turned up the following ExternalInterface callbacks: getVersion() getCurrentSong() setSongCompleteCallback(string) setErrorCallback(string) setStatusCallback(string)

React Native - Expo Audio stop all sounds

半世苍凉 提交于 2019-12-07 09:34:00
问题 I am using Expo Audio to play some short sounds from a list. async playAudio(file) { try { await Audio.setIsEnabledAsync(true); const sound = new Audio.Sound(); await sound.loadAsync(file); await sound.playAsync(); } catch(error) { console.error(error); } } Which I'm calling from a list rendered with list.map() renderTheList = (item, i) => { return ( <View key={i}> <TouchableOpacity onPress={ () => { this.onAudioSelected(item.audio) }}> </TouchableOpacity> </View> ) } onAudioSelected(audio) {

Throwing null pointer exception in Android

放肆的年华 提交于 2019-12-06 20:49:40
I'm trying to fetch an audio file from the audio directory, for that I'm using below code. I'm not able to figure out why this condition if (home.listFiles(new FileExtensionFilter()).length > 0) is throwing an error. Code is given below. Uri allsongsuri = MediaStore.Audio.Media.EXTERNAL_CONTENT_URI; final String MEDIA_PATH = allsongsuri.toString(); private ArrayList<HashMap<String, String>> songsList = new ArrayList<HashMap<String, String>>(); public ArrayList<HashMap<String, String>> getPlayList(){ System.out.println(" -- "+MEDIA_PATH); File home = new File(MEDIA_PATH); if (home.listFiles(new

How to tell if MediaPlayer is playing?

ⅰ亾dé卋堺 提交于 2019-12-06 14:16:09
问题 How can I tell if javafx.scene.media.MediaPlayer is playing? Preferably without any external imports or additions to the build path. If this is not possible, are there any libraries that I can use that are self-contained? I am installing this software on an ARM CPU so I am trying to make this code as minimalist as possible. I am only going to use this framework to play music files and primarily MP3s. Any suggestions on how I can tell if the player is playing music with this or a different