Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8269803
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T06:21:13+00:00 2026-06-08T06:21:13+00:00

I’ve got some troubles with my new ChromeApp. So.. I’ve started using JavaScript FileSystem

  • 0

I’ve got some troubles with my new ChromeApp.

So.. I’ve started using JavaScript FileSystem API, so i
use it to create mp3 files (my app is a html5 player).

The FileEntry object from the FileSystem API gives the toURL() method
for files which are stored in filesystem. In the ChormeApps this method
returns something like this:

filesystem:chrome-extension://mhldgbaidgpagmimniipggmajbodaeco/persistent/cbd416046ae7a567d4629fc38ac80864.mp3

But when i trying to use this url in <audio> tag as value for src attribute
i getting this error:

Refused to load media from 'filesystem:chrome-extension://mhldgbaidgpagmimniipggmajbodaeco/persistent/cbd416046ae7a567d4629fc38ac80864.mp3' because of Content-Security-Policy.

So i tried to use clear name with relative path

<audio src="cbd416046ae7a567d4629fc38ac80864.mp3" />

and with Chrome App root path

<audio src="chrome-extension://mhldgbaidgpagmimniipggmajbodaeco/cbd416046ae7a567d4629fc38ac80864.mp3"/>

and with “persistent” folder

<audio src="chrome-extension://mhldgbaidgpagmimniipggmajbodaeco/persistent/cbd416046ae7a567d4629fc38ac80864.mp3"/>

In last 3 cases i’ve got 404 error.
So, how can i enable loading media from filesystem? Something in the manifest in the content_security_policy or maybe in the permissions? Or there is some magical path to use?

Thanks in advance for your answers.

Update:
I using content_security_policy directive:

default-src 'none'; style-src 'self' 'unsafe-inline'; img-src 'self' http://*.userapi.com; script-src 'self' 'unsafe-eval'; connect-src 'self' http://*.userapi.com http://vk.com http://last.fm http://ws.audioscrobbler.com; media-src 'self';

But media-src 'self' doesn’t brought needed results. I still gettin’ error “Refused load media”.

Update 2:
I’ve found an ugly hack to do what i want: media-src: 'self' * does the job. But if you have some ideas on how to solve this problem i’ll be really glad to see them.

Update 3:
Problem solved. Thanks to Mihai Parparita for his answer.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-08T06:21:16+00:00Added an answer on June 8, 2026 at 6:21 am

    You’ll need to use a media-src 'self' filesystem: CSP directive in order to allow filesystem: URLs ('self' only includes URLs directly in your extension, not wrapped filesystem: ones).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am reading a book about Javascript and jQuery and using one of the
I want use html5's new tag to play a wav file (currently only supported
I have thousands of HTML files to process using Groovy/Java and I need to
I'm making a simple page using Google Maps API 3. My first. One marker
I have just tried to save a simple *.rtf file with some websites and
link Im having trouble converting the html entites into html characters, (&# 8217;) i
That's pretty much it. I'm using Nokogiri to scrape a web page what has
For some reason, after submitting a string like this Jack’s Spindle from a text
I am trying to understand how to use SyndicationItem to display feed which is
I used javascript for loading a picture on my website depending on which small

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.