Cocoon and user media?

Get help using Construct 2

Post » Tue Apr 23, 2013 1:27 pm

I've read the User Media runtime.js, and it seems that it doesn't work on cocoonjs. Is this correct?

If one would try to write a plugin to get access to a camera on cocoonjs, would it be possible to use the:

CocoonJS.Camera.startCapturing(0, 50, 50, 30);
CocoonJS.Camera.getAllCamerasInfo();

methods to get access to a camera? (Methods from here)


Cheers, and thanks for all the responses!

Be nice until it's time to not be nice
B
36
S
9
G
9
Posts: 293
Reputation: 6,652

Post » Wed Apr 24, 2013 12:16 am

It seems special API for cocoonjs that C2 didn't implement yet
B
96
S
25
G
20
Posts: 3,052
Reputation: 22,638

Post » Wed Apr 24, 2013 9:03 am

Yup, it seems that it isn't supported yet...

I wonder would it be straight forward to implement these methods (functions? whats the proper name?) in a third-party plugin or are there any limits regarding C2 engine and/or Cocoonjs engine?

Be nice until it's time to not be nice
B
36
S
9
G
9
Posts: 293
Reputation: 6,652

Post » Wed Apr 24, 2013 9:24 am

It's up to @Ashley about UserMedia Plugin it should add extra API if is on CocoonJS platform. He said he can keeping implementing CocoonJS api while the docs are up.
B
96
S
25
G
20
Posts: 3,052
Reputation: 22,638

Post » Wed Apr 24, 2013 11:45 am

It's really annoying when wrappers diverge from the standards. In this case IIRC I reviewed the features CocoonJS provides, and it simply didn't cover all the features of the User Media object. I think it couldn't take a snapshot, and when I tried it the video feed was rotated 90 degrees. Supporting two incompatible APIs with different feature sets is time consuming and a really quick way to make the code a huge unmaintainable mess. Making a separate plugin for a specific platform also defeats the write-once-run-anywhere approach. So in situations like this I prefer not to support it at all and encourage CocoonJS to support the standards. You could make a third party plugin but I think it might be missing enough features to make it useless.Ashley2013-04-24 11:47:00
Scirra Founder
B
359
S
214
G
72
Posts: 22,946
Reputation: 178,518

Post » Wed Apr 24, 2013 4:05 pm

Cool, thanks for the detailed answer and clarifying things up, when (if) i make some test, and get some decent results i'll post in forums.

Cheers!
Be nice until it's time to not be nice
B
36
S
9
G
9
Posts: 293
Reputation: 6,652


Return to How do I....?

Who is online

Users browsing this forum: 99Instances2Go, Braus, supreme676 and 9 guests