Support

Flowplayer Module v1.1

1. Getting the IDs of Your Stream


Live Channels


Playing a live video channel on Flowplayer requires knowing your broadcaster ID (bid) and channel ID (cid) for the desired channel. To find your IDs, simply go to your “publish settings” for your live channel and look at the iframe code:


WARNING: Playlists and monetized streams are not supported at this time.

 

Video On Demand Files

 

Make note of the broadcaster ID (bid) and file ID (fid) for the desired channel. To find your IDs, simply go to your “publish settings” for your on demand file and look at the iframe code:

WARNING: Only free VOD files are supported at the moment.

 

2. Flowplayer HTML Code - Live Stream

 

Replace bid and cid with the numbers from step 1.

FLOWPLAYER DEMO
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
    <head>
        <title>Sample Dacast Player</title>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
        <script type='text/javascript' src='https://static.viewer.dacast.com/ws/bundles/dacastservices/flowplayer/flowplayer-3.2.11.min.js'></script> 
        <script type="text/javascript" src="https://static.viewer.dacast.com/ws/bundles/dacastservices/js/dacast.token.js"></script>
    </head>
    <body>
        <a class="player" id="flash_content" style="display:block;width:600px;height:480px;"></a>
        <script type="text/javascript">
            window.onload = function ()
            {
                var bid = 1188;
                var cid = 1420;
                var parameters = {"bid":bid,"cid":cid};
                tokenGetService(parameters, function(token) {
                    if(token.code){
                        alert(token.message);
                    } else {
		        //Flowplayer for Live Video
                        flowplayer("flash_content", "https://static.viewer.dacast.com/ws/bundles/dacastservices/flowplayer/flowplayer-3.2.12.swf", {
                            log: {
                                level: 'debug', 
                                filter: 'org.flowplayer.bwcheck.*'
                            },
                            // configure our required plugins
                            plugins:  {
                                // RTMP streaming plugin
                                rtmp: {
                                    url: 'https://static.viewer.dacast.com/ws/bundles/dacastservices/flowplayer/flowplayer.rtmp-3.2.10.swf',
                                    netConnectionUrl: 'rtmp://live.dacast.com/201346/'+bid+'/',
                                    subscribe: true
                                }
                            },
                            // configure clip to use "rtmp" plugin for providing video data 
                            clip: { 
                                url: cid+'?'+token[0],
                                provider: 'rtmp',
                                live: true
                            }
                        });
                    }
                });
                
            } 
        </script>
    </body>
</html>

3. Flowplayer HTML Code - Video On Demand


Replace bid and fid with the numbers from step 1.

FLOWPLAYER DEMO
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
    <head>
        <title>Sample Dacast Player</title>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
        <script type='text/javascript' src='https://static.viewer.dacast.com/ws/bundles/dacastservices/flowplayer/flowplayer-3.2.11.min.js'></script> 
        <script type="text/javascript" src="https://static.viewer.dacast.com/ws/bundles/dacastservices/js/dacast.token.js"></script>
    </head>
    <body>
        <a class="player" id="flash_content" style="display:block;width:600px;height:480px;"></a>
        <script type="text/javascript">
            window.onload = function ()
            {
                var bid = 1188;
                var fid = 15754;
                var parameters = {"bid":bid,"fid":fid};
                tokenGetService(parameters, function(token){
                    if(token.code) {
                        alert(token.message);
                    } else {
                        //We prepare url for player
                        var myStreamUrl = new String(token[8]);
                        var myStreamUrlArray = myStreamUrl.split('/');
                        var filename = myStreamUrlArray[myStreamUrlArray.length-1];
                        var readpoint = myStreamUrl.substring(0,myStreamUrl.length-(filename.length));
                        var prefix = "";
                        var extension = filename.substr(-4);
                            
                        if (extension == ".mp3")
                        {
                            prefix = "mp3:";
                        }
                        if (extension == ".mp4" || extension == ".mov" || extension == ".m4v" || extension == ".aac" || extension == ".m4a" || extension == ".f4v")
                        {
                            prefix = "mp4:";
                        }
                        //Flowplayer for vod called with flash
                        flowplayer("flash_content", "https://static.viewer.dacast.com/ws/bundles/dacastservices/flowplayer/flowplayer-3.2.12.swf", {
                            log: {
                                level: 'debug', 
                                filter: 'org.flowplayer.bwcheck.*'
                            },
                            // configure our required plugins
                            plugins:  {
                                // RTMP streaming plugin
                                rtmp: {
                                    url: 'https://static.viewer.dacast.com/ws/bundles/dacastservices/flowplayer/flowplayer.rtmp-3.2.10.swf',
                                    netConnectionUrl: readpoint
                                }
                            },
                            // configure clip to use "rtmp" plugin for providing video data  
                            clip: {
                                provider: 'rtmp', 
                                url: prefix+filename+'?'+token[0]
                                }
                        });
                    }
                });
            } 
        </script>
    </body>
</html>

Comments

  • Avatar
    televinterentertainment

    where can I put the bid and cid?

  • Avatar
    televinterentertainment

    I tried a lot of times, but never can I see nothing!!!