Search code examples
jwplayerrtmpwowzahttp-live-streamingsmil

JWPlayer show only Apple HLS with my smil file in wowza


I am using wowza streaming engine and jw player to show the stream and working fine. But i want to control bitrate of a video so that user can see the video without much buffering. So i searched in stackoverflow and found following link. why smil file is not working with rtmp both in wowza and jwplayer

I'm Using JWplayer pro 6.0.2813 and wowza 4.3

Here is my test.smil file

<smil>
<head>
</head>
<body>
    <switch>
    <video src='mp4:test_49152.mp4' system-bitrate='49152' title='192x108'/>
    <video src='mp4:test_114688.mp4' system-bitrate='114688' title='256x144'/>
    <video src='mp4:test_184320.mp4' system-bitrate='184320' title='320x180'/>
    <video src='mp4:test_339968.mp4' system-bitrate='339968' title='480x270'/>
    <video src='mp4:test_544768.mp4' system-bitrate='544768' title='640x360'/>
    <video src='mp4:test_987136.mp4' system-bitrate='987136' title='854x480'/>
    </switch>
</body>
</smil>

and my js code:

var playerInstance = jwplayer("myElement");
playerInstance.setup({
    type: 'smil',
    playlist: [{
        image: "/images/myPoster.jpg",
        sources: [{
            file: "http://173.244.173.196:1935/vod/smil:test.smil/manifest.mpd"
        },{
            file: "rtmp://173.244.173.196:1935/vod/smil:test.smil" //Adobe RTMP . not work
        },{
            file: "http://173.244.173.196:1935/vod/smil:test.smil/jwplayer.smil" //Adobe RTMP . not work
        },{
            file: "http://173.244.173.196:1935/vod/smil:test.smil/manifest.f4m"
        },{
            file: "rtsp://173.244.173.196:1935/vod/smil:test.smil"
        },{
            file: "http://173.244.173.196:1935/vod/smil:test.smil/playlist.m3u8" //this work fine!
        }]
    }],

    width: '100%',
    aspectratio: "16:9",
    primary: "flash",
    stretching: "uniform"
});

it's totally work fine in Apple device but show black screen in android and desktop browser.


Solution

  • I realize that type: 'smil' belongs to another version and there is no need to add it. just use this:

    playerInstance.setup({
        playlist: [{
        image: "/images/myPoster.jpg",
        sources: [{
            file: "http://173.244.173.196:1935/vod/smil:test.smil/playlist.m3u8"
        },{
            file: "http://173.244.173.196:1935/vod/smil:test.smil/jwplayer.smil"
        },{
            file: "rtsp://173.244.173.196:1935/vod/test.mp4"
        }]
        }],
        width: '100%',
        aspectratio: "16:9",//Common values are 16:9, 24:10 or 4:3
        primary: "flash",
        stretching: "uniform"//stretching (uniform,fill,exactfit,none)
    });
    

    if you have any idea about improved config please advise me.