Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Remote Application Platform (RAP) » Capture a Picture via Webcam
Capture a Picture via Webcam [message #1645052] Mon, 02 March 2015 09:58 Go to next message
Missing name Mising name is currently offline Missing name Mising nameFriend
Messages: 5
Registered: March 2010
Junior Member
Hello Guys,

I am not sure howto capture an Image from a webcam-device on an RAP-Application.

It should be possible that the user is able to start the camera/webcam on the browser and take a Picture.
This picture should be availible for the RAP-Application.
Following the picture should be saved on a DB.

I am looking for any solution or hint.

I found this solution, which isnt to bad.
htt ps://hacks.mozilla.org/2013/02/cross-browser-camera-capture-with-getusermediawebrtc/#ff-enabling

But how can i get the data to the application?
It should be possible via AJAX but how?

The application is an e4 RAP2.3 Application? And should work on many different browsers.

Thanks in advance!
Re: Capture a Picture via Webcam [message #1645403 is a reply to message #1645052] Mon, 02 March 2015 13:49 Go to previous messageGo to next message
Aleksander   is currently offline Aleksander Friend
Messages: 44
Registered: May 2014
Location: France
Member
Maybe you could use a JS library as a custom widget and combine it with the RAP file upload plug-in?
Re: Capture a Picture via Webcam [message #1647180 is a reply to message #1645403] Tue, 03 March 2015 09:43 Go to previous messageGo to next message
Missing name Mising name is currently offline Missing name Mising nameFriend
Messages: 5
Registered: March 2010
Junior Member
@ Aleksander:
Yeah your right, now i understand your suggestion.
I think i dont even need the file upload.
Because i think i can transfer the data via RemoteObject on the CustomWidget.

Next Problem:
So i think this is probably the solution but, i cant find any good explaining examples.
ht tps://wiki.eclipse.org/RAP/Custom_Widgets_FAQ

I will need to write a CustomWidget based on HTML/JS to communicate to the RAP-Framework.

Has someone got any experiance or an good example to share?
Would be nice to get some help with it!

Thank you for your answers.
Re: Capture a Picture via Webcam [message #1647508 is a reply to message #1647180] Tue, 03 March 2015 13:12 Go to previous messageGo to next message
Aleksander   is currently offline Aleksander Friend
Messages: 44
Registered: May 2014
Location: France
Member
Hey again,

You can see some code examples in this widget and in the incubator (RichText widget).

The thing you want to do I think is to listen to your widget with the operation listener explained here : https://wiki.eclipse.org/RAP/Custom_Widgets_FAQ#Java_API
Re: Capture a Picture via Webcam [message #1649558 is a reply to message #1645052] Wed, 04 March 2015 11:40 Go to previous messageGo to next message
Tiburon T is currently offline Tiburon TFriend
Messages: 61
Registered: October 2011
Member
Hi,

another thing you can do is using the Browser widget and communicate with your JS stuff via BrowserFunction.
All you have to do is to create a webpage with your JS providing interface functionality for the exchange. The creation of BrowserFunction is straight forward see [1].
You can even add the webpage to your rap application via the extension org.eclipse.equinox.http.registry.resources .

I found this to be a much easier way to implement custom features than to create complete custom widget.

Greetings Tibu

[1]
http://download.eclipse.org/rt/rap/doc/2.3/guide/reference/api/org/eclipse/swt/browser/BrowserFunction.html

[Updated on: Wed, 04 March 2015 11:41]

Report message to a moderator

Re: Capture a Picture via Webcam [message #1651345 is a reply to message #1649558] Thu, 05 March 2015 08:48 Go to previous message
Missing name Mising name is currently offline Missing name Mising nameFriend
Messages: 5
Registered: March 2010
Junior Member
Thank you Tiburon,
this was a million times easier.
Everything is working fine Wink

You saved my day Very Happy
Previous Topic:[ANN] RAP 2.3.2 released
Next Topic:Random HTTP 500
Goto Forum:
  


Current Time: Fri Apr 26 23:12:02 GMT 2024

Powered by FUDForum. Page generated in 0.03234 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top