1

Few years back i've written code in Flex for accessing streams from OpenMeetings. Now i need to rewrite it to RubyOnRails. I'm using JWPlayer too play stream

jwplayer("CameraElement").setup({
 file: "{stream_name}",
 width: 320,
 height: 240,
 primary: "html5"
});

I have 2 streams:

  • Camera stream
  • Desktop stream

I had no problem in running Camera stream: rtmp://{address}:{port}/{folder}/{roomID}/flv:{StreamID}

but the same thing doesnt work with Desktop stream (from Desktop Sharer) - despite that it was working back in Flex. I know that JWPlayer finds stream - because after clicking play JWPlayer shows 'load' icon and then proceeds to show me black JWPlayer screen without content - and if I give wrong StreamID - JWPlayer shows infinitely 'load' icon.

What can I now do:

  1. How can i debug this problem - it doesnt seem that there is 'debug flag' anywhere in JWPlayer
  2. Can it be happening because 'Desktop stream' only has video data - and no audio data (ive tried to feed only Video data to Camera stream, and JWPlayer didnt have any issues)
  3. I've tried manipulating with options - primary: "flash", and giving file in playlist, or changing flv in stream name to mp4 - no luck here
  4. Can it be caused by too long StreamID in DesktopStream ?- its 32 alphanumeric signs, and one number in CameraStream.

Any idea is welcome...

PS OpenMeetings - version 3.03 JWPlayer - 4.10

Thomas
  • 93
  • 1
  • 9
  • Flash should definitely be set as primary when using RTMP. Do you have a link to where you are trying to run this though? – emaxsaun Oct 12 '14 at 18:12
  • Both - server and client are working on computers in my home. After I finish - they will be available at University - but its not working now. PS1 - both 'flash' and 'html5' options are working in CameraStream PS2 - i think i know what is the problem here - probably on OpenMeetings. OpenMeetings requires client of Desktop to have functions like: setId, newRed5ScreenCursor etc. I had those functions in my class in Flex. I would know earlier - but JWPlayer doesnt throw any errors. But still after i disabled those functions in OpenMeetings and recompiled - things still doesnt work... – Thomas Oct 12 '14 at 19:17
  • Please give us a link to your site. Complicated descriptions don't help - only a live example will provide any hope of debugging. – MisterNeutron Oct 13 '14 at 00:31
  • Okay, I need to see a link then to debug properly. – emaxsaun Oct 13 '14 at 16:08
  • Just as i said - i have both installed on server in my home - without extrenal IP - so there is no way to give you link. I downloaded and compiled JWPlayer from git. I will try to debug it by myself. I will report if I find anything interesting... – Thomas Oct 14 '14 at 23:05
  • Ok, i have no idea how to test it further: 1) I've added UncaughtError event to main loader in action script - it doesnt catch anything (it catch events, if I throw them manually) 2) Added functions that worked in flex (cursor) to class RTMPMediaProvider - doesnt work here 3) The only trace of error Ive noticied is in status handler of RTMPMediaProvider - in normal connection im receiving event: NetStream.Buffer.Full- and video is started being played. In desktop connection Im receiving that event and then NetStream.Buffer.Empty- and the same every 10 second. Any idea how to debug it further ? – Thomas Oct 19 '14 at 15:16
  • Ok, Im one step further - i added all functions to utils/NetClient.as - and cursor function is firing (rest probably also is firing) - but still black screen - and constant FULL/EMPTY buffer informations... Im a bit puzzled why UncaughtErrors listener didnt catch errors from NetClient - im not sure where they are ending up... – Thomas Oct 19 '14 at 21:38

1 Answers1

0

I was finally able to show stream from desktop:

1) There is no need to add functions to NetPlayer.as (despite what i suggested in comments) - JWPlayer is doing good job in handling errors for lacking functions for those calls for you (maybe even too good) - so they wont matter .

2) If you see black screen - in options of JWPlayer object disable flag: stagevideo: "false"

that should force rtmp connection to create stream in 'video' element, not in 'stage' element - that fixed the issue for me. Case closed.

Thomas
  • 93
  • 1
  • 9