The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums JavaScript Improve Performance for getUserMedia Capture Onto Canvas

  • This topic is empty.
Viewing 1 post (of 1 total)
  • Author
  • #179539

    Live Example Here

    I’m recording a video using getUserMedia and drawing that video onto a canvas for taking pictures at a specific FPS.

    I decided that the FPS should depend on the screen size, since larger devices (like tablets and computers) typically have better processing power than something smaller like a phone.

    fps = (screen.width > 500 || screen.height > 500) ? 38:24

    The values were handpicked by myself.
    I have a quad core 1.5Ghz Trio Stealth G4 and I still think that the canvas is “slow”. Not because of the FPS though–but because of the performance.

    Can someone look at my code and tell me how to optimize it so that it isn’t so laggy? I don’t know how else I can optimize it, but if there’s something to make it faster I’d be glad to hear it.

    I want to try to make the canvas as smooth as possible so it can stand up to a native camera app. Not that I plan to add much more to this app though. I just want better performance for what I’ve got.

Viewing 1 post (of 1 total)
  • The forum ‘JavaScript’ is closed to new topics and replies.