Order Now AdSolution Sign Up | Login » Bits on the Run Sign Up | Login »

Forums

/

JW Player 5.3 Reconnect livestream plugin issue

111 replies [Last post]
Reply

Hi there!

I'm currently using the latest version of JW player. But the live stream plugin for reconnecting doesn't work.

I'm using the following code:

<script type="text/javascript">
var so = new SWFObject('player.swf',
'mpl','400','320','9');
so.addParam('allowscriptaccess','always');
so.addParam('allowfullscreen','true');
so.addParam('flashvars','plugins=livestream-1&autostart=true&file=livestream&provider=rtmp&streamer=rtmp://192.168.0.6/live');
so.write('mediaspace');
</script>

When I use the examples codes described in the plugin page:

<script type="text/javascript">
var so = new SWFObject('player.swf',
'mpl','400','320','9');
so.addParam('allowscriptaccess','always');
so.addParam('allowfullscreen','true');
so.addParam('flashvars','plugins=livestream-1&livestream.file=livestream&provider=rtmp&livestream.streamer=rtmp://192.168.0.6/live');

so.write('mediaspace');
</script>

It won't connect at all. Am I doing something wrong?

Reply

Perhaps it's better to do this with some javascripting going forward than with the livestream plugin. There's some severe limitations to how the livestream plugin does it (it's basically trying to catch errors). Our new javascript API should be able to do this (and more) in a way that's easy to modify by publishers.

Can you tell me what functionalities you expect from the livestream plugin? For example:

* try to reconnect on pause
* set a "coming soon" screen before the event starts
* set a "thans for watching" screen after the event ends

The more (specific) info you can give, the better!

Reply

Hi,

Thanks for your response. Basicly what I want from the plugin is that if the encoder gets down for a couple of seconds (Or the streaming server) That it will pickup the stream again after a couple of seconds.

If i'm correct that is the functionality of the live stream plugin right?

Currently I do see the checking for livestream message every X seconds. Even when the stream is playing. And If I disconnect the encoder or server it won't reconnect automatic. I have to hit the play button again.

Can you help me setting this up? Thanks!

Jules

Reply

I am experiencing the very same problem like Jules. I even talked to Ethan about it and we tested the whole thing for couple of hours. Plugin does try to pick up stream and connects, but only on first web page load. If I stop the encoding server, jw player just stops and stays that way. It doesnt try to reconnect again until web page refresh.

Reply

Link ?

Reply

@ethan We went through this couple of days ago so you know the situation and you said you will talk to Jeroen about it..

Reply

I can't give you a link right now cause the streaming server isn't public at the moment. And to show you the problem I have to restart the encoder or server.

If you want to do some advance testing. Maybe we can open a chatbox to test things true.

Thnx again

Reply

Np...let's chat. thx

Reply

Please post if you found a solution for this problem..

Thanks

Reply

Unfortunately, you will have to use an older version of the player to use this plugin it seems.

Reply

I will use any version as long as this plugin works properly

Reply

Having the same problem with 5.2.1065

Stream is being picked up once, but when broadcast is started for second time it is not being picked up.

also the 'checking for livestream' doesn't reappear after broadcast stops.

see http://www2.surfnet.nl/bijeenkomsten/rd2010/livevideo/test/

thanx

Reply

Same problem. What I should wish:
* always check for live stream
* if there is one, show it
* if there is none, show an image or pause movie
* keep checking between different boradcasts (during pause)

Reply

I have only 1 wish, originaly what was this plugin made for:
-check for the stream, if its there - play, if not - keep checking until it becomes available

Reply

Guys, this plugin was originally written for 4.4, try to use that version.

Reply

@Ethan It doesnt work. And you know that since we tested it for hours.

Reply

With 4.4? We tested 5.3 for hours...not 4.4

Reply

At the end you said to try with 4.4, you even gave me link with 4.4..its the same with every player..

Reply

Well. Can you provide us with an URL for the 4.4. version so I can test it out as well?

Reply

@Jules Here you can test with every player or plugin available http://developer.longtailvideo.com/trac/testing

Please post your results..

Reply

I just tested it. But got exactly the same results. Short what I have setted up:

rtmp.streamer = internal adress
rmtp.file = stream name
autostart = true

When I reload the player it plays the stream but giving me a message: "checking livestream" every X seconds. But the stream is playing tho. After I restart my encoder (Disconnect for about 5 seconds) It won't pick up the stream again. Even when it's still saying "checking for livestream". After hitting the play button it goes again..

Reply

Exactly. Same here.

Reply

You need to set livestream.file and livestream.streamer, not the regular file / streamer flashvars, when using this plugin.

Reply

@Ethan If you're willing we can test some more with other versions, just let me know.

Reply

What I suggested should have worked. Please email / im me, thanks.

Reply

I tried your suggestion. But now it won't pick up the stream at all.

It tries on checking every x seconds

When I add the live stream properties into the properties field (Where I shouldn't put them I do have a live stream.)

I tried. the livestream.file and livestream.streamer settings in the JW player 5.3 as well. But it doesn't load anything. I noticed now in my Wowza Media Server it connect and disconnects right after it. Do you know if this works with Wowza Media Server?

@targsx What for streaming server are you using?

Reply

I am using wowza also

Reply

Hmm, maybe a bug w/Wowza + this plugin, possibly.

Reply

Can you give us working example where this plugin actually works?
Which encoding server/enviroment should we use to see this plugin works?

Reply

Confirmed this plugin is indeed broken. It was originally written for FMS 3.0, but since the servers have changed their error messaging in such a way the plugin doesn't pick up "down" streams anymore.

I can show an example javascript that can be used to re-try the stream every XX seconds whenever the server refuses to connect or the stream is down...

Which servers do you all use? FMS 3.5, FMS 4, Wowza 1.5, Wowza 2, or a CDN (that is using the "FCSubscribe" functionalities)? Error messaging around broken streams different between all these servers.

Reply

It would be great if you can provide solution for Wowza 2.

Reply

I'll look into that - we have a Wowza EC2 server running, so can quickly test.

Reply

Great, let us know please.
If you need tester I'm here to help out

Reply

So I have created a little javascript. A demo can be found here:

http://www.bitsontherun.com/demo/livestream

The script is set up very easily. You need to set four options:

* The container DIV where the player is placed into
* The configuration options of the player (file, streamer, title, etc).
* The start date of the event (see the demo - you can append a timezone)
* The end date of the event (see the demo - you can append a timezone)

Note the script is using the JW Player Embedder. No SWFObject or such. The JW Player embedder is much cooler anyway - I already have a demo running that simultaneously also plays the Apple HLS stream on the iPhone/iPad.

The script will present three screens:

1. An "Event will start in xx hours, xx minutes ..." screen before the event starts.
2. An "Attempting to reconnect ...." screen when the event should be there, but the stream is down.
3. An "Event completed." screen after the event has ended.

If you omit the start date, the script presumes the event is already running. If you omit the end date, the script presumes the event will run 24 hours from now. For the best experience, start the live stream a few minutes before the event starts, and stop the live stream a few minutes after the event ends.

You should find the script pretty straightforward and easy to modify. In time, I'll try migrating this into an actual JW Player plugin.

Reply

Just tried it, but seems that script still doesnt pick up the stream if I restart wowza server in the middle of the streaming...page needs to be manually refreshed to continue..

Reply

I tested this on killing the upload connection (i.e. unplugging) and starting/stopping the ingest. What do you mean with restarting the server? Booting it? wowzamediaserver start?

Reply

Tested with simple wowza server service stop and start again, doesnt work..can you make it work with that combination?

Reply

I'll look into that.

Reply

Fixed this (same URL).

When the Wowza server was restarted, the player would not send an error but simply end the stream.

Reply

Great, it works! If you'll ever visit Croatia I'm buying you a dinner and beer all night long :)

Since this is custom based now, is it possible to include buffer option and jw player spectrum plugin in this?

Reply

One more thing, it seems that stream cant be stopped now when pressing on the pause button. It just continues to reconnect. Can you check please..

Reply

Hmm, that's something to think about. To the plugin, there's no distinction between a server restart and a click on the pause button. They both set the stream from PLAYING to IDLE.

The better fix is likely for the player itself to respond differently to a server disconnect (either throw a COMPLETE or ERROR message, but not simply idle out the stream. Looking into it:

http://developer.longtailvideo.com/trac/ticket/1167

For now, you could perhaps hide the controls, or offer a customized skin in which only the fullscreen / volume controls are available.

Reply

Yeah, that'll do for now.

How about using plugins and buffer? Possible?

Reply

Hi Jeroen,

Sorry for not being active on this message for a while. Have been very busy with other things. Good that it works now!

will hide the controls for now. In future it would be nice if the pauze buttons pauzes. So there can be an option for DVR as well.

Thanks for your support!

Reply

@targsx: plugins and a different buffer should be no problem.

@Jules: yes indeed, it's on the list to get fixed. DVR would be nice as well, but I should check with Wowza on the possibilities for that. Wowza doesn't support DVR at present.

Reply

Only problem I am having now is that it looks different in IE and different in FireFox and I cant manage to make it look the same in both browsers...

Reply

Let me look into this. Will probably really get fixed by an update in the 5.5 player (the ticket I posted further up).

Reply

Any news regarding this?

Reply

Nope, it's still on my todo list:

http://developer.longtailvideo.com/trac/ticket/1167

Reply

The bug in the player was fixed; one can now differentiate between a user pausing and a server disconnecting.

Additionally, I just wrapped up a beta of the new Livestream plugin. It allows you to schedule an event's start and end time, reconnect on stream drop and simultaneously stream to Flash + iOS. Here's the full download, including docs, text pages and source code:

http://developer.longtailvideo.com/trac/changeset/HEAD/plugins/livestream/js?old_path=%2F&format=zip

Functionality and configuration are still quite basic. Feedback is very welcome!

Reply

Quick notice, I'm trying reconnect version and page itself looks different in IE and different in Firefox..can you make them look same on both browsers?

Reply

I didn't check IE yet, there could indeed be issues with it. I'll see.

Reply

I am experiencing problems with FF, but IE works everytime. FF doesnt reconnect after wowza service restart, IE reconnects without a hitch. Anybody else having this problem?

Reply

First, can you make sure you use the 5.5 player? It's probably not related, but this update fixes a bug in the player event flow after a disconnect.

If there's discrepancies between FF and IE, can you check:

* The Flash Player version of both browsers (different?).
* The Firefox javascript console (perhaps an error?)

Reply

I am using all original components from your zip file, so yes, its 5.5 player. I didnt change anything except rtmp link to my stream. IE connects without a problem after wowza service restart, FF does not.

Reply

Solved it, your script is trying to reconnect on port 80 instead of port 1935 which is wowza port :) If I put :1935 in my stream link, works like a charm.

Reply

OK, cool.

Reply

I am trying to include spectrumvisualizer plugin into this, can you tell me how to do it in this case?

Reply

Also can other plugins can be used? Like bufferlength, etc.? tnx

Reply

Any combination of plugins can be loaded into the player.

Reply

Can you provide example of how its done? Thanks

Reply

For example:

plugins: {
  '/static/livestream.js': {},
  '/static/localplugin.swf': {},
  'hd': {}
}
Reply

And how to incorporate plugin options into this?

For example if I want to do this:

'spectrumvisualizer-1&spectrumvisualizer.numbars=22&spectrumvisualizer.colortype=gradient&spectrumvisualizer.topcolor=ff666666&spectrumvisualizer.bottomcolor=ffFFFFFF':

Reply

Options are nested, like this:

plugins: {
    'spectrumvisualizer': {
        numbars: 22,
        colortype: 'gradient',
        topcolor: 'ff66666666',
        bottomcolor: ''ffffffff'
    }
}
Reply

(whoops - whitout the double quote in bottomcolor)

Reply

This is working now, but play/pause function is not working when this 2 plugins are implemented together..

Reply

Yeah, I think the visualizer is stealing the play/pause from the display. Perhaps that can be fixed by the developer. I'll nudge him.

Reply

@JeroenW
I am so glad that you posted the link to the demo. (http://www.bitsontherun.com/demo/livestream) I was concerned about adding support for iOS along with the rtmp feed as well as the countdown. Thank you so much.
I downloaded the files from the newer link above but didn't get them to work on my site immediately. I'll get back to it later. My main concerns have been addressed. The feed shows up on my iPhone and iPad along with the countdown timer and everything. Wow!

Reply

Still having issues, thing is that after wowza service restarts plugin doesnt reconnect to the port(1935) provided in streamer parameter. It connects to port 80 for some reason and it does it only when wowza is restarted, when opening link normally it does open the stream on provided port. Refresh of the page also works fine. Hope I was clear. Jeroen can you check?

Reply

Quick addon, when it happens besides it tries to open the stream on port 80, it also tries to open it over RTMPT instead of RTMP??
:\

Reply

I'll look into it - that could be b/c the server is too slow to respond, triggering the tunneling. You can disable it (on 5.5 player) by setting the rtmp.tunneling=false flashvar.

Reply

Jeroen, thank you so much for the plugin, and for your work on it.

I have a question, as of right now I have the plugin working just fine on my site, but it doesn't appear to be reading from the local livestream.js file. I have tried changing the text displayed after the event is over and nothing changes, even after clearing my cache.

Any reason why it wouldn't be changing? Here is the code that I have on my site:

<script type='text/javascript'>
  jwplayer('player').setup({
    file:'123',
    height: 600,
    width: 800,
    stretching: 'exactfit',
    abouttext: 'Training Seminars,
    bufferlength: '10',
    aboutlink: 'http://www.google.com',
    flashplayer: "player.swf",
    plugins: {
      'livestream.js': {
start: 1301941432,
end: 1301942152,
title: 'Live Seminar Training'
         }
       },
     streamer: 'rtmp://site',
     skin: 'zion.zip',
     controlbar: 'over',
     image:'VideoBackground.png'
  });
</script>

Here is what I tried changing the seminar ended to:

else{e.innerHTML="This event has ended, replays will be available soon.";l(q,{display:"block"})}
Reply

Please give us example how to use this rtmp.tunneling with your plugin..

Reply

@dbw42: Your embed code is fine, otherwise the plugin wouldn't get loaded at all. Perhaps the old version is still cached?

@targsx: It's basically like this:

<script type='text/javascript'>
  jwplayer('player').setup({
    file:'myEvent',
    'rtmp.tunneling': false,
    streamer: 'rtmp://myServer.com',
    ...
  });
</script>
Reply

Tunneling doesnt work Jeroen..still tries on rtmpt and port 80 after wowza service restart..

Reply

Do you have the latest 5.5 player?

Also, I wonder if the player does the tunneling or if Wowza automatically reverts. I'll do some testing on that.

Reply

Yeah, I'm using 5.5. Interesting thing is that if while listening to the stream, I plug out/in my network cable or disable/enable network card it does reconnect as it should, but if I restart wowza service it does not, then it tries to connect on rtmpt and port 80.

Reply

Let me do some more tests to figure out what goes wrong there.

Reply

Hey Jeroen,

I'm still having issues changing that text. I have tried placing the files on a brand new server and playing the files on a machine that had never viewed the stream but the text doesn't seem to change.

Also, with the release of the 5.5 player and this plugin I am having issues with playback. If the stream is playing and I refresh the page it reconnects to the stream but will only display a black screen. I actually have to stop the broadcast and start it again to get it to show up. Any ideas?

Thanks for your help!

Reply

Perhaps I can make this text a variable too? That would make it easier for you.

As to the stopping, I'm compiling a list of test cases for the plugin. Every player version, every server, server setup and disconnect method. That should enable us to iron out any issues with specific combos this plugin still has.

Reply

That would be great having it as a text variable.

This plugin is extremely helpful, thanks for all the work you are doing with it.

Reply

Hey Jeroen,

It appears that there is quite of bit of the functionality that is handled with the livestream.swf. Including the text I posted about above. As it stands is there a way around using this file? Or could I possibly get the .fla to edit some of the parameters?

Thanks!

Reply
Reply

@JeroenWijering

Anything new on reconnect issues we discussed?

Reply

No, not yet. I'm first working on Wowza DVR (Wowza 3) now. I'll revisit the reconnect issue thereafter.

Reply

Do you have maybe ETA on that?

Reply

I'm sorry, but not really. I'm trying to look at it, but there's a looong list of items that also need to get done.

Reply

Yeah, I believe you, just let us know when you have some info please. Thanks

Reply

Hello,

I have uploaded the livestream.js and swf to my servers and have tried embedding with the simple embed method but it doesn't seem to lad the plugin. The embed code I am using is:

    <object classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' width='640' height='360' id='livePlayer1' name='livePlayer1'>
    <param name='movie' value='http://c69148.r48.cf3.rackcdn.com/player5.6.swf'>
    <param name='allowfullscreen' value='true'>
    <param name='allowscriptaccess' value='always'>
    <param name='wmode' value='transparent'>
    <param name='flashvars' value='file=mp4:livestream1&streamer=rtmp://ubqlive.mpl.miisolutions.net/ubqlive-live01/_definst_&provider=rtmp&skin=http://c69148.r48.cf3.rackcdn.com/Live1.zip&controlbar=over&wmode=opaque&plugins=livestream.js&end=1307533155&start=1307533141&title=Test plugin'>
        <embed
        type='application/x-shockwave-flash'
        id='livePlayer1'
        name='livePlayer1'
        src='http://c69148.r48.cf3.rackcdn.com/player5.6.swf'
        width='640'
        height='360'
        bgcolor='undefined'
        allowscriptaccess='always'
        allowfullscreen='true'
        wmode='transparent'
        flashvars='file=mp4:livestream1&streamer=rtmp://ubqlive.mpl.miisolutions.net/ubqlive-live01/_definst_&provider=rtmp&skin=http://c69148.r48.cf3.rackcdn.com/Live1.zip&controlbar=over&wmode=opaque&plugins=http://www.ubqlive.com/Testing/Embed/livestream.js&end=1307533155&start=1307533141&title=Test plugin'
        />
    </object>

Any help would be hugely appreciated.

Reply

JS plugins do not work with object/embed codes. You have to use the JW Embedder for this.

Reply

Okay thank you Jeroen.

I have changed to using the livestream.swf which is now detecting the plugin but it is not detecting the start or end date or title?

Is there something wrong with my code? I have setup the code at http://www.ubqlive.com/Testing/Embed/livePlugin.html

Reply

@Patrick - Yes, something is wrong with your code. You are not using the JW Embedder, and the old LiveStream SWF file has been deprecated, so you can't use it. If you want to use the latest LiveStream JS plugin, you need to use the JW Embedder.

Reply

Thanks Ethan,

The SWF works correctly when used with the JW embedder but not when used with the object embed. Is this due to the swf being old or an error with the embed code?

I am just trying to understand as I need to use the object embed and wanted to use the livestream plugin. It just seems strange that the livestream.swf works with jw embedder but not object embed which makes me think my code is wrong.

Reply

Why do you need to use the object/embed method? The JW Embedder is a much better option.

Reply

Hi sorry for the late response.

I just wanted to have a solution which did not rely on JS. But I if the swf has been depreciated then not to worry.

Cheers.

Reply

Np, cheers.

Reply

FYI there is an extra "," (comma) at ~character 1940 in the livestream.js file that breaks compatibility with IE. Luckily it's an easy fix!

Reply

Thanks for the catch. fixed..

Reply

Hi, the link with the demo doesn't work anymore.

Reply

What link?

Reply
Reply

I will need to ask him, hang tight!

Reply

It's in "branches", since we do not actively develop this plugin anymore:

http://developer.longtailvideo.com/trac/browser/branches/livestream

Reply

Sorry for bumping a dead thread, but it sounds like this plugin gives us exactly the functionality we are looking for - specifically, the ability to auto-reconnect if a live sream drops. Since this plugin isn't developed anymore, is there a replacement feature in current versions of the player that give us equivalent functionality?

Reply

You can still use this version, download it here - http://developer.longtailvideo.com/trac/browser/branches/livestream

Reply

hi,

any news about possibility to change the text inside JS or with variables ?
it seems it is hardcoded in swf file so in changing inside js has no impact.

NIcolas

Reply

You can't change it I'm afraid.

Reply

ok Thanks Ethan for your quick answer

is it planned to replace this plugin by an other one or something else ? because it's a big plus for live streaming audience

Regards

Nicolas

Reply

Np, no plans yet I'm afraid.

Reply

is there at least a possibility to get a new compilation with this possibility to change text ?
maybe one of us already did it, would be cool to share with us if possible...

Thanks

Nicolas

Reply

... even impossible to change text/image positions :-(

Reply

Yes, but only if you modify the sources. The sources are available on our trac.

Post new comment

  • Allowed HTML tags: <code> <blockquote> <em> <strong> <strike> <ul> <li> <ol>
  • You may post code using <code>...</code> .
  • Lines and paragraphs break automatically.
  • Web page addresses and e-mail addresses turn into links automatically.

More information about formatting options