• March 28, 2024, 07:12:19 AM
  • Welcome, Guest
Please login or register.

Login with username, password and session length
Advanced search  

News:

This Forum Beta is ONLY for registered owners of D-Link products in the USA for which we have created boards at this time.

Pages: [1] 2

Author Topic: Webcam in mobile web app  (Read 6658 times)

kidmet

  • Level 1 Member
  • *
  • Posts: 4
Webcam in mobile web app
« on: June 16, 2014, 09:40:22 AM »

Anyone know the coding to show a webcam in the mobile app?  Need it for android and iOS.  Also, needing it to show just the picture/video, not all the options you would get when you login from the web.  Any help would be HUGE.   I'm using phonegap to create my app for those wondering. 
Logged

kidmet

  • Level 1 Member
  • *
  • Posts: 4
Re: Webcam in mobile web app
« Reply #1 on: June 16, 2014, 09:45:05 AM »

I can get the picture to work in my browser on my computer with the coding I have now, but not on the actual android phone.  I can send my files to someone willing to help.   Bounty could be included. 

Logged

Notworried

  • Level 2 Member
  • **
  • Posts: 98
Re: Webcam in mobile web app
« Reply #2 on: June 19, 2014, 04:31:01 PM »

I can't even do that. Do you go to a URL or do you have to write an html page?
Logged

kidmet

  • Level 1 Member
  • *
  • Posts: 4
Re: Webcam in mobile web app
« Reply #3 on: June 24, 2014, 06:52:27 AM »

The app is a web app which I have since decided not to do since the app stores only accept native apps.  I have moved on to try to create a mobile friendly website first.  If it works and catches on I will make native apps.
Logged

nullit

  • Level 2 Member
  • **
  • Posts: 64
Re: Webcam in mobile web app
« Reply #4 on: June 29, 2014, 07:45:24 PM »

In the following html, change URL:port# to whatever web address and cam port number you use, save to your server with some name (fx. myowncam.htm), the call it from your Android browser. Provides virtually live video.

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title></title>
<meta http-equiv="content-type" content="text/html; charset=us-ascii">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="expires" content="0">
</head>
<body>
<script type="text/javascript">
<!--
var refreshrate=0.5;  //SECONDS BETWEEN REFRESH
var image="http://URL:port#/image/jpeg.cgi";  //IMAGE NAME
var imgheight=480;  //IMAGE HEIGHT
var imgwidth=640;   //IMAGE WIDTH
function refresh(){
document.images["pic"].src=image+"?"+new Date();
setTimeout('refresh()', refreshrate*1000);}
document.write('<IMG SRC="'+image+'" ALT="" NAME="pic" ID="pic" WIDTH="'+imgwidth+'" HEIGHT="'+imgheight+'"  STYLE="border: 1px solid Black;">');
if(document.images)window.onload=refresh;
// -->
</script>
</body>
</html>
Logged

Notworried

  • Level 2 Member
  • **
  • Posts: 98
Re: Webcam in mobile web app
« Reply #5 on: June 29, 2014, 08:34:19 PM »

Can this work on any browser/computer or does it have to be Android?
Logged

nullit

  • Level 2 Member
  • **
  • Posts: 64
Re: Webcam in mobile web app
« Reply #6 on: June 30, 2014, 07:27:22 AM »

Works on Windows PC, Firefox and IE, possibly more. Have only tested it on my android device (Firefox) but working to test it with an off-shore friend with iPad and a laptop with Chrome and who has no clue how to enable javascript, - poor soul. More later!
Logged

nullit

  • Level 2 Member
  • **
  • Posts: 64
Re: Webcam in mobile web app
« Reply #7 on: July 02, 2014, 06:42:01 AM »

UPDATE : Works with iPad !!

Note : Users should be given separate non-admin User and Password credentials in the cam, MAINTENANCE/Admin/ADD USER ACCOUNT.

- and I shouldn't really take much credit for the code. Can't remember where I found it first but it's been around for years. Similar versions re-discovered here (http://sandaysoft.com/forum/viewtopic.php?f=19&t=2910) and here (http://cowboyfrank.net/javascript.htm).

Cheers.
« Last Edit: July 02, 2014, 07:30:04 AM by nullit »
Logged

Notworried

  • Level 2 Member
  • **
  • Posts: 98
Re: Webcam in mobile web app
« Reply #8 on: July 02, 2014, 09:10:58 AM »

I am still looking for a simple url that people can go to and watch live video. No fuss, no mess.
Logged

nullit

  • Level 2 Member
  • **
  • Posts: 64
Re: Webcam in mobile web app
« Reply #9 on: July 02, 2014, 09:52:51 AM »

Ok, go here: http://goo.gl/ji5GD. Can't be simpler  ;-)
« Last Edit: July 02, 2014, 03:07:13 PM by nullit »
Logged

Notworried

  • Level 2 Member
  • **
  • Posts: 98
Re: Webcam in mobile web app
« Reply #10 on: July 02, 2014, 08:07:14 PM »

Umm, I didn't mean watching Niagara Falls. I meant my DCS-930L looking out the window!
Logged

nullit

  • Level 2 Member
  • **
  • Posts: 64
Re: Webcam in mobile web app
« Reply #11 on: July 03, 2014, 07:36:26 AM »

I am still looking for a simple url that people can go to and watch live video. No fuss, no mess.

The DCS-930L is an inexpensive low-end cam, but talk to D-Link directly. Perhaps one of their higher end cams come with the features you want. Specify you need no fuss and no mess !

Good luck,

Cheers.
Logged

Notworried

  • Level 2 Member
  • **
  • Posts: 98
Re: Webcam in mobile web app
« Reply #12 on: July 07, 2014, 12:39:44 PM »

Actually, this feature is supposedly available now but it doesn't work for me. Does it work for you? I'd think anybody would want to have it.
Logged

nullit

  • Level 2 Member
  • **
  • Posts: 64
Re: Webcam in mobile web app
« Reply #13 on: July 07, 2014, 02:13:05 PM »

 
Hey, let us know why you think a no-fuss-no-mess (NFNM) feature is available and why it doesn't work for you, - i.e. what are you doing to establish that it, if exists, doesn't work?
 
Cheers,
 
...
Logged

kidmet

  • Level 1 Member
  • *
  • Posts: 4
Re: Webcam in mobile web app
« Reply #14 on: July 08, 2014, 12:16:27 PM »


Hey, let us know why you think a no-fuss-no-mess (NFNM) feature is available and why it doesn't work for you, - i.e. what are you doing to establish that it, if exists, doesn't work?
 
Cheers,
 
...

Did you get my code for the desktop and iphone?
Logged
Pages: [1] 2