Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Add some comments for windows users. #204

Merged
merged 2 commits into from

4 participants

@sdaclin

These are improvements in documentation for windows user in order to manage to use chrome.usb with generic usb drivers.

@beaufortfrancois

Will wait a little bit so that the chromium team addresses the root issue regarding the chrome.usb API for Windows. Thanks!

@sdaclin sdaclin closed this
@sdaclin sdaclin reopened this
@beaufortfrancois

They're still working on it. Didn't forget it ;)

@sdaclin
@beaufortfrancois

Since it might take long, I think it's fair to merge this doc fix now.
What do you think @mangini?

@mangini
Owner

@sdaclin, thanks for your PR. I don't feel confident about suggesting a third-party USB driver without proper security review, which I'm unable to do now. Could you change it to remove the zadig reference and frame the instructions more like "some Windows device drivers take ownership of the device and don't allow Chrome to connect to them. If openDevice or findDevice doesn't work for you, you can try to use a generic low level driver instead. For more info, check this Chromium bug (insert url here) and this StackOverflow topic". Then, add the zadig reference to an appropriate SO response.

Also, to accept your PR (even being a simple one), I need you to sign a CLA. I know, it is cumbersome for such a simple change, but it's a requirement from the lawyercats :-/ Just read and fill this form if you are ok with it: https://developers.google.com/open-source/cla/individual

@sdaclin sdaclin Update README.md
Add reference to chrome-app-samples issues #203.
64c45e1
@sdaclin
@scheib scheib merged commit 262cc8e into GoogleChrome:master
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Mar 4, 2014
  1. @sdaclin
Commits on Mar 26, 2014
  1. @sdaclin

    Update README.md

    sdaclin authored
    Add reference to chrome-app-samples issues #203.
This page is out of date. Refresh to see the latest.
Showing with 10 additions and 6 deletions.
  1. +4 −0 usb-label-printer/README.md
  2. +6 −6 usb-label-printer/index.js
View
4 usb-label-printer/README.md
@@ -26,6 +26,10 @@ var productId = 0x0021; // changed from 0x0020
(thanks @kjantzer for the [information](https://github.com/GoogleChrome/chrome-app-samples/issues/126#issuecomment-29547981))
+### Windows issues
+
+Some Windows device drivers take ownership of the device and don't allow Chrome to connect to them. If openDevice or findDevice doesn't work for you, you can try to use a generic low level driver instead.
+For more info, check this [chrome-app-samples issue](https://github.com/GoogleChrome/chrome-app-samples/issues/203).
LICENSE
=======
View
12 usb-label-printer/index.js
@@ -124,7 +124,7 @@ function printCanvas() {
var info = {
"direction": "out",
- "endpoint": 2, // 2 is the Bulk OUT Endpoint
+ "endpoint": 2, // 2 is the Bulk OUT Endpoint. You may use chrome.usb.listInterfaces to figure which address to use for Outputing data.
"data": data
};
chrome.usb.claimInterface(device, 0, function() {
@@ -298,7 +298,7 @@ function ditherImg(imgData) {
navigator.webkitGetUserMedia({audio: false, video: true}, function(videoStream) {
stream = videoStream;
video.src = webkitURL.createObjectURL(stream);
- video.style.display = 'block';
+ video.style.display = 'block';
video.play();
}, function(e) {
console.error(e);
@@ -315,7 +315,7 @@ function ditherImg(imgData) {
tempCanvas.setAttribute('height', height);
}, false);
-
+
var takePicture = function() {
stream.stop();
video.style.display = 'none';
@@ -323,11 +323,11 @@ function ditherImg(imgData) {
tempCanvas.height = height;
tempCanvas.getContext('2d').drawImage(video, 0, 0, width, height);
var data = tempCanvas.toDataURL('image/png');
- logoImg.src=data;
- };
+ logoImg.src=data;
+ };
video.addEventListener('click', takePicture);
-
+
var updateCanvasSize = function(e) {
Something went wrong with that request. Please try again.