0

Camera snapshot won't fire onSnapshotUpload event

asked 2019-08-15 23:29:06 +0800

andreasboos gravatar image andreasboos
105 3

updated 2019-08-15 23:37:33 +0800

Hi. I trying to use the new Camera component. I've implement onSnapshotUpload event but when I call snapshot() (with or without delay) nothing happens. I try use onVideoUpload, through the setRecording(true), too but it just fired after limitLength time gone. I call requestCamera() before both and click on Allow button.

I'm using a samsung galaxy tab A (2016) with chrome through https protocol with java 8 (b181).

My zk version is zkee 8.6.2

Thank you.

delete flag offensive retag edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2019-08-16 17:55:05 +0800

MDuchemin gravatar image MDuchemin
2560 1 6
ZK Team

Hi andreasboos,

I've tried the following snippet with a Samsung A50:

<zk>
    <camera id="camera" onVideoUpload="video.setContent(event.media)"
                     onSnapshotUpload="image.setContent(event.media)">
        <attribute name="onStateChange">
            if (event.state == Camera.START) {
                /* do something after starting record,
                   such as provide users recording hint. */
            }
        </attribute>
    </camera>
    <video id="video" />
    <image id="image" />
    <button label="Start recording" onClick="camera.start()" />
    <button label="Stop recording" onClick="camera.stop()" />
    <button label="Take a snapshot" onClick="camera.snapshot()" />
</zk>

From my side, can open the camera API and trigger snapshots. Can you run it on your side to check if you have the same issue with it?

If possible, can you enable remote debugging on chrome or firefox, and check the client console (on device with remote debugging) to check for javascript errors?

link publish delete flag offensive edit
Your answer
Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!

[hide preview]

Question tools

Follow
2 followers

RSS

Stats

Asked: 2019-08-15 23:29:06 +0800

Seen: 8 times

Last updated: Aug 16 '19

Support Options
  • Email Support
  • Training
  • Consulting
  • Outsourcing
Learn More