gibbon's Recent Forum Activity

  • Hi, I was just wondering if anyone knows whether the Usermedia object works with the latest iOS build.

    For a while there was an existing issue with WebViewKit & Apple, however I have read from the bug report of the said issue that it was resolved? If I do a remote preview I can only get it to work using Chrome...

    bugs.webkit.org/show_bug.cgi

    Obviously I can just try it but before I do I was wondering if anyone has had any success?

    Given that the current documentation doesn't warn of any issue with iOS I would like to think it does?

    Andy

  • I think , I might have found a solution, weather it is the best way im not sure.

    Width in this case is always the width of the canvas, so easy to just use the canvas width.

  • I have a sprite (which I use as a photo, so rectangular), I then take a snapshot of the canvas and simply want to capture only the rectangle sprite (the photo).

    So, most obvious choice when using "take snapshot canvas" is to set the X & Y position to the sprite X & Y, and same with the width & height (sprite width & height).

    However this only works if full screen scaling is set to off, if it is anything else such as Scale Inner/Outer, then the captured snapshot is never the right place or size?

    I have also tried using "photo.height*PlatformInfo.DevicePixelRatio" but still no luck, this just changes things but still not correct.

    When I run in Debug mode and look at the sprite in question, the width, height and scale doesn't change regardless of the canvas scale??

    So how do I get these values to get a correct snapshot??

    Andy

  • Thanks Ashley, what about width and height?

    Edit: I have also done as above and it still ends up taking a snapshot about 20 pixels higher than sprite????

  • I was aware no one else seemed to be shouting about so I new it must have been something I was doing.

    Turns out, for some reason when opening a project (even new ones) it would result in selecting the cordovalib project to build as apposed to the main project.

    Very odd.

    Sorted now though.

    Andy

  • Ashley Can you please elaborate a little on this.

    In the Canvas snapshot X and Y I using the following.

    Sprite2.X*PlatformInfo.DevicePixelRatio

    Sprite2.Y*PlatformInfo.DevicePixelRatio

    How do I incorporate the LayerToCanvasX/Y method?

    Thanks

  • I am having serious issues...

    Why is it new builds wont build, saying the errors I mentioned such as missing info.plist?

    BUT sometimes a new server build works?

    SOMETIMES it builds but doesn't run or install on the device?

    What is going on??

  • Fresh build from the server managed to build but now the UserMedia is no longer working again...

    Feel like giving up on this at times!

    ERROR: Rejection from 'runtime' handler 'cordova-fetch-local-file': [object Object]

    2020-11-16 18:00:27.632553+0000 camapp[19460:3769028]

    WARN: Error requesting camera: TypeError: undefined is not an object (evaluating 'navigator["mediaDevices"]["getUserMedia"]')

  • Hi, has any one successfully managed to compile a iOS Xcode project using latest Xcode and iOS14?

    I am having a numorus amount of errors, on first opening its showing

    config.xml and www folder in red, as well as Resources folder in Red.

    When I try to build it fails, saying info.plist is missing (which I cannot find in the project folder at all) as well as cordova.h?

    Anyone any idea?

  • The snapshot area is given in device pixels (i.e. pixels on the resulting image if you took a full screenshot). That is different to layout co-ordinates (i.e. object positions) which depends on scrolling, scaling, the viewport size, etc.

    The system LayerToCanvasX/Y expressions can convert a layout position to canvas CSS co-ordinates, and then if you multiply that by PlatformInfo.DevicePixelRatio, that should give you the device co-ordinates.

    Thanks Ashley, Will give this a try!

    Andy

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Mikal

    Thanks for the help but unfortunately that still does not give me the correct size?

    I really do not know what you have to do in order to specifically set the size of the snapshot (despite there being settings for it)

    I feel like I have exhausted all possible attempts

  • Will give it a try, thanks

gibbon's avatar

gibbon

Member since 18 May, 2016

Twitter
gibbon has 1 followers

Trophy Case

  • 8-Year Club
  • Forum Contributor Made 100 posts in the forums
  • Regular Visitor Visited Construct.net 7 days in a row
  • RTFM Read the fabulous manual
  • Great Comment One of your comments gets 3 upvotes
  • Email Verified

Progress

13/44
How to earn trophies