simplewebrtc / SimpleWebRTC

Simplest WebRTC ever
Other
4.66k stars 1.19k forks source link

SimpleWebRTC not work in chrome packaged app #430

Open alexey2baranov opened 8 years ago

alexey2baranov commented 8 years ago

Hi there!

I have written web page with simple SimpleWebRTC example from tutorial and it works great. Next step i have packaged it into Chrome Packaged App with manifest below and get this error

extensions::platformApp:17 window.localStorage is not available in packaged apps. Use chrome.storage.local instead

Looks like SimpleWebRTC uses API which is not supported inside Chrome Apps/ How then I can use it in Chrome App?

manifest.json
{
    "manifest_version": 2,
    "name": "termilocal",
    "version": "2.0.0",

    "description": "Терминал оплаты",
    "icons": {
        "128": "icon128.png"
    },

    "author": "2Бита",

    "app": {
        "background": {
            "scripts": ["js/background.js"]
        }
    },
    "permissions": [
        "http://*/",
        "tts",
        "audioCapture",
        "videoCapture"
    ],
    "kiosk_enabled": false
}

Sorry for my pure english Thanks a lot !

fippo commented 8 years ago

does it work if you remove these four lines? https://github.com/andyet/SimpleWebRTC/blob/master/simplewebrtc.bundle.js#L4804-L4808

alexey2baranov commented 8 years ago

Yap! It works!

I am very appreciate you for fast response.

Looks like it should be fixed in next release

alexey2baranov commented 8 years ago

Yesterday we got another 5 errors same issue. We have to comment all lines with testing code and now it works.

It would be great to rewrite this testing code so library can work out of the box.

Thank you very much!

xdumaine commented 8 years ago

PRs are welcome!

sajid9 commented 6 years ago

@fippo can you help me please which chorme extension use to share screen

JakeTrock commented 6 years ago

I don't think you use a chrome extension for that, you use getscreenmedia,I believe one of the demos utilises this