0
{
  "manifest_version": 2,

  "name": "Kitten Radio Extension",
  "description": "Listen while browsing the internet freely and without a background popup open to Kitten Radio",
  "version": "1.0",
  "permissions": [
    "http://somewhat.server.com:8041/"
  ],
  "background": {
    "page": "background.html"
  },
  "browser_action": {
    "default_icon": "icon.png",
    "default_popup": "popup.html"
  }
}

popup.html:

<!DOCTYPE html>
<html>
    <head>
        <title>Kitten Radio</title>

        <meta charset="utf-8">
    </head>
    <body>
        <audio id="player" src="http://somewhat.server.com:8041/;mp3" controls>This player do not work on this browser</audio>
    </body>
</html>

Hello again stackoverflow!

I'm trying to develop a chrome extension to play music in the background whilst the user can navigate the web.

The popup is showing fine and the audioplayer is there, but the audio won't load. Using "Inspect Element" I found that the stream is stuck on "Pending".

How can I solve this?

I've tried *://*/ in the "permissions" aswell.

Thew
  • 15,789
  • 18
  • 59
  • 100
  • `http://somewhat.server.com:8041/` is a match pattern for that exact URL. To grant permissions to any page on that origin, you need `http://somewhat.server.com:8041/*` (note the star at the end). Its also worth noting that your page will only play while the the browser action popup is open; to achieve continuous play, you need to put the ` – apsillers Jul 30 '13 at 13:06

1 Answers1

2

The popup window does not stay opened. So you should try playing the file in your background page. Here is two posts on this subject:

I do not think the issue comes from your audio source.

Community
  • 1
  • 1
Paul Fournel
  • 10,807
  • 9
  • 40
  • 68