Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7977079
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T09:05:29+00:00 2026-06-04T09:05:29+00:00

I am developing a metro app using JavaScript and am trying to display two

  • 0

I am developing a metro app using JavaScript and am trying to display two videos from the webcam simultaneously (one of them will, in the end, have a filter applied to it). However, I get an error whenever I try to set them both to use the webcam as a source,,,, Is there a good way to hand this situation?

Thanks!

Edit: Here is some code:

(Javascript)

var mediaCaptureMgr = new Windows.Media.Capture.MediaCapture();
var captureInitSettings = new Windows.Media.Capture.MediaCaptureInitializationSettings();
//...set properties of captureInitSettings...


mediaCaptureMgr.initializeAsync(captureInitSettings).then(function (result) {
            var video1 = id("Video1"); //function to get html element with id
            video1.src = URL.createObjectURL(mediaCaptureMgr, false); //does not matter if false is switched to true
            var video2 = id("Video2");
            video2.src = video1.src;//could also use var x = URL.create... then set video1.src/video2.src = x; still won't work.
        },
    errorHandler);

(HTML)

<video id="Video1" autoplay></video>
<video id="Video2" autoplay></video>

I can fire the JS through a Click event or Load event–doesn’t matter–only Video1 gets the webcam video. Video2 doesn’t work. Thoughts?

Thanks!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-04T09:05:31+00:00Added an answer on June 4, 2026 at 9:05 am

    Been playing a bit with getUserMedia in a similar fashion in Chrome lately, and I’m wondering if canvas in Metro is acceptable for your second video playback, seeing as you’re planning on doing filtering anyway, seems like you may have to go this route regardless?

    That said, I don’t know anything about the Metro javascript environment, but looking at your example and knowing how I’d do it in a supported browser:

    var video1 = id("Video1");
    var canvas = id('canvas');
    
    var context = canvas.getContext('2d');
    
    context.drawImage(video1, 0, 0);
    

    Of course, this would only work if you are drawing that image for each frame of video, which would be a breeze if there’s some analog of window.requestAnimationFrame.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Yesterday I have started developing my first Metro style App using JavaScript. I've used
Developing a chrome extension using javascript is one of my university projects. I don't
I am new to Windows-8 metro app development, I am developing my app using
I am trying to create a metro app based on a Developing windows 8
I am developing a metro application using visual studio 2012. I am trying to
While developing a firefox extension, I create a wizard window from overlay.js using: this.wizard
I am developing a web service, using Metro 2.0 and Tomcat 6, and I
Can we use NuGet packages in developing WinRT Metro style applications using XAML/C# or
I recently start learning developing metro apps using js and I faced problem updating
Is there any guidance available on developing Metro styled silverlight applications? How does one

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.