How do I send image data through the multiplayer plugin?

0 favourites
  • 3 posts
From the Asset Store
Adventure Quiz interactive (Questions and answers via Json)
  • I'm wanting to use the user media object to take a picture and then automatically send the image data in a multiplayer message to another online player so their game can load it into a sprite object. I'm not sure how to do this.

  • You can easily use base64 encoding to send image data (in base64 format, as a text) to another player who can read this data (decode it) and load to his sprite object.

    The most difficult task is to convert image to base64. Maybe trying to do it via JavaScript is the best way.

    If you already have image endcoded in base64, you can use Sprite -> Load data from URL function, and paste it. :)

    This ^ is not a full solution but it should help you ^^

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Hey thanks for the reply. I tried taking a snapshot then setting the ajax response to binary and requesting the usermedia.snapshotURL When the ajax request is completed, I send a multiplayer message: BinaryData.GetBase64 and right when that happens, it disconnects the peer every time.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)