locked
camera cannot preview when resume from sleep

    Question

  • I test the MediaCapture JS sample from Microsoft, For some camera if you ever start preview then sleep the system, when resume it the sample cannot preview the camera, even if you change the test pages in the sample. but you can take photo or start record. And i also change the test pages to record audio page after preview camera then sleep the system and resume the problem is still exist. If you open another camera app the camera can be preview. If you exit the App and start it again the camera can be preview.  (my test machine is ASUS VIVOTab ME400)

    At the same time the MediaCapture CS Sample or MediaCapture C++ Sample has not such problem.

    So, Is there anyone has the same problem and how to fix it. Or Is it a bug for HTML5+JS? 



    • Edited by questionA Thursday, May 15, 2014 6:28 AM
    Thursday, May 15, 2014 6:24 AM

All replies

  • I was not able to reproduce this problem on my laptop. Can you provide exact reproduction steps so I can be sure we're doing the same thing?

    Matt Small - Microsoft Escalation Engineer - Forum Moderator
    If my reply answers your question, please mark this post as answered.

    NOTE: If I ask for code, please provide something that I can drop directly into a project and run (including XAML), or an actual application project. I'm trying to help a lot of people, so I don't have time to figure out weird snippets with undefined objects and unknown namespaces.

    Monday, May 19, 2014 7:51 PM
    Moderator
  • Thanks for your reply.

    This problem is reproduced every time on ASUS VIVO Tab (ME400) using the MS MediaCapture JS sample.  On other NB i checked it can not reproduced too. 

    Do you have any suggestion about this problem?  


    • Edited by questionA Tuesday, May 20, 2014 9:34 AM
    Tuesday, May 20, 2014 9:33 AM
  • It's more likely a hardware issue than a software issue.

    Matt Small - Microsoft Escalation Engineer - Forum Moderator
    If my reply answers your question, please mark this post as answered.

    NOTE: If I ask for code, please provide something that I can drop directly into a project and run (including XAML), or an actual application project. I'm trying to help a lot of people, so I don't have time to figure out weird snippets with undefined objects and unknown namespaces.

    Tuesday, May 20, 2014 2:20 PM
    Moderator
  • But if i use MS MediaCapture C#/C++ sample preview->sleep->resume, it is ok. 
    I check the code of C++, and can only see that there has startpreview called but in JS video tag is auto play. I changed it but it failed.

    I also try to close the mediacapture then recreate it but it also failed in JS.  

    I also try to delete the video tag and then create a new one it failed.

    So it puzzled me!  Is there has any other thing  i can try?


    • Edited by questionA Wednesday, May 21, 2014 1:42 AM
    Wednesday, May 21, 2014 1:41 AM
  • I also found after resume the canvas cannot show anything by WinJS on this machine. So is this implicit something?
    Wednesday, May 28, 2014 7:29 AM