wowza+RTMP seek not working on Chrome
I'm streaming a mp4 file from wowza to jPlayer via rtmp. The file plays ok from the beginning but when I seek to a different time, only the sound move, the image freezes. It works ok on Firefox. Any idea? TIA wowza 4.0.4 chrome 38 linux jplayer 2.8.3
It works with progressive download. It look like the flash plugin doesn't refresh the image when seeing into rtmp. Is it possible to compile the flash plugin with the free compiler?
Also if I pause then seek, it works ok
Hello @gregfr I do not know what the problem is with wowza and the RTMP player in the jPlayer flash. I did not write that part, @rmhall generously donated the entire RTMP player. If you ask me, it is all the nonsense we have to do in the RTMP player to make it behave like the HTML5 element that may be causing the problem. All the players are like that though. Little things like to change position in the flash you play from the point and immediately stop. (Or something like that - it has been a while since being intimate with that code.)
As for changing the Actionscript code and recompiling, it is now very easy, assuming you have node installed on your computer. And assuming you have git installed on the command line.
- Install node
- Clone the jPlayer repo:
git clone https://github.com/happyworm/jPlayer.git - Alternatively, you could download and unzip the entire repo. But that is ghetto.
- Execute:
npm installand all the development packages will install to the repository. Yes, it goes over the top of the repo. The gitignore file ignores all this node_module stuff. - To compile the SWF execute:
grunt swf
That will use the adobe flex 4.6 compiler.
Otherwise, just run flex from your own copy of the files to compile it. That was what I used to do.
Apparently I need to update my docs on that bit: jPlayer-files-plugin
But there are links to the flex sdk if you want to go that way.
I'd suggest installing git and node. There is a git app to ease matters, but I favour the command line. You can then clone the repo, then make a local branch and start making your changes. That way you can keep your branch up to date with jPlayer, and if you want to you could contribute your solution back to us with a pull request.
Thanks for your answer. I compiled locally and it was indeed quite easy. Now I have to learn actionscript ;) Can you try this url? rtmp://live.civideo.fr:1935/vod/mp4:sample.mp4 I will try with other players, the fact that it works in firefox and not chrome makes me thing it may be related to the google version of flash shipped with chrome.
OK I just tested with mediaelement on the same html page with the same rtmp url and it's working, so it's indeed specific to jplayer...
ran into the same issue, here is a quick hack to fix it.
edit JplayerRtmp.as, inside the play() function look for SEEKER3 and adjust to the following:
if(!isNaN(time)) { // Avoid using seek() when it is already correct.
trace("SEEKER3");
myStream.addEventListener(NetStatusEvent.NET_STATUS,customSeekHandler);
pause();
function customSeekHandler(event:NetStatusEvent):void
{
if (event.info.code == "NetStream.Pause.Notify")
{
myStream.removeEventListener(NetStatusEvent.NET_STATUS,customSeekHandler);
myStream.seek(myStatus.pausePosition/1000);
}
}
}
recompile the swf and you are good to go. i added the listener because if a user tried to seek rapidly weird things would happen.