html5-audio

How do I detect if HTML5 audio play/pause state has been changed outside of webpage?

a 夏天 提交于 2020-01-14 19:30:29
问题 I have a web app that plays an HTML5 Audio stream of a radio station. I'm using jQuery to play/pause the audio and toggle the play/pause button like so: var playerStream = document.getElementById('player-stream'); $('section.player').hammer().on('tap','button.toggle-stream', function(event){ if (playerStream.paused) { playerStream.play(); $('button.toggle-stream').attr('data-icon','s'); } else { playerStream.pause(); $('button.toggle-stream').attr('data-icon','p'); } }); This all works great.

How do I detect if HTML5 audio play/pause state has been changed outside of webpage?

老子叫甜甜 提交于 2020-01-14 19:30:23
问题 I have a web app that plays an HTML5 Audio stream of a radio station. I'm using jQuery to play/pause the audio and toggle the play/pause button like so: var playerStream = document.getElementById('player-stream'); $('section.player').hammer().on('tap','button.toggle-stream', function(event){ if (playerStream.paused) { playerStream.play(); $('button.toggle-stream').attr('data-icon','s'); } else { playerStream.pause(); $('button.toggle-stream').attr('data-icon','p'); } }); This all works great.

Audio not loading in HTML's audio tag

北战南征 提交于 2020-01-14 13:07:05
问题 I'm testing the audio HTML tag. And it is working on my testing env, but for some reason not on my production env. I simply use: <audio src="/sandbox/test.mp3" controls="controls"></audio> . The testing site is on Windows and the production site is on Linux, but that should make any difference I think. I can download the track so I know it is in the right place. The production url is: http://pieterhordijk.com/sandbox As stated the exact same code works on testsite. Anybody has any idea as to

Audio not loading in HTML's audio tag

时光毁灭记忆、已成空白 提交于 2020-01-14 13:04:58
问题 I'm testing the audio HTML tag. And it is working on my testing env, but for some reason not on my production env. I simply use: <audio src="/sandbox/test.mp3" controls="controls"></audio> . The testing site is on Windows and the production site is on Linux, but that should make any difference I think. I can download the track so I know it is in the right place. The production url is: http://pieterhordijk.com/sandbox As stated the exact same code works on testsite. Anybody has any idea as to

Change the control colors in the HTML5 audio tag [duplicate]

倖福魔咒の 提交于 2020-01-14 10:47:52
问题 This question already has answers here : Is it possible to style html5 audio tag? (9 answers) Closed 5 years ago . Is it possible to change the 'play', 'pause', and 'volume' colors in the HTML5 audio tag. They have a very dark color when using Firefox and they make the player look disabled. 回答1: Answer: No. Currently, you cannot change the color of the controls of the HTML5 audio tag. If you enable the controls attribute, the appearance of the 'play', 'pause', and 'volume' will be dependent

Control multiple html5 audio tracks using a single controller

柔情痞子 提交于 2020-01-13 06:36:09
问题 I am trying to implement a very minimal audio player for a web site. The interface is rather simple. It has a play/pause button, and a mute/unmute button. The problem I have is implementing multiple instances of the same player for different tracks. The javascript for the player is: jQuery(function() { var myAudio = document.getElementById("myAudio"); var btnPlayPause = document.getElementById("btnPlayPause"); var btnMute = document.getElementById("btnMute"); btnPlayPause.addEventListener(

How to properly provide data for <audio>?

旧街凉风 提交于 2020-01-12 05:27:06
问题 I am serving binary data for HTML5 audio thorough .aspx page. The file can be played but there is a problem with SeekBar and replaying in Safari (iPad), Chrome and Firefox. Edit I have simplified (hopefully not too much) the code and full listing is presented (page file name is obviously play.aspx). <%@ Page Language="C#" %> <!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml"> <script runat="server"> protected void Page_Load(object sender, EventArgs e) { if ( Request["filename"] !=

Chrome only Loading 6 HTML5 audio tags

怎甘沉沦 提交于 2020-01-10 17:46:49
问题 We are working on project at wavestack.com and we are dealing with an issue that its giving us a hard time. Our page is supposed to load many audio tags at the same time, from a streaming source. You can check the concept in the following link: http://wavestack.com/songs/nTNonwsCSg932CtzPLk1FA== The problem comes when we're trying to load more than 6 tracks at the same time, as shown in the following link: http://wavestack.com/songs/hp7G8CSsg45t3fV5YNeqbQ== This page is working well on

HTML5 audio - currentTime attribute inaccurate?

不想你离开。 提交于 2020-01-10 11:14:03
问题 I'm playing around a bit with the HTML5 <audio> tag and I noticed some strange behaviour that has to do with the currentTime attribute. I wanted to have a local audio file played and let the timeupdate event detect when it finishes by comparing the currentTime attribute to the duration attribute. This actually works pretty fine if I let the song play from the beginning to the end - the end of the song is determined correctly. However, changing the currentTime manually (either directly through

HTML5 audio - currentTime attribute inaccurate?

狂风中的少年 提交于 2020-01-10 11:13:02
问题 I'm playing around a bit with the HTML5 <audio> tag and I noticed some strange behaviour that has to do with the currentTime attribute. I wanted to have a local audio file played and let the timeupdate event detect when it finishes by comparing the currentTime attribute to the duration attribute. This actually works pretty fine if I let the song play from the beginning to the end - the end of the song is determined correctly. However, changing the currentTime manually (either directly through