User Media Snapshot Data causes 15 sec jank

0 favourites
  • 3 posts
From the Asset Store
A pack contains high quality game backgrounds for 2D video games. With 15 distinct themes
  • Problem Description

    Loading a small sprite image from UserMedia.SnapshotURL is very quick. However, any attempt to save the data in text format causes a game to hang / jank and is, consequently, unusable for storing snapshot images as data.

    When I copy the in-browser / Inspect Element / Sources / sprite-default-000.png as a data URI it takes approx 1 sec to obtain the data string, hence why I consider this to be a bug in c2.

    Attach a Capx


    Description of Capx

    The UserMedia object is used to transfer a snapshot to a data string or image, depending on your selection.

    Steps to Reproduce Bug

    • Snapshot to sprite, observe (no discernible) delay.
    • Snapshot to text, put the kettle on....

    Observed Result

    There is no delay when transferring image data from the SnapshotURL to a sprite, but there is approx 15 seconds (in Chrome) of hang-up on my i5 laptop when transferring the data string to a text object.

    Expected Result

    Converting an image to a data string should not cause a game to freeze.

    Affected Browsers

    • Chrome: (YES)
    • FireFox: (YES)
    • Edge: (YES)

    Operating System and Service Pack

    W10 x64.

    Construct 2 Version ID

    r240 64 bit.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I think the slow thing is just the text layout. If you set the snapshot URL to a text instance variable, for example, it's perfectly fast. The slow thing is running text layout (word wrap etc.) on a huge block of unnatural text. I'm not sure there's much we can do about that. One easy workaround is just to display the first 300 characters or something if you want to show it to the user.

  • Ashley - thanks. I must confess that I thought I was recreating a bug that was causing mobile browsers to crash when adding the data string to a dictionary object (the jank was so long it was breaking the multiplayer connection). I'm not sure how to reproduce it another way...

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