Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Display multi cameras

Status
Not open for further replies.

A1Pat

IS-IT--Management
Jun 7, 2004
454
US
Hi all,

I'm doing a modification on this pre-existent javascript code and wonder that if anyone can help me elaborate this Single Cam Display to Multi Cam Display...

Code:
function Do_PlayVideo()
{	
	m_chNum = Channel.value;
	m_frameRate = FrameRate.value;
	m_resolution = Resolution.value;
	
	mySDK.WESPSDKMonitor.PlayVideo(m_chNum, m_resolution, m_frameRate);
}

the m_chNum, m_resolution, m_frameRate are collected from a form where user will decide which channel, resolution and frame rate are used. The program when such far to display SINGLE view back camera; however, I'm interested in MULTI display all cameras (ie: 8 cam) at the same time. I guess is utilizing a for loop or something like that in the function on the above, but my javascript skill is way too novice...

Please help!
Thanks
 
Without seeing the rest of the code (HTML, etc), ,it's hard to give an accurate answer... but something like this could suffi ce:

Code:
function Do_PlayVideo(camNum) {
    var frm = document.forms['Camera' + camNum].elements;
    var m_chNum = frm['Channel'].value;
    var m_frameRate = frm['FrameRate'].value;
    var m_resolution = frm['Resolution'].value;
    
    mySDK.WESPSDKMonitor.PlayVideo(m_chNum, m_resolution, m_frameRate);
}

Then, all you'd need to do is ensure your forms are named "Camera1", "Camera2" ... "Camera8", and call the function with the number, i.e.:

Code:
Do_PlayVideo(1);

etc., and all should be fine. This, of course, assumes your form fields are named the same within each form.

Hope this helps,
Dan



Coedit Limited - Delivering standards compliant, accessible web solutions

[tt]Dan's Page [blue]@[/blue] Code Couch
[/tt]
 
Thank you Dan for your reply, sorry that it took this long to reply since I don't have internet connection at home.

Anyway, I'm basically gave up on trying because I can see it is much more than that we were talking about. The requirements are much more ridiculus that I decided it doesn't worth my time to follow. In another word, I am required to make the javascript code works just like a VB application, which I have no idea nor knowledge to do so.

So, my new goal is to find a way to execute the VB application on a internet brower when its link is clicked. Do you have any idea how, please help! :)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top