p:webcam warning - primefaces

I have a JSF web application which uses a webcam to capture the image using Primefaces p:webcam.
It works fine except the fact, giving the following warning every time the page loads on computers that do not have a webcam.
Webcam.js Error: Could not access webcam: NotFoundError: Requested device not found NotFoundError: Requested device not found
How can I suppress that warning?

Try to separate the part of the page from the page given to all users.
For example, the page has a link "Click here to capture". Direct it to a new page or display a dialog with a part that is rendered only when going to capture the image.

Related

HTML loader in AIR no longer correctly loads facebook authorization screen

I have a standalone Adobe AIR application which uses the HTMLloader to embed a webpage and thereby access the Facebook login.
When a user first uses the application thery are first presented with a FB login screen, and then a FB authorization screen, asking if the user wants to share the uploaded image with their friends.
Up until recently everything worked fine.
But it seems that facebook has changed the way the authorization popup displays so my htmlloader no longer can 'see it'. I get a blank page.
The application sees
But should see
Does anyone know of a workaround?
Answering my own question
Supplying an optional userAgent string when I first call login returns an older version of the permissions dialog which renders correctly

How to open page in chrome app via html link

I am trying to convert my html webpage to chrome app, and have found this error:
When trying to click a link to another page within my app, it does not work. I click it and nothing happens. I had a look around, and read that I need to include target="_blank", but that just comes up with an error saying that there is no application set to open that file. I would like the page to open within the chrome app wrapper.
Here is my code: Click here to play

HTML downloaded with curl turns up empty in my browser

I'm trying to run the command
curl https://www.spoonrocket.com > indexspoon.html
and I get back a page full of html and stuff. However when I place the html file in my browser it is empty. I'm trying to figure it out but came up with nothing. Why does the file look empty when I have it in my browser, but in actuality there is actually a lot of content in indexspoon.html?
This is not an issue with curl, it appears to be an issue with your browser...modern browsers have tightened up their security on making cross domain request. This can help to prevent fatal attacks such as "Man in the Middle".
I notice that your HTML document has scripts that use jquery which makes Ajax request..
Most browsers have a built it web console and a debugger.
On the Menubar of your broswer
Tools--->web developer--->web console
you will notice in you console, their is a fatal error
NS_ERROR_DOM_BAD_URI: Access to restricted URI denied
It appears that one of the scripts in the html document is making ajax request using jquery which is being blocked by your browser
click the Debugger tab next to your web console window and you will notice this

Navigation back causes page reload in Chrome

I have a single page PHP application that fetches data from a third party API and outputs the items in a product grid. Clicking on one of the products leads to an external url which opens in the same window.
When using the back button in Chrome to go back på the application after clicking the external link, the page reloads for some reason. I'm only experiencing this problem in Chrome, therefore I'm wondering if it could be a Chrome related bug?
Found the issue. It was caused by using a window load event incorrectly.

Google Chrome intermittent load issue: possible to Programatically disable "Predict network actions..."?

I'm having a very strange problem with a site in Google Chrome:
When I click on a link (from a list view to a detail page), the page hangs and I Chrome throws up a dialogue asking me to kill the page. The page is never displayed.
But if I navigate directly to the page, it loads in Chrome without any problems. Both actions (clicking on a link or navigating to the page) work fine in Safari and Firefox.
Disabling "Predict network actions to improve page load performance" in Chrome's settings seems to fix the problem, but this is not a viable solution as I don't have any control of my user's browser settings.
Some more detail about the situation:
The link is just a regular <href>. I'm not doing any javascript
click() handling or anything else. I'm not using any 'prefetch' or 'prerender' <link> elements.
The pages all validate using the W3
html5 validator.
The page I'm navigating to loads a lot of JS, uses Knockout.js for rendering and loads a video file over HTTP.
On the occasions that the page does load (after a very long wait),
Chrome appears to have rendered the entire page in the background and
loaded all external resources. If I navigate directly to the page it
doesn't preload anything though (I'm using knockout to show a 'please
wait' message while the external resources load).
When I log the network requests using Charles, it appears that
Chrome loads the HTML for the page instantly, but the requests for
the external resources seem to take forever.
If I look at the CPU usage in Activity Monitor, 'Google Chrome Renderer' uses 100% CPU when loading from the href, but only 30% when loading directly from the page.
I'm using the latest version of Chrome (22.0.1229.94)
So - my question
Is there a way to programatically disable "Predict network actions to improve page load performance"?
Or is there some other solution to this problem?
Just going through high voted unanswered questions I came across this one, and I once got into a similar situation for entirely different reasons (chrome was preloading a huge file I couldn't afford to load for every user). The fairly simple solution I applied back then was to open the link through Javascript rather than a simple href which worked wonders. Either way, your problem might already be solved, but seeing the number of views I thought I could at least share this small insight.