html5-audio

Unable to seek audio file in chrome served by my own server

狂风中的少年 提交于 2019-12-08 05:48:52
问题 I am trying to make a file server in Java which can serve seekable audio files. But my served files are not seekable in Google Chrome html5 audio player. When I seek forward it does nothing (even on downloaded content), if seek too much backward it starts from beginning. If I load the file from different location (http://www.vorbis.com/music/Epoq-Lepidoptera.ogg) then it is seekable. Here is my server code package com.company; import com.sun.net.httpserver.Headers; import com.sun.net

Possible to create an AudioBuffer from memory ie an Int8Array

僤鯓⒐⒋嵵緔 提交于 2019-12-08 05:06:21
问题 Is there a way to add raw data from memory as a sample to the Web Audio Api? I would like to add a Int8Array (or Int16Array) as a buffer, the buffer just have the samples and no format as WAV or MP3. I have tried the audioContext.createBuffer and such without succes. Something like this: var buffer = audioContext.createBuffer(1,8192, 22000); var intArray = new Int8Array(....); // -- fill intarray buffer.buffer = intArray; ... var source = context.createBufferSource(); source.buffer = buffer;

Workbox pre-cached audio with range requests router fails to play in Chrome when served from Firebase

此生再无相见时 提交于 2019-12-08 05:00:28
问题 Background I have created a PWA test project to find out how to get audio caching working with Workbox, including scrub/seek using the range requests plugin. I want the app to precache all audio and for this audio to be playable offline, including scrub/seek. Pre-caching the audio can be done in one of two ways: Using Workbox injectManifest. By manually adding audio files to a cache using cache.add(URL) But audio files cached with the first method (injectManifest) will not scrub/seek because

Select random <li> element

泪湿孤枕 提交于 2019-12-08 04:57:22
问题 I'm trying to make a shuffle button for my HTML 5 player. My player is set up like this to go the next track: $('.nextbutton').on("click", function(){ var next = $('li.playing').next(); if (!next.length) next = $('#stuff ul li').first(); next.addClass('playing').siblings().removeClass('playing'); var title = $('a#tunes img', next).attr("title"); $("a.songtitle span").text(title); var artist = $('a#tunes img', next).attr("artist"); $("a.songartist span").text(artist); audio.load($('a#tunes',

Possible to create an AudioBuffer from memory ie an Int8Array

£可爱£侵袭症+ 提交于 2019-12-08 04:47:29
Is there a way to add raw data from memory as a sample to the Web Audio Api? I would like to add a Int8Array (or Int16Array) as a buffer, the buffer just have the samples and no format as WAV or MP3. I have tried the audioContext.createBuffer and such without succes. Something like this: var buffer = audioContext.createBuffer(1,8192, 22000); var intArray = new Int8Array(....); // -- fill intarray buffer.buffer = intArray; ... var source = context.createBufferSource(); source.buffer = buffer; source.connect(context.destination); If that is not possible is there a sound format compatible with

Capturing sound input with low latency in the browser

做~自己de王妃 提交于 2019-12-08 02:26:51
问题 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. 回答1: "Web Audio API latency was bad" ignores a lot of potential issues. Low latency

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

為{幸葍}努か 提交于 2019-12-08 01:38:29
问题 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

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

戏子无情 提交于 2019-12-07 19:20:04
问题 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

HTML5 can't create video element on Chromium 38

房东的猫 提交于 2019-12-07 18:40:23
问题 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 :

variable speed control for audio playback in the browser?

落花浮王杯 提交于 2019-12-07 18:12:44
问题 Is there a way to change the playback speed of audio in the browser? What is best to accomplish this task, html5 audio, or flash, or something else? Are there any specific libraries that would help with this? 回答1: Use the Web Audio API. In the following code I answered your other question. best way to loop audio in the browser? Modify the code in my answer above as follows for a playback speed example. Right below source.loop = loopOnOff; add source.playbackRate.value = 1; // change number to