user63898
user63898

Reputation: 30963

can chrome extension emmbed local swf , to load files?

i have swf mp3 player that i like to load mp3 files from local directory to the chrome extension.
my questions is :
1.can chrome extension embed swf file that comes with the extension.
2.can chrome extension load files from local drives . like FF extension.

Upvotes: 0

Views: 1465

Answers (2)

Eli Grey
Eli Grey

Reputation: 35903

  1. Yes.
  2. Check out the File API. Note that users will need to manually select the files or folders themselves. If you want full filesystem access, you need to create a native plugin and compile it for all the platforms you want to support (e.g. .dll for Windows, .so for Linux).

Upvotes: 1

sblom
sblom

Reputation: 27363

For #2, sadly not possible. The Chrome extension model disallows direct access to local files for security reasons.

For #1, it's definitely possible. Worst case is that you'll have to write your own NPAPI plug-in that hosts Flash. I haven't yet found another extension that manages to simply embed Flash player. At least not without requiring individual end users to enable chrome-extension://*/ URLs in the Flash player security dialog. That might get you started.

Upvotes: 0

Related Questions