jjwallace Posted February 16, 2017 Share Posted February 16, 2017 Hi guys, I am making an app that overlays a png over a video. I want the user to insert their face via webcam or upload. How do i allow user to upload image to phaser? Is it possible to use webcam? I am also building resize image UI, unless there is already one. Link to comment Share on other sites More sharing options...
drhayes Posted February 17, 2017 Share Posted February 17, 2017 It is possible but it's not Phaser-specific. I would start with this HTML Rocks article about capturing audio and video. Now that you have the video you'd need to upload the image somewhere, find the URL, tell Phaser to load it as an asset, wait for it to finish loading, then add it as a Phaser.Image. Or, you could probably grab the image directly and add it to Phaser's Cache yourself instead of bouncing it through the loader. That wouldn't save the user's image, though. Link to comment Share on other sites More sharing options...
Recommended Posts