This is one of the latest additions to HTML5 and is incredibly useful. Can lead to augmented reality and image recognition.
Here is the code.
Uses most of the elements I have made posts about up until now.
First you will be asked to share the device. Click on share selected device and....
Here it is on FireFox.
Here it is on Microsoft Edge ( very cool ).
The canvas is filled with the devices video. You can then write to dat to add images to the video.
Notice at the top the camera icon? Click this and you can stop the device. That's why the event handlers are there to make sure the canvas isn't written to while video is not streaming.
(Sending video to a domain will allow it to work on Chrome)
No comments:
Post a Comment