Nw.js: MediaElementAudioSource outputs zeroes due to CORS access in NW.js (Chrome OK)

Created on 18 Mar 2017  路  4Comments  路  Source: nwjs/nw.js

NW.js 0.21.3 (normal/sdk)
OS: Windows 10 32/64 bit

if I run this file (check attach) in Chrome and disable same origin policy (chrome.exe --user-data-dir="C:/Chrome dev session" --disable-web-security), everything works fine.

But if you run it in NW.js, i got a warnning: MediaElementAudioSource outputs zeroes due to CORS access.

I tried to use audio.crossOrigin = "anonymous", and nwjs displays an error: Failed to load because no supported source was found audio.

It possible to fix?

test_file.zip

Most helpful comment

I added a manifest and ran your sample but didn't hit any error:
{ "name": "test", "main": "test.html" }

All 4 comments

Should be fixed. Thanks for reporting.

I added a manifest and ran your sample but didn't hit any error:
{ "name": "test", "main": "test.html" }

OK i know what happened... If i added a manifest everything is ok, but if i drag and drop file (my sample) to nwjs i got a warning:

test.

Thanks Roger.

If you run it without manifest, then it's just a normal webpage that web security should be applied. See more on security model in NW here: http://docs.nwjs.io/en/latest/For%20Users/Advanced/Security%20in%20NW.js/

Was this page helpful?
0 / 5 - 0 ratings

Related issues

rumax picture rumax  路  4Comments

xland picture xland  路  3Comments

adam-lynch picture adam-lynch  路  4Comments

xzh-loop picture xzh-loop  路  3Comments

jportoles picture jportoles  路  3Comments