How to remove Camera Feed object.

Hi,

Below is sample code to test camera feeds.

local shape = display.newRect( 0, 0, 320, 480 )
shape.anchorX = 0
shape.anchorY = 0
shape.fill = { type=“camera” }

shape:removeSelf()

shape = nil

When i try to remove shape object, my App has crash.

Is there another way to remove ?

Does it still crash when you don’t use the camera?

shape.fill = { type = "image", filename = "star.png" }

How about changing the fill to an image before deleting the object?

Just tried it myself.  It does a full-on crash of the application, regardless if you change the fill or attempt to remove the object.  I’ve submitted a bug to Corona, #31373.  Oh well, I JUST implemented it as a bonus feature to toggle the background in my game, but looks like I’ll have to keep it disabled for now.

Hooray, it was resolved in the latest daily build #2200.

Excellent ! Thanks

It is a good suggestion.

Removing the camera feed works, but if you replace it back with an image, the rotation of the new image is off by 90 degrees.

object.fill = { type = "image", filename = "sky1.jpg" } ... object.fill = { type = "camera" } ... object.fill = { type = "image", filename = "sky2.jpg" }

In the above code, the sky in my app goes sideways when the camera is replaced with sky2.jpg.

Does it still crash when you don’t use the camera?

shape.fill = { type = "image", filename = "star.png" }

How about changing the fill to an image before deleting the object?

Just tried it myself.  It does a full-on crash of the application, regardless if you change the fill or attempt to remove the object.  I’ve submitted a bug to Corona, #31373.  Oh well, I JUST implemented it as a bonus feature to toggle the background in my game, but looks like I’ll have to keep it disabled for now.

Hooray, it was resolved in the latest daily build #2200.

Excellent ! Thanks

It is a good suggestion.

Removing the camera feed works, but if you replace it back with an image, the rotation of the new image is off by 90 degrees.

object.fill = { type = "image", filename = "sky1.jpg" } ... object.fill = { type = "camera" } ... object.fill = { type = "image", filename = "sky2.jpg" }

In the above code, the sky in my app goes sideways when the camera is replaced with sky2.jpg.