Page 1 of 1

YawCam on my own server

Posted: Thu Mar 24, 2022 12:16 am
by tellioub
Hi all
Yawcam work correctly. I copy the source code to integrate in my site.
I just change this line as shown :
var baseURL = ""; //change this to "http://_yawcam_computer_address:port/" when running on own server.
I have remplaced baseURL with the right address ... but... I have the Error Image instead my webcam !
What happend ?

Re: YawCam on my own server

Posted: Mon Mar 28, 2022 12:09 pm
by malun
You have two options if you want to publish/serve yawcam from you own server.

Option #1
Use an IFRAME. It's the easiest option. Include a tag similar to this on your page:

Code: Select all

<iframe src='http://_Public_Address_:8081/index.html' style='border:none;' frameborder='0'></iframe>
Option #2
Use a modified version of the HTML/JS code without the possibility for password protection. The steps needed was first described in this post:
viewtopic.php?p=2001#p2001

1) Use the HTML/JS code looking like the code in this page:
own_server_example_js.html
(Right-click and choose "Save target as...")

2) Edit the line:

Code: Select all

var baseURL = ""; //change this to "http://_yawcam_computer_address:port/" when running on own server.
3) Upload the images from the folder <yawcam-directory>\stream\img to your own webserver.
4) Make sure that the password protection is disabled in Yawcam's settings. (Settings -> Edit Settings... -> Password)

/malun