语言

Menu
Sites
Language
Capture Video from Web App

Hi,

I'm trying to capture video using the stream retrieved through getUserMedia(). It is showing stream.record() is undefined. 

Ref : https://dvcs.w3.org/hg/audio/raw-file/tip/streams/StreamProcessing.html#examples   sample no 13

do we have any other way to implement the same?

编辑者为: Brock Boland 17 3月, 2014 原因: Paragraph tags added automatically from tizen_format_fix module.

响应

12 回复
Lakshmi Grandhi
Please go though "SelfCamera" application under Sample in Web Application project. Let me know if you need more information
Aries Brune Tyson Antony Raj
It supports only capturing image.. It doesn't have options to capture a video..
Lakshmi Grandhi
can you try using startVideoCapture and stopVideoCapture example from the url https://members.wholesaleappcommunity.com/currentspecs/deviceapis/camera.... I dont have webcam or device to test it. I will forward this post to another developer Thanks Lakshmi
Aries Brune Tyson Antony Raj
I couldn't able to open the link.. I'm receiving "Page Not Found" error. Did you meant this url? https://members.wholesaleappcommunity.com/currentspecs/deviceapis/camera.html When i try to do as per this URL my installation failed with the error "(Return Code:1016)Widget RDS installation failed." Once i remove the feature(http://wacapps.net/api/camera) from config.xml it is installing and trowing an error deviceapi is undefined.
Selladurai Annadurai
Hi, Try now : https://members.wholesaleappcommunity.com/currentspecs/deviceapis/camera.html
Aries Brune Tyson Antony Raj
Any Update on this? Does the camera api work?
Lakshmi Grandhi
stream.record is for recording audio through microphone, to record video you need follow above steps mentioned in url http://davidwalsh.name/browser-camera window.addEventListener("DOMContentLoaded", function() { // Grab elements, create settings, etc. var canvas = document.getElementById("canvas"), context = canvas.getContext("2d"), video = document.getElementById("video"), videoObj = { "video": true }, errBack = function(error) { console.log("Video capture error: ", error.code); }; // Put video listeners into place if(navigator.getUserMedia) { // Standard navigator.getUserMedia(videoObj, function(stream) { video.src = stream; video.play(); }, errBack); } else if(navigator.webkitGetUserMedia) { // WebKit-prefixed navigator.webkitGetUserMedia(videoObj, function(stream){ video.src = window.webkitURL.createObjectURL(stream); video.play(); }, errBack); } }, false);
Didier De Nadai
Hello! I've been trying that but without success, even on a test device (M0). Seems the video stream from the camera is not correct. After trying to use that, the camera application itself is crashed too so I suspect a bug in the platform. Best regards, Didier
Lakshmi Grandhi
In my developer device camera is not working, so i am not able to test. I will confirm with other developer and will raise JIRA bug Thanks Lakshmi
Aries Brune Tyson Antony Raj
The link you've provided talks about capturing image. It is done as follows
  • Pass the camera stream to video tag
  • Draw the current instance from video element to canvas
  • Save the image from canvas.
But this is not same when it comes to video.
Aries Brune Tyson Antony Raj
Any update on this?
Lakshmi Grandhi
Hi Aries, I have forwarded your post to other developer waiting for reply