chrome extension that loads files from disk and plays music in background

I am creating a chrome extension that loads files from disk and plays music in the background.
I have a popup.html page that has an input element that loads audio files, converts them into dataURL and sends it to the background page, which is loaded into an audio element.

Now chrome doesn’t allow me to directly access the file from disk through the background page. also, I’m not allowed to send the file from the popup to the background page directly. I can’t use chrome.storage as a means of transferring the files also. so the only thing i can do is convert to dataURl and send.(if there are any other means of file transfer. please let me know)

the problem is when I select a lot of music files, the dataURL strings take up a lot of memory. this could cause performance issues, especially on systems with low ram.

so whats the most memory efficient way to send, store and load these audio files?
and also I tried using chrome.storage but there was a problem with the quota management.

anyways thanks for all the help!

Muting/changing volume/EQ of tabs or elements using JavaScript

For context about the procedure I am trying to figure out, see this youtube video:
https://www.youtube.com/watch?v=t2muMCAaTL0

which demonstrates the use of this chrome/firefox?/opera extension:
https://chrome.google.com/webstore/detail/ears-bass-boost-eq-any-au/nfdfiepdkbnoanddpianalelglmfooik

Disclaimer, I am not promoting the extension, nor do I think it is necessarily good practice to arbitrarily force tabs to sound a particular way, though I do see how useful the extension could be for some people.

I am curious how he did it, however, because it seems like controlling the volume and EQ of DOM elements isn’t trivial, and I haven’t been able to find any tutorials on how to do it. For example, is this approach viable for iframe elements? Wouldn’t that potentially produce a cross-domain issue?

That being said, I am interested in volume controls/EQ not only for embedded iframes but also for locally hosted objects in my program. I would like to programatically control EQ, in the way that https://alemangui.github.io/pizzicato/ or tone.js can do but for modular sources, like a youtube video or a soundcloud stream, effectively allowing the user to “remix” a premade sound.

As far as I can tell, tone.js and pizzicato can only do this for an explicitly provided source sound, in the form of an mp3 or other.

Any direction would be appreciated, thanks!

Streaming the audio over wifi(LAN) via a Chrome App

I want to build an app (chrome app on Linux) which can record screen and stream it to the devices connected to this pc.

Application :Suppose a group of people is watching a movie on a PC, I want to stream the audio from this PC to the mobile phones of viewers, so that they can use earphones and listen peacefully (kind of like wireless experience), of course using a LAN(and not internet).

Research: I like to develop chrome apps and extensions as hobby, i came to know that we have a desktopCapture api which can help me capturing the audio/video.

chrome.desktopCapture.chooseDesktopMedia([
  'screen'], function(streamId) {
  navigator.webkitGetUserMedia({
    audio: {
      mandatory: {
        chromeMediaSource: 'system',
        chromeMediaSourceId: streamId
      }
    },
    video: false, // We only want audio for now.
  }, function(stream) {

    // HOW TO STREAM THIS AUDIO ONLY CAPTURED FROM DESKTOP ,SAY 
   //  EPISODE OF GAME OF THRONES PLAYING IN VLC MEDIA PLAYER

  }, function(error) {
    // Handle error
  });
});

Help needed:

Suppose all the viewers’ mobiles phones and the pc, are connected to a local hotspot/router.Every mobile phone then must go the url specified by the ip:address of the pc to make a connection and recieve smooth audio.

Now how do i move ahead from here.Which apis and how to use them, not that experienced in socket programming, but read about something sockets.udp api but couldnt understand.

Can this be done in Linux ?

I searched for similar extensions , found one :
SoundIt chrome app

Any help will be appreciated.

Audio player in background controlled by script in front – chrome extension

I am able to set an audio element in the background and control from the content script. However, I am creating two audio elements and since i want the content script audio element to be a normal player (with a play button and controls) the sound always overlaps. Both players, in the background and in the content script play at the same time.
If I were to control the background audio element with a simple button in the content script it would work since there is no audio element in the front to be played and I would simply tell the background audio to play / stop playing. The audio element requires one… How can I do this?

//CONTENT SCRIPT

document.addEventListener('DOMContentLoaded', function() {
   var audioEL = document.getElementById('stream');
   audioEL.addEventListener('play', streamOrder);
   audioEL.addEventListener('pause', streamOrder);
});


function streamOrder () {
   chrome.extension.sendMessage({ msg: "manageStream" });
}


// BACKGROUND SCRIPT
var STREAM_STATE = false

function manageStream () {
if(!STREAM_STATE) {
    if(document.getElementById('player') == undefined) document.write('