html5-audio

Seamless audio loop to an arbitrary position

﹥>﹥吖頭↗ 提交于 2019-12-06 20:52:12
问题 One of the things I most love about the MOD format is the ability to loop back to any given point in the song, making it perfect for songs that have an "intro" followed by a "main loop". Of course, MP3 can't do this. Up until now, I've done things like this: <audio src="/path/to/song.mp3" onEnded="this.currentTime = 12.345;"></audio> Where the float value is the time at which the main loop starts. While this works there is a noticeable fraction-of-a-second pause as the audio restarts. I can

Android webview black screen while playing

◇◆丶佛笑我妖孽 提交于 2019-12-06 15:08:01
问题 I'm developing an app that uses WebView to load external video (.mp4), but the page plays only audio, and the video is only "black". I've searched so much and did all possible things to try solve this problem but I failt. Can you help me? MainActivity.java -- REMOVED -- AndroidManifest.xml <?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="topflix.topflix"> <uses-permission android:name="android.permission.INTERNET"/> <uses

Specify that src=“” in <audio> is a mp3 file without .mp3 extension?

[亡魂溺海] 提交于 2019-12-06 12:54:17
I need a way to specify that something like <audio src="http://somesite.com/track/377374"></audio> Has a mp3 file as a source. I am unable to use .mp3 extension at the end of the url, so I need other way to achieve this. I'm using custom player jQuery plugin which falls back to old browser version if it can't determine what file format is specified in audio tag. I's there a way to achieve this? There is a function that check the file extension and tries to match canPlayType = function( file ) { var audioElement = document.createElement( 'audio' ); return !!( audioElement.canPlayType &&

Fade HTML5 audio (adjust volume) using jQuery (window).scroll

廉价感情. 提交于 2019-12-06 10:28:57
I am attempting to make a page that uses html5 audio to loop a sound file in the background and fade out as the user scrolls down. Ideally it would also fade in as the user scrolls back up. I know I am way off, but here is what I am working with: html: <html lang="en-US"> <head> <style>article {height:1000px; background:yellow;}</style> </head> <body> <article> <audio loop id="soundTour" src="longdong.wav"></audio> </article> <script type='text/javascript' src='http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js'></script> </body> </html> jQuery: $(document).ready(function() { var

HTML5 audio tag onplaying even is triggered before audio play in android

[亡魂溺海] 提交于 2019-12-06 08:38:37
问题 I have write a code for highlight text according to audio. In this the logic is when audio start playing we fire a highlight function. which highlight each word for given no of time. And it is working fine for window PC and Desktop. But In android highlight function trigger before audio start that is why audio and highlight is not synchronized. Below is the code. function highlight(start,totalWords,aid) { var wtime = data[start]/defaultPlayback; $("#W"+start).css("color",'yellow'); setTimeout

Sending mp3 file through PHP to be used with the audio tag of HTML5 fails in the middle of the mp3

南笙酒味 提交于 2019-12-06 08:24:39
I'm trying to send my mp3 files through a PHP script in order to hide the path to the file in the HTML. Everything works perfectly fine except half way into the mp3 chrome gives me a GET [URL] error. And the rest of the mp3 is just blank. The audio tag thinks it's still reading the file, but there is no sound. This is how I'm sending the mp3 file from php: if (file_exists($filename)) { header("Content-Transfer-Encoding: binary"); header("Content-Type: audio/mpeg"); header('Content-length: ' . filesize($filename)); header('Content-Disposition: inline; filename="' . $filename . '"'); header('X

HTML5 can't create video element on Chromium 38

痴心易碎 提交于 2019-12-06 08:05:38
Until Chromium 37, var videoElement = document.createElement('video') would create a video element, but with Chromium 38 it's not the case anymore. EDIT If you want to check this, open a console and type : var videoElement = document.createElement('video') videoElement.toString() This should return "[object HTMLVideoElement]" proving videoElement is a video element. In Chromium 38 I get : "[object HTMLUnknownElement]" Is there any way to fix this ? PS: I created an issue on chromium issues : https://code.google.com/p/chromium/issues/detail?id=427856 来源: https://stackoverflow.com/questions

HTML5 Audio - Why not working on iOS? (NO autoplay involved)

馋奶兔 提交于 2019-12-06 07:48:58
I built a simple demo app to test HTML5-Audio. When you touch or click the robot's head the webapp says "eins", which is german for "one" (I had this soundfile on my computer for testing). You can test the demo app here: http://jstesproject.cwsurf.de/ (Remarks: The robot is the phonegap icon, but there is NO phonegap or cordova technology involved. It is plain HTML5, Javascript (+jQuery) and CSS. Also, you have manually click the robot's head, so there is NO autostart involved.) The webapp works fine on desktop browsers (I tested Chrome and Firefox) and on Android native browser (I tested with

How to save microphone audio input?

不羁岁月 提交于 2019-12-06 07:36:49
问题 I need to save microphone input to use later in an AudioElement. I do this to get microphone input: window.navigator.getUserMedia(audio: true).then((MediaStream stream) { # what should go here? }); What should I do to save the audio? 回答1: There are many horrible stupid examples out there where you are able to play the current audio recording in the current browser window. Is there ever a use case for this. For video I can imaging that one want to build a Skype like application and have a

Capturing sound input with low latency in the browser

白昼怎懂夜的黑 提交于 2019-12-06 07:30:42
Is it possible to capture low-latency sound input in the browser? mainly for recording a guitar. (I know it depends on the hardware too, but let's assume the hardware is good enough). I tried to use the Web Audio API, but it had somewhat bad latency. Are there any other technologies out there that gives high performance sound-input capturing in the browser? Is it possible to use Unity3D for that? Thanks. "Web Audio API latency was bad" ignores a lot of potential issues. Low latency nearly always needs some tweaking. 1) Latency is considerably lower (3ms or so, commonly) on OSX than on Windows