﻿function GetVideo(flvfile, jpgfile) {
    var dosya;
    if (flvfile == "mavimarmara.mp4") {
        GetYoutubeVideo(flvfile, jpgfile);
    }
    else {

        GetTVNETVideo(flvfile, jpgfile);
    }
}


function GetYoutubeVideo(flvfile, jpgfile) {

    swfobject.removeSWF("flvplayer");
    jwplayer('video_cod').setup({
        'flashplayer': 'player.swf',
        'file': 'http://www.youtube.com/watch?v=XLkzjekxR3I',
        'logo': 'http://tvnet.tv.tr/Images/tvnetplayerlogo.jpg',
        'controlbar': 'bottom',
        'width': '922',
        'autostart': 'true',
        'height': '519',
        'skin': 'modieus.zip',
        'dock': 'true',
        'stretching': 'exactfit',
        'icons': 'true',
        'playerready': 'playerReady',
        'bufferlength': '1',
       // 'type': 'video',
        'playlist': 'none',
        'enablejs': true,
        'showdigits': true,
        'displayclick': 'none',
        'menu': false,
       // 'sharing.code': escape('<embed name="tvnet.tv.tr" width="400" height="326" allowfullscreen="true" src="http://tvnet.tv.tr/player.swf" flashvars="file=http://tvnet.tv.tr/flv/' + flvfile + '&image=http://tvnet.tv.tr/flv/resim/' + jpgfile + '");" type="application/x-shockwave-flash" pluginspage="http://get.adobe.com/flashplayer/"></embed>'),
        'plugins': 'sharing-2', 'sharing.code': 'true'
    });
};



function GetTVNETVideo(flvfile, jpgfile) {
    var videoid_array = flvfile.split(".");
    var videoid = videoid_array[0];
    swfobject.removeSWF("flvplayer");
    jwplayer('video_cod').setup({
        'flashplayer': 'player.swf',
        'file': "http://tvnet.tv.tr/flv/" + flvfile,
        'controlbar': 'bottom',
        'width': '922',
        'autostart': 'true',
        'height': '519',
        'skin': 'modieus.zip',
        'dock': 'true',
        'stretching': 'exactfit',
        'icons': 'true',
        'backcolor': '#000',
        'playerready': 'playerReady',
        'bufferlength': 1,
        'type': 'video',
        'playlist': 'none',
        'enablejs': true,
        'showdigits': true,
        'displayclick': 'none',
        'menu': false,
        'gapro.accountid': "UA-3434195-2",
        'gapro.trackstarts': true,
        'gapro.trackpercentage': true,
        'gapro.tracktime': true,
        plugins: {
     "sharing-3": {
         code: '<embed name="tvnet.tv.tr" width="400" height="326" allowfullscreen="true" src="http://tvnet.tv.tr/player.swf" flashvars="file=http://tvnet.tv.tr/flv/' + flvfile + '&image=http://tvnet.tv.tr/flv/resim/' + jpgfile + '");" type="application/x-shockwave-flash" pluginspage="http://get.adobe.com/flashplayer/"></embed>',
         link: 'http://tvnet.tv.tr/?i='+videoid
     }
   }

//        'sharing.code': escape('<embed name="tvnet.tv.tr" width="400" height="326" allowfullscreen="true" src="http://tvnet.tv.tr/player.swf" flashvars="file=http://tvnet.tv.tr/flv/' + flvfile + '&image=http://tvnet.tv.tr/flv/resim/' + jpgfile + '");" type="application/x-shockwave-flash" pluginspage="http://get.adobe.com/flashplayer/"></embed>'),
//        'plugins': 'sharing-1', 'sharing.code': 'true'
    });

};
function GetLive() {
    swfobject.removeSWF("flvplayer");
    jwplayer('video_cod').setup({
        'flashplayer': 'player53.swf',
        'file': 'livestream',
        'image': '/flv/resim/',
        'streamer': 'rtmp://91.93.118.165/live/tvnet',
        'type': 'rtmp',
        'menu': 'false',
        'controlbar': 'bottom',
        'width': '922',
        'autostart': 'true',
        'height': '519',
        'skin': 'modieus.zip',
        'dock': 'true',
        'stretching': 'exactfit',
        'icons': 'true',
        'backcolor': '#000',
        'playerready': 'playerReady',
        'bufferlength': '1',
        'playlist': 'none',
        'enablejs': true,
        'showdigits': true,
        'displayclick': 'none',
        'gapro.accountid': "UA-3434195-2",
        'gapro.trackstarts': true,
        'gapro.trackpercentage': true,
        'gapro.tracktime': true,
        'menu': 'false'
    });

};

