Trying to find sporadic audio source in Chrome - google-chrome

For some reason, my Yahoo email tab sporadically plays audio from the beginning of an ad. The audio is definitely coming from this tab because it shows the small audio icon while it plays. I'm looking for some help using Chrome's Developer Tools. When I hear the audio clip, I have the Developer Tools open and I reference the [Network] tab, but I don't see any audio files referenced. I think it might be part of JavaScript. I'm looking for some guidance on how to isolate the source of the audio. Yahoo support was zero help.

Credit to #wOxxOm:
In DevTools, Sources, Event Listener Breakpoints, set breakpoints on all Media then wait till the sound is played or trigger it if you can. Then you should get some minified JS code, which you can pretty-print for easier reading, although the code is still minified and thus obfuscated so you have to kind of guess what it's doing. In my case, the code stopped on an ended event, but not on play. Still, I was able to find the code that actually played the sound - it went something like:
(h = e.play()) ? h.then(()=>{
a.Pa.info`Playing ${e.src}`;
a.ta = !0
}
and hovering over src (I could also have inspected e in that context to find src) showed me the URI for an mp3 that was the sound I was looking for! Breakpoints set on WebAudio did not work in this case - maybe it depends on the type of audio media being played? But I found the mp3 I was looking for! (Not saying what it was, but it was a very short clip - about 2 seconds - and as I understand it, samples below a certain length are not copyrightable, although I'm not 100% sure about that, so beware - as it is, I intend to use it for a personal, non-commercial project.

Follow these Steps to get the URL of the audio
Open the web page
Inspect the web page
Go to the Sources tab
Expand the Event Listener Breakpoints dropdown
Expand the Media dropdown
Mark the playing checkbox

Related

How to set a breakpoint where a sound plays

I want to find out where in a webpage's source code does a sound effect play. That'd allow me to better understand the code and obtain the audio file as well. I searched in the "Sources" and "Network" tabs of the Chrome Inspector, but there are no audio files there. The sound is probably fetched by an AJAX request or generated using the HTML5 Web Audio API. How do I set a breakpoint in the Chrome Debugger to pause when a sound plays?
As suggested in Abarnett's comment:
Use a browser add-on/extension/plug-in such as Chrome Audio Capture to record internal sounds in the browser.

Playing playlist of videos in background on Chrome

Due to a fairly recent update, Chrome no longer will autoplay media content such as video if it tries to start in a tab or window which does not have focus.
There are a few sites, including my own - which rely on switching then playing videos in the background as a music player. This has been broken by Chrome, with their idea being that it prevents annoying videos from playing.
I'm reluctant to even consider building a chrome extension to circumvent this (if that would even work), but would like to hear how if possible. Is there any way to get around this annoying issue?
edit: according to this reddit post it may not be Chrome, but YouTube's chrome specific implementation...
edit2: this Chrome issue states that “Once a tab / RenderFrame has ever played media before, it’s allowed to continue to autoplay/autoload indefinitely; this is to support playlist type applications.” - Perhaps if somehow a 'RenderFrame' contains all future media which is also loaded by AJAX this will work... whatever a render frame is (Since as noted in the comments, a page reload/change does not count as the user having allowed autoplay.)

RecordRTC isn't working perfectly

I would like to dive into WebRTC, particular audio recording. So I tried this DEMO and the first problem arose: when I record in the latest Google Chrome I always hear a high-pitched buzzing sound in the background which is very annoying and probably not intended.
Is that a problem with my computer / settings or is this just normal? Because if this is ordinary, WebRTC is pretty useless for my purpose.
If this is related to my audio-midi-settings – here are some screenshots:
Goto source code and comment this line:
// __stereoAudioRecorderJavacriptNode.connect(context.destination);
Actually microphone is connected with speaker. This causes the recorded audio to be played back in the speakers.
Updated:
This workaround doesn't seems to be working. Sorry.
It was taken from here.

Can my webpage pick up the audio being played in the browser’s other tabs?

I am creating a HTML5 visualizer for a splash page. In my original briefing I was asked to make the page pick up whatever audio was coming out of the pc's speakers. My first question is, is this possible? I am assuming it that it is not as the ability to pick up microphone input seems to have only just been implemented.
My second option was to get the page to pick up whatever audio the browser was kicking out (on other tabs). Does anyone know how this might be done on, lets say, chrome?
I hope this is a good question. I am very new to website development.

do html5 audio tags eat up resources

I have pages where i need to play dozens of small audio file when the user clicks on things. Responsiveness is very important.
I'm thinking of using one for each file, and preloading the audio files. Is this the a reasonible approach?
Thanks.
What I experience using SoundManager2 (audio Javascript lib) is that Chrome nor Firefox have no issues loading and playing multiple (100+) sounds through their Html5 capabilities
(Firefox must play OGG though)
With IE9 it's a different story. Looks like it has a limit to load and play no more than 40 sounds. :-(
As, the game we develop requires constantly to have 50+ sounds played within 1 minute period, we have to fallback to Flash for playing sounds on IE9.. luckily SM2 does it too
I also confirm this behaviour with html5 mode using jPlayer. I'm only able to create 40 instances of jPlayer. Each can preload and play sound that it defines.
41st and following instances will fail with an error on IE9/Windows7
Error: "Media URL could not be loaded"
It's reasonable, and probably the correct solution. I recently wrote a demo application (http://www.soundscribe.com) that makes heavy use of individual (and simultaneous) audio clips in HTML5. IE9 and FF3/4 handle it well. Chrome has some issues that seem to be specifically related to simultaneous playback (which probably won't apply to your app). The biggest block I hit was in IE9, which seems to have a mysterious limit on the number of audio objects that can exist at once. The max is about 40, after which IE9 will silently fail to download the file. FF and Chrome both try to support an unlimited number.
The alternative approach of putting all the audio in a single file and changing the offset to play is a bad choice for several reasons. It's much more complicated to code, you need to keep up with additional metadata (where does the clip start, how long is it), and it's likely to work slightly different between browsers. And the worst part, there's really no way to know when your clip is fully loaded. You can only tell when the clip "can play through", which is determined by the browser based on the size of the audio file and the current download rate. This means that even after the browser reports the audio clip is ready, you may not be able to play a clip somewhere near the end.
It seems like a reasonable approach. However you need to consider a couple of things.
Each sound clip will need to be held in memory. While this is will not matter for most cases, users with a lot of tabs open, multiple programs open or old computers may get slow down on their computer. Especially if the sound files are large.
From a usability point of view, if I hear a sound every time a click a button on the site, I'll leave immediately