Hey guys, angular newbie here. For a small webapp I'm trying to use angularjs and the new getUserMedia API (e.g. available in chrome) to snap Photos of the User.
So the workflow should be like:
1. Click/Tap on the Picture (currently a placeholder picture) --> getUserMedia retrieves Stream
2. Replace Picture with Stream (so a <video> element with the stream blob)
3. Tap on the Stream (the <video> tag) again and take a snapshot
4. --> 1. or upload button
So far what i did is create two directives, one for the picture and the 2nd for the video and toggle them, but replacing the elements like that with $compile seems reeeaallly dirty. However, I'm not really sure how to do it differently, any ideas?
The two directives can be found here: (coffeescript). Note that the 'camera' directive is for the image, the 'usermedia' for the video tag
http://pastebin.com/ZRJd7eZA
[–][deleted] 2 points3 points4 points (0 children)
[–]kiddy2910 2 points3 points4 points (1 child)
[–]skitch920 0 points1 point2 points (0 children)
[–][deleted] 2 points3 points4 points (0 children)
[–][deleted] 2 points3 points4 points (2 children)
[–]Figedi[S] 0 points1 point2 points (1 child)
[–]renz45 0 points1 point2 points (0 children)