I just made a plugin that will turn camera selfies into a face set for the game.

(yes, you read it right)
Forgive me, that this plugin is a little bizarre.
The angle here is: a game that stars the game player, as the game player's actual self.
Think Neverending story or something, where the reader becomes the read-ed.

It's fun; it's got novelty value.
To use this plugin, you're gonna need three things.
Thing number one: Call this function by event script call. (not plugin command)
PHP:
SelfieFace.getSelfies({
filename:"CustomSelfPhoto"
});
You don't need to specify the filename parameter, but then it will just make a random filename and you won't be able to use it later on in the game. For instance you can use...
thing number two: This default faceset; (save this one or make your own)
You can make your player's role talking messages with this dummy faceset and when the player takes selfies, it will overwrite this dummy file in their game play. (so it will use all their selfies in their premade dialogue)
Thing number three: You can make more than one faceset, and you can define your own facial expressions (selfie directions) with this other event script call parameter.
PHP:
SelfieFace.getSelfies({
filename:"CustomSelfPhoto",
expressions:[
"a normal face",
"a happy face",
"a laughing face",
"a sad face",
"a angry face",
"a shocked face",
"dramatic look-away",
"dramatic eye contact"]
});
I recommend only doing groups of 8. More than 8 will break it, and less than 8 is a waste of negative space and I didn't test it much.
And that's all that's to it.
This plugin is vicariously the idea of
@shinichi999 because I discovered how to use camera and microphone in HTML5, while I was researching how to take on his request for a similar plugin
in this thread. I'm just a little more certain that I can make it now. I just did this extra plugin for practice and for fun.
And all functional credit goes to this HTML5 tutorial I found. I really wouldn't know how to do it, if it weren't for this.
https://davidwalsh.name/browser-camera
You're free to use this in commercial games or dissect it to make other kinds of camera apps or whatever too. I don't mind.
Version 0.1
EDIT: I had a flaw where the file path couldn't handle Unicode characters, but luckily shinichi caught it and I fixed it before the plugin had any downloads (because the thread wasn't even live yet). I also had a flaw where I didn't shut the stream off, but it's now fixed thanks to Microsnitch discovering it.
EDIT: Version 0.2: I've never been so dumb...
@shinichi999 caught another big flaw. I didn't position my video and canvas elements for different resolutions so everything was out of whack in fullscreen, but it's now fixed!
