You should get a video stream. This works in Chrome and Safari –IE doesn’t display it but that’s not a problem for now.
I have created a temp user/pass to demonstrate. Username = user Password = pass
In AppStudio and Chrome, the code below seems to connect to the camera in as much as it prompts for user & password, but no image appears. (In Chrome & IE)
In Chrome the ‘loading’ wheel just spins forever - it does seem to be downloading data (I guess the video stream) but no image shows.
Thank you for the suggestion.
I fear that the jPlayer will have the same limitations as the video control described above in that it is intended for streaming a video file rather than a video-stream. I see that it can stream RTMP which some IP cameras support but it does not give access to any of the camera controls such as brightness or pan & tilt etc.
Given that the code works ok in a browser in its current form using HTML & JS, there must be a way to convert this into NSB compatible code. As a newbie, I just can’t get the simple front end to work.
(The spinners and buttons currently created in HTML would of course be NSB controls.)
Thanks for the tip! Didn’t understand it first time round.
Whatever size I set the HTML view to, the video image remains small and has to be scrolled. How do I stretch the video image size to fit the width of the form. i.e. If I put a border around the HTMLview I can see that it is bigger but the inset image remains small.
Can’t quite see how to add a file to the post but if you click on this link and use User=user & Password=pass you can see the objective. If you then view the source code hopefully you can see how the video gets displayed and how to control the camera. It’s a bit messy but fairly straight forward.
The link that is used in the innerHTML code is this http://luluscattery.dyndns.org:8001/videostream.cgi
If you click on that, the video image shows properly - can’t see how to make that happen in the NSB form.
I tried this example from the NSB manual
Function Button1_onclick()
HTMLview1.innerHTML="<iframe src='http://www.nsbasic.com'></iframe>"
HTMLview1.refresh()
End Function
and the NSB web page also comes up restricted with scroll bars, even though I have disabled them in the control.
I’m clearly missing something fundamental about how to size the inner HTML page on the form. Changing height & width settings in the control only changes the frame size - not the content. How do we do that…?
I think I may have solved the mystery…
I am viewing in Chrome on a desktop - it seems that on a mobile phone, the sizing works. The NSB URL seems to work fine on a Samsung - can’t test on iPhone until I open an account.
The camera demo doesn’t work on the Samsung (yet). Nothing displays.
You might look for JavaScript code on the web which you can copy. Also, try a different webcam - the problem might be with what the camera is returning.
Sub Main()
HTMLview1.innerHTML="<img src='http://luluscattery.dyndns.org:8001/videostream.cgi?user=user&pwd=pass' width='100%' /img>"
HTMLview1.refresh()
End Sub
I have reverted to the <img /img> rather than <iframe /iframe> tags and it seems to work as I wanted.
I have also got the camera control to work (driving to a preset position) so all is good.
Still no video display on the old Samsung S3 but will have to try and borrow a newer model to see whether that is actually a problem that needs help or not.
If I then click browser ‘refresh’ the image cleanly updates with the next snapshot.
However, if I execute this in NSB
Function refresh_video_display()
{
HTMLview1.innerHTML="<img src='http://192.168.0.173:8173/tmpfs/snap.jpg?usr=admin&pwd=pass' width='100%' /img> "
}
End Function
the first frame displays as expected but if I call the function again, nothing happens and the image does not update.
If I use <frame> & </frame> instead of <img> & </img> the snapshot updates but the screen blanks in between (I guess it’s redrawing the frame not just replacing the image) which is not acceptable.
How do I get the just the URL to update without destroying the frame and causing a flicker.
Thank you for the suggestion – sadly, it didn’t solve the problem. However, the good news is that I have been able to achieve my objective another way and am now poised ready to purchase NSB
I have one remaining test – using Volt.
I can deploy to Volt but when I try the QR-code my iPhone message is that I am using the demo (true) and the App is disabled. I then get stuck in a loop to deploy again. It does deploy to local Chrome OK.
I tried to delete the previous version of my app and also my account but neither seem possible. Typing in the name or email does not enable the delete button.
Is there a way round this – and will I still a have problem if I just go ahead and purchase.
Can anyone advise why this works perfectly in desktop browser Chrome & IE but not when deployed to iPhone.
Button click is actioned on phone (counter increments) but HTML2 doesn’t fire.
Function Button3_onclick()
HTMLview2.innerHTML="<iframe src='http://192.168.0.173:8173/cgi-bin/ptzctrl.cgi?-step=1&-act=down&usr=admin&pwd=pass' />"
CounterUpdate()
End Function