Ryan
Ryan

Reputation: 23

Changing from Flowplayer to Jwplayer - Could not connect to server

I'm trying to change over from flowplayer (current code below)

flowplayer("player", "http://churchwebsite.com/flowplayer-3.1.5.swf", {

    clip: { 
        url: 'livestream',
        live: 'true', 
        provider: 'influxis' 
    },  
    // streaming plugins are configured under the plugins node 
    plugins: {  
        influxis: { 
            url: 'http://churchwebsite.com/flowplayer.rtmp-3.1.3.swf', 

            netConnectionUrl:
                'rtmp://stream.s22.cpanelservices.com/somethinglive'

This is what I'm switching to

jwplayer("myElement").setup({
file: "rtmp://stream.s22.cpanelservices.com/somethinglive",
autostart: true,
controls: true,
height: 600,
width: 800,

Here's the information I have, not sure what to put in where.

rtmp://stream.s22.cpanelservices.com/somethinglive

rtmp://churchwebsite.com/live

I'm using Adobe flash media encoder to stream, and through there it shows

FMS URL: rtmp://stream.s22.cpanelservices.com/somethinglive

Stream: livestream

Upvotes: 1

Views: 580

Answers (1)

MisterNeutron
MisterNeutron

Reputation: 3359

A simple example of RTMP streaming:

In the <head> section:

<script type="text/javascript" src="jwplayer.js"</script>

In the <body> section:

<div id="#myElement">Loading the player...</div>
<script>
jwplayer("myElement").setup({
    file: "rtmp://example.com/application/mp4:myVideo.mp4",
    image: "/assets/myVideo.jpg",
    height: 360,
    width: 640
});
</script>

This assumes that the three JW Player script files (jwplayer.js. jwplayer.html5.js, and jwplayer.flash.swf) are in the same directory as your index.html. Otherwise, your src attribute needs to point to where you've actually stashed them. All three files need to be together, in any event.

The file attribute for the stream depends upon what, exactly, you're providing. See the JW Player configuration guide: http://support.jwplayer.com/customer/portal/articles/1430358-using-rtmp-streaming

Upvotes: 1

Related Questions