2

Okay I'm using this code; and I'm curious to know why it isn't streaming to my RTMP server; I have tried connecting to my Red5 RTMP server through OBS which is a broadcasting program and it works fine but when using this script it doesn't broadcast the webcam I'm just wondering if I'm missing any variables which is preventing me from connecting to the rtmp server or something. Thank you for any help!

    <embed src="webcam.swf"
           flashvars="server=rtmp://ip/path/usertoken"
           bgcolor="#ffffff"
           width="800"
           height="900"
           quality="high"
           allowScriptAccess="always"
           type="application/x-shockwave-flash"
           pluginspage="http://www.macromedia.com/go/getflashplayer" />

In the readme of the setup there are some variables which I didn't understand how to use so I'm going to paste them below:

### FlashVars

* server : rtmp server
* stream : rtmp stream to publish
* token  : (optional)
* camerawidth : default 640
* cameraheight : default 480
* camerafps : default 15

this is the main one that I didn't understand with swfobject:

    var flashvars = {server : "rtmp://localhost/live",
                     stream : "plop"};
    var params = {};
    var attributes = {};
    swfobject.embedSWF("webcam.swf", "myId", "300", "120", "9.0.0","expressInstall.swf", flashvars, params, attributes);
Mykola
  • 3,343
  • 6
  • 23
  • 39
Johnny
  • 319
  • 1
  • 14
  • hey Lewis, what's `webcam.swf`is it a custom one? do you have source code for it? – Eugene Hauptmann Feb 01 '16 at 20:26
  • @www.eugenehp.tk Hey thankyou for the reply; I don't have a source code for the .swf if you would like I can upload the .swf if that would be of use. I really appreciate the response. – Johnny Feb 02 '16 at 20:39
  • hey Lewis, yeah, copy the link to the swf here, and let's see if I can help you with that. – Eugene Hauptmann Feb 03 '16 at 10:59
  • Here you can find the whole directory. [link](https://github.com/AF83/webcam-streaming) Thankyou for thelp @www.eugenehp.tk – Johnny Feb 04 '16 at 19:17

0 Answers0