html5-audio

Use of reference to calling object (this) using HTML5 audio and jQuery

久未见 提交于 2019-12-07 15:46:32
问题 I'm creating my own HTML5 audio player capable of handling playlists. I have created a custom myPlaylist object with includes all play() , pause() , stop() and other needed functionality. This is all working correctly, but moreover, I need to be aware about when an audio file has ended in order to automatically start playing the next one. Here's the relevant parts of the code I'm using: function myPlaylist(){ var player = document.createElement('audio'); var audio = $(player).get(0); this

<audio> element with controls' trackbar not moving

与世无争的帅哥 提交于 2019-12-07 13:41:56
问题 I have an <audio> element with controls like so: <audio controls="controls" id="audio-sample" preload="auto"> <source src="../../music-sample.php?type=ogg&id=<?php echo $item->custom_5; ?>" type="audio/ogg" /> <source src="../../music-sample.php?type=mp3&id=<?php echo $item->custom_5; ?>" type="audio/mp3" /> </audio> The player shows up, and the sound plays just fine, but the trackbar doesn't move to reflect the elapsed time, and it can't be dragged to seek. Why not? Do I need to send some

Continuous HTML5 audio/video playback in iOS?

我的梦境 提交于 2019-12-07 09:22:45
问题 I'm working on a mobile web app and want to allow for continuous playback of HTML5 audio or video in both Android and iOS (i.e. queue up a playlist of YouTube videos or Grooveshark songs and have them all play in a row automatically). Android doesn't seem to be an issue, but everything I've read has suggested that Safari prevents audio from playing unless it's initiated by a user, and prevents continuous play if the screen becomes locked. That said, Grooveshark's mobile web app will play an

jPlayer and PhoneGap Build compatibility

北战南征 提交于 2019-12-07 08:32:25
问题 I'm trying to use jPlayer for a web app that will be native compiled for iPhone, Android and Blackberry using the PhoneGap Build service. I'm using the player to play short MP3 audio snippets and it works fine in the web browser. However, when this is compiled using PhoneGap, the audio won't play and it doesn't display the length of the file in the player. It looks like it can't find the file, although I'm referencing it using a relative path ( ../audio/myaudio.mp3 ). Does anybody have any

Open stream_url of a Soundcloud Track via Client-Side XHR?

我的梦境 提交于 2019-12-07 07:49:40
问题 Since you can call the the Soundcloud API via XHR (because of the CORS headers it sends http://backstage.soundcloud.com/2010/08/of-cors-we-do/, right?) I was wondering if this was possible with the audio data itself, like a tracks' stream_url for example. When trying to open the stream_url with a XHR (from the Client Side) using the Web Audio API, i get a Origin is not allowed by Access-Control-Allow-Origin. error. Is there a way to load Audio resources via XHttpRequest from Client-Side

How do I compress multiple Web Audio sources/tracks into one?

回眸只為那壹抹淺笑 提交于 2019-12-07 06:13:57
问题 We are making an web based music editor and mixer based on the Web Audio api. Users can mix together multiple tracks, crop tracks, etc. The actual mixing together of the tracks just involves playing back all the sources at once. We want to be able to add the option to save the mix and make it available for download to a user's computer. Is there some way to do this on the front end (like connecting all the sources to one destination/export node), or even the backend (we are using RoR)? 回答1:

Live streaming using FFMPEG to web audio api

南楼画角 提交于 2019-12-07 06:13:54
问题 I am trying to stream audio using node.js + ffmpeg to browsers connected in LAN only using web audio api. Not using element because it's adding it's own buffer of 8 to 10 secs and I want to get maximum high latency possible (around 1 to 2 sec max). Audio plays successfully but audio is very choppy and noisy. Here is my node.js (server side) file: var ws = require('websocket.io'), server = ws.listen(3000); var child_process = require("child_process"); var i = 0; server.on('connection',

HTML5 Audio. Replacing Element still the same audio file (cached) how to solve?

会有一股神秘感。 提交于 2019-12-07 05:31:44
问题 I am using the HTML5 Audio element inside my HTML file. Trying many methods,I just cannot manage to replace the audio file via AJAX, it still returns the same audiofile. <div id="audiodiv"> <audio id="audioelement"> <source src="test.ogg" type="audio/ogg"> </audio> </div> So I record a new file called test.ogg which overwrites the old one. I tried using jQuery and using $("#audiodiv").html('') and re-rendering this part. Then fetching the element via document.getElementbyID and then using the

Android 2.3 doesn't pass cookie information for html5 audio tag Get request

醉酒当歌 提交于 2019-12-07 03:54:08
问题 I am trying to play a media file using html5 audio tag in android 2.3 from a secure site but I notice that on the Get request, android 2.3 isnt passing the cookie information from the browser to the server causing a 'HTTP/1.1 302 Moved Temporarily' response from the server back to the login page for reauthentication. I tried the same request on IOS mobile browser, chrome, safari, IE and the cookie information is sent on each request. Whats more puzzling is also that on img tag request, the