google-chrome-app

Trying to capture desktop image using getUserMedia and canvas

只愿长相守 提交于 2019-12-04 12:22:28
I am making an chrome extension through which I can get a screenshot of user's desktop. I am using chrome.desktopCapture API to get stream of selected window. I am creating video element dynamically. Once its source it set, I invoked the play() method. Then I created a canvas element and used it to draw an image of video. I am also able to get the dataURL using canvas.toDataURL() but when i open this url I see no image. And also this URL value remains same even during new capture. Manifest.json - { "name": "Desktop Capture Example", "description": "Show desktop media picker UI", "version": "1"

Can I access USB HID device via a Chrome App?

孤街浪徒 提交于 2019-12-04 12:10:56
I have a simple little dongle I want to debug by sending/receiving basic USB messages. It enumerates as an HID device (like an additional mouse), but am worried that I won't have access to it. I forgot the hardware and can't test with it for a couple days. Is it a futile effort to continue building a chrome extension to test it? Chrome App, USB documentation: https://developer.chrome.com/apps/app_usb Getting-started example: https://github.com/GoogleChrome/chrome-app-samples/tree/master/usb/knob Google Chrome now proposes a USB HID API. Have a look at the API: https://developer.chrome.com/apps

Communication between Chrome-app and a homepage with PostMessage

[亡魂溺海] 提交于 2019-12-04 08:43:39
I need to be able to send postMessage from a Chrome App through a webview to the homepage and back. I have established PostMessage from the Chrome App to the homepage, and the PostMessage is also catched by the homepage and a new one is send back, but this PostMessage reply is not caught by the Chrome App. I can see that it is possible on the Chrome-App API.: The guest will be able to send replies to the embedder by posting message to event.source on the message event it receives. So the problem is that i cannot get the Chrome App to catch the reply from the homepage, even though i am using

Storing video for offline use in PhoneGap/Chrome Apps

十年热恋 提交于 2019-12-04 08:34:00
问题 I have simple video playing apps both set up by PhoneGap and Chrome Apps CLI's (Both use Cordova), they contain a bunch of short educational videos and are needed as both website and application on Android/iOS for offline usage. I have found, so far, that the total size of the Chrome Apps bundled file can't exceed 10mb and the PhoneGap Build can't exceed 40mb - so both will need to download and store files locally for later use. The videos will need to open and play from within the WebView

Can't get NaCl C++ module to load file from within packaged app

≯℡__Kan透↙ 提交于 2019-12-04 08:18:20
I have a chrome packaged app that also includes a PNaCl/NaCl C++ module, as well as some data files which the NaCl module needs to read in. However, I am not able to get it to read in the files. I set it up according to all the documentation and official examples that I could find, as well as the answer to: How to include a data file in a chrome app for a native client module to read The nacl_io demo that comes with the SDK is able to do this, but it is in C, not C++. I came up with a simple example, which I'll post below. When you press the button on the page, the NaCl module should load the

show notifications in chrome extension

点点圈 提交于 2019-12-04 07:54:17
问题 I'm writing my first chrome extension. In my chrome extension I have added an option in Right Click Context menu. chrome.contextMenus.create({ "id": "MyExntesion", "title": "My Extension", "type": "normal", "contexts": ["image"], "onclick": this.handleClick }); In my handleClick method, I want to show a notification. This notification should pop out in top right corner of the browser window which just confirms that user has clicked on the context menu. How do I do that? I did some research

Using Google Maps API from Chrome App

无人久伴 提交于 2019-12-04 06:54:41
I'm trying to use Google maps inside of a Chrome App. Whenever I try to load the javascript I get the error: "Refused to load the script 'https://maps.googleapis.com/maps/api/js?key=Key&sensor=true' because it violates the following Content Security Policy directive: "default-src 'self' chrome-extension-resource:". Note that 'script-src' was not explicitly set, so 'default-src' is used as a fallback." I thought about trying to use a webview or a sandbox, but am having issues implementing either. The sandbox has an issue because I also am doing a http request to a service with no 'Access

What is the correct redirect URL for chrome.identity.launchWebAuthFlow?

依然范特西╮ 提交于 2019-12-04 05:55:49
I'd like to use the chrome.identity API in a chrome packaged app to allow the user to authenticate with github . From the app side, I'm happy with: chrome.identity.launchWebAuthFlow( {'url':'https://github.com/login/oauth/authorize?client_id=clientidgoeshere','interactive':true}, functionToTakeRedirectURL ); But I'm unsure what the redirect URL should be on the github side. When the app is live, I'll set the redirect url to https://appidgoeshere.chromiumapp.org on the github application page, but I don't think that url is available until the app is live. Does anybody know where to point the

How to launch my swf game in my manifest.json file for my Chrome packaged web app?

浪子不回头ぞ 提交于 2019-12-04 04:51:05
问题 I'm struggling to get my first Flash game on the Chrome store as packaged web app. All the tutorials I manage to find online are old and obsolete, or missing crucial info for a noob like me. This is what I have so far for my manifest.json file: { "name": "Snappy Turtle", "description": "Swim dangerous waters.", "version": "1.8", "manifest_version": 2, "app": { "background": { "scripts": ["background.js"] } }, "icons": { "16": "favicon.png", "128": "icon.png" } } Somewhere in the mix I need

Alternative to Javascript's prompt() for Google Chrome Web App

匆匆过客 提交于 2019-12-04 04:33:26
问题 I'm currently developing a Chrome Web App using the Chrome Platform APIs and Javascript and I simply can't find a way to display a prompt() dialog to ask the user for a value, in a way that prevents him from clicking anywhere else until he enters a value and accepts or cancels (meaning, EXACTLY how it works with Javascript). My problem is, I just can't find a way to do this with the Chrome Platform APIs (note that prompt(), alert() and confirm() can't be used in packaged apps). I already