html5-audio

Problem when using echo'd ++$value in javascript as part of a html5 audio player page

 ̄綄美尐妖づ 提交于 2020-05-16 04:20:28
问题 I have been making myself a 'soundboard' that populates a custom HTML5 audio player for each mp3 file it finds in a directory. Now that side of it is all working exactly as I expected but my problems started when I have attempted to add a custom timer which uses javascript. For each player, I was able to make custom controls and make the variables all marry up with things like <audio id="player<?php echo $count1++;?>" src="audio/<?php echo rtrim($file, " "); ?>"></audio> So using PHP echo a

node.js live streaming ffmpeg stdout to res

让人想犯罪 __ 提交于 2020-05-12 10:55:33
问题 I want node.js to convert an extremly long audio file to mp3, and the second data is available on stdout, node.js should send it to the client for them to play. I've written the following, and while it works, the html5 audio/video tag waits until ffmpeg is 100% done transcoding, where-as I want to start playing the video while ffmpeg is doing its thing. var ffmpeg = childProcess.spawn('ffmpeg', [ '-i', params.location, //location of the specified media file '-f', 'mp3', 'pipe:1' ]); res

Possible to analyze streaming audio from Icecast using Web Audio API and createMediaElementSource?

旧城冷巷雨未停 提交于 2020-05-09 19:50:20
问题 Using the Web Audio API and createMediaElement method you can use a typed array to get frequency data from audio playback in an <audio> element and it works in most browsers as long as the source URL is local (not streaming). See Codepen: http://codepen.io/soulwire/pen/Dscga Actual Code: var audioCtx = new (window.AudioContext || window.webkitAudioContext)(); var audioElement = new Audio('http://crossorigin.me/http://87.230.103.9:80/top100station.mp3'); // example stream audioElement

Html5 audio won't play in safari when the source is populated via JavaScript

浪子不回头ぞ 提交于 2020-04-15 22:39:36
问题 I am building a playlist in my Rails app and I am having some issues getting audio to play in Safari. If the html5 audio element's source is hard-coded, it plays just fine in safari but when it is populated via javascript, it does not play. this works just fine in Chrome and IE, but not in Safari. Here is the Ruby for the playlist entry: .playlist_column -@music_posts.each do |post| .entry{:id => post.id, :data => {:post_id => post.id, :source => post.mp3.url}} and here is the audio element,

How to play many audio files in sequence

淺唱寂寞╮ 提交于 2020-04-14 04:42:20
问题 I have several long stories which for which the source audio is sentence-by-sentence audio files. I would like to create a web page where one could listen to individual sentences of a particular story many times, or listen to the whole story from start to finish. To start, my web page has many <audio> elements, each of which is in a <p> with the corresponding text. Each of these <audio> elements corresponds to a single sentence of the story. I was about to start coding up a javascript object

jQuery: Multiple audio player buttons

这一生的挚爱 提交于 2020-03-27 19:02:12
问题 I would like to make 4 play buttons which plays mp3 audio. The play function is working every 4 buttons, but unfortunately the pause is not working for either of them. Maybe the pause condition is wrong? <div class="audio-button"> <audio src="media/test.mp3"></audio> </div> <div class="audio-button"> <audio src="media/test2.mp3"></audio> </div> <div class="audio-button"> <audio src="media/test3.mp3"></audio> </div> <div class="audio-button"> <audio src="media/test4.mp3"></audio> </div> $

jQuery: Multiple audio player buttons

狂风中的少年 提交于 2020-03-27 19:02:06
问题 I would like to make 4 play buttons which plays mp3 audio. The play function is working every 4 buttons, but unfortunately the pause is not working for either of them. Maybe the pause condition is wrong? <div class="audio-button"> <audio src="media/test.mp3"></audio> </div> <div class="audio-button"> <audio src="media/test2.mp3"></audio> </div> <div class="audio-button"> <audio src="media/test3.mp3"></audio> </div> <div class="audio-button"> <audio src="media/test4.mp3"></audio> </div> $

Javascript/html5 play multiple audio files or overlap audio

為{幸葍}努か 提交于 2020-02-28 07:51:58
问题 Let me start by saying I am trying to play a mp3 file whenever the player collides with a wall, simple enough and done. But I wish to have another sound file play when the player hits another wall. I have tried using both <audio> tag in the html file, than playing it in Javascript: var sound = document.getElementById("TheHtml5Tag"); Still the same issue, only one sound can be played, the next sound won't play untill the first one is finished. Even when using multiple <audio> tags and multiple

Do Mobile Browsers send httpOnly cookies via the HTML5 Audio-Tag?

浪子不回头ぞ 提交于 2020-02-13 00:22:16
问题 I try to play some mp3 files via the html5 audio-tag. For the desktop this works great (with Chrome), but when it comes to the mobile browsers (also Chrome (for Android)), there seem to be some difficulties: I protected the stream with some password an therefore the streaming server needs to find a special authentification cookie (spring security remember-me). But somehow the mobile browser doesn't send this cookie when it accesses the mp3-stream via the audio tag. When I enter the stream URL

Do Mobile Browsers send httpOnly cookies via the HTML5 Audio-Tag?

折月煮酒 提交于 2020-02-13 00:22:14
问题 I try to play some mp3 files via the html5 audio-tag. For the desktop this works great (with Chrome), but when it comes to the mobile browsers (also Chrome (for Android)), there seem to be some difficulties: I protected the stream with some password an therefore the streaming server needs to find a special authentification cookie (spring security remember-me). But somehow the mobile browser doesn't send this cookie when it accesses the mp3-stream via the audio tag. When I enter the stream URL