Good afternoon fellow coders! I am familiarizing my self with the Camera function but can’t get to combine the capturePhoto & captureVideo function so I may take photos and record videos from my camera in one app. Is this possible or am i restricted to just one of these functions, thanks!
Here is my capturePhoto code :
– Camera Function
local sessionComplete = function(event) local image = event.target print( "Camera ", ( image and "returned an image" ) or "session was cancelled" ) print( "event name: " .. event.name ) print( "target: " .. tostring( image ) ) if image then -- center image on screen image.x = display.contentWidth/2 image.y = display.contentHeight/2 local w = image.width local h = image.height print( "w,h = ".. w .."," .. h ) end media.show( media.Camera, sessionComplete ) end