');
if (player.video.relatedVideos && player.video.relatedVideos.length>0) {
for(var i = 0; i < Math.min(player.video.relatedVideos.length, 2); i++) {
var relvid=player.video.relatedVideos[i];
res.push('
');
res.push('
');
res.push('
');
res.push('' + this._htmlescape(relvid.title) + '');
res.push('
');
res.push('
');
res.push('
');
};
};
res.push('
');
res.push('');
return res.join('');
},
_getHotPostScreenHtml:function(player){
var res = [];
res.push('');
res.push('
');
res.push(this._getPostScreenButtons(player));
res.push('
');
res.push('
');
if (player.video.relatedVideos && player.video.relatedVideos.length>0) {
for(var i = 0; i < Math.min(player.video.relatedVideos.length, 2); i++) {
var relvid=player.video.relatedVideos[i];
res.push('
');
res.push('
');
res.push('
');
res.push('' + this._htmlescape(relvid.title) + '');
res.push('
');
res.push('
');
res.push('' + this._htmlescape(relvid.subTitle) + '');
res.push('
');
res.push('
');
res.push('
');
};
};
res.push('
');
res.push('
');
return res.join('');
},
_getHeadlinePostScreenHtml:function(player){
var res=[];
res.push('');
var containerHtml = '
';
if (isAudio){
containerHtml = '
';
html.push(this._getAudioPlayerHtml(player,containerHtml));
} else {
html.push('
');
html.push(containerHtml);
html.push(this._initDecoration(player));
html.push(this._initContent(player));
html.push('');
};
html.push('
');
document.getElementById(player.params.destId).innerHTML=html.join('');
player.containerInitialized=true;
} else {
document.getElementById('yntfpcontainer'+player.id).style.display='block';
if (!isAudio){
document.getElementById('fpPostScreen'+player.id).style.display='none';
if(player.hasDecoration){
document.getElementById('fpDecorationContent'+player.id).innerHTML=this._getDecorationHtml(player);
};
};
};
if (!isAudio){
this._updateSharingFooter(player);
};
},
/** returns "https://www.facebook.com/sharer.php?u={escaped target url}" to use as facebook sharing link */
_getFacebookShareUrl:function(player){
var playerType = player.type;
var video = player.video;
var targetPath = null;
if ((playerType === "article" || playerType === "headline" || player.type == "article1024") && video.articlePath) {
targetPath = video.articlePath;
} else if ((playerType === "hot" || player.type === "stage") && video.pagePath) {
targetPath = video.pagePath;
}
else if (playerType === "flp6_Hot" ){
targetPath = location.pathname ;
} else if ((player.type === "galleries") && video.id) {
targetPath = window.CmmAppVideoApi.CONST.VideoIdChannelSrc.replace('TOREPLACE',video.id);
}
if (targetPath && targetPath.length) {
var loc = window.location;
var fbSharer = new Array("https://www.facebook.com/sharer.php?u=", loc.protocol, "//", loc.hostname, escape(targetPath));
return fbSharer.join('');
} else {
return '';
}
},
_updateSharingFooter:function(player){
var params = player.params;
var yqFooter = yq("div.sharingFooter", yq("div#" + params.destId).parent());
if (!yqFooter.length)
{
return;
}
if(this._getFacebookShareUrl(player)!="") {
yq("a.sf_fb", yqFooter).attr("href", this._getFacebookShareUrl(player));
}
yq("input[name=articleId]", yqFooter).attr("value", params.artId);
var videoEmbedCode=this.getVideoEmbedCode(player.video);
if (videoEmbedCode.length>0) {
yq("textarea.sf_embed_code", yqFooter).attr("value", videoEmbedCode);
};
},
_getAudioPlayerHtml:function(player,containerHtml) {
var html = [];
html.push("');
html.push('
');
html.push('
');
html.push('
'+this._htmlescape(player.video.credits)+'
');
html.push('
');
html.push('
');
return html.join('');
},
_getHeadlineDecoration:function(player,height){
var html = [];
var height = player.decorationHeight;
html.push('');
html.push('
');
html.push('
');
html.push('
'+this._htmlescape(player.video.title)+'
');
html.push('
'+this._htmlescape(player.video.subTitle)+'
');
html.push('
');
if(player.video.articlePath) {
if(player.video.articleAuthor) {
html.push(''+this._htmlescape(player.video.articleAuthor)+', ');
};
html.push('פורסם: ');
html.push(''+this._htmlescape(player.video.articleLaunchDate)+' ');
html.push('לכתבה המלאה ');
html.push('('+this._htmlescape(player.video.articleComments)+' תגובות) ');
};
html.push('
');
html.push('
');
html.push('
');
return html.join('');
},
_enableDecoration:function(player){
document.getElementById('fpDecoration' + player.id).style.display = 'block';
},
_disableDecoration:function(player){
document.getElementById('fpDecoration' + player.id).style.display = 'none';
},
_showDecoration:function(player){
this._enableDecoration(player);
yq('#fpDecorationContent' + player.id).stop().animate({
top:0
}, 500);
},
_hideDecoration:function(player){
var _this = this;
yq('#fpDecorationContent' + player.id).stop().animate({
top:player.decorationHeight
}, 500,function(){
_this._disableDecoration(player);
});
},
/** persists player's decoration, according to (boolean) persistValue */
_persistDecoration:function(player, persistValue){
if (player.hasDecoration) {
/** disable/enable automatic decoration & display/hide it manually */
player.decorationEnabled = !persistValue;
if (persistValue) {
this._showDecoration(player);
} else if (!player.mouseInPlayer) {
this._hideDecoration(player);
}
}
},
_addDecorationConf:function(player,conf){
player.hasDecoration = false;
var decorationTypes = [
'article'
,'article1024'
,'headline'
,'hot'
,'VideoChannel'
,'HomepagePlayer'
,'LightBoxArticlePlayer'
,'stage'
,'TopStory'
,'TopStoryWide'
,'TopStoryArticle'
,'articlePnaiPlus'
];
if(yq.inArray(player.type, decorationTypes) >= 0){
var _this = this;
if(player.type == "article" || player.type == "article1024" || player.type == "articlePnaiPlus"){
if(player.video.credits == ""){
return conf;
};
} else if(player.type == "headline"){
if(player.video.credits == "" && player.video.articleTitle == ""){
return conf;
};
} else if ((player.type === "hot" || player.type === "stage") && !player.video.pagePath) {
return conf;
}
player.hasDecoration = true;
player.decorationEnabled = false;
player.clipPlaying = false;
player.mouseInPlayer = false;
yq('#yntfpcontainer'+player.id).parent().hover(
function(){
player.mouseInPlayer = true;
if(player.clipPlaying){
player.contentManager.fireEvent('onPlayerMouseOver');
if(player.decorationEnabled){
_this._showDecoration(player);
};
};
},
function(event){
player.mouseInPlayer = false;
if(player.clipPlaying){
player.contentManager.fireEvent('onPlayerMouseOut');
if(player.decorationEnabled){
_this._hideDecoration(player);
};
};
}
);
conf.onFullscreen = function(){
if(player.clipPlaying){
player.contentManager.fireEvent('onPlayerFullscreen');
_this._hideDecoration(player);
player.decorationEnabled = false;
};
};
conf.onFullscreenExit = function(){
if(player.clipPlaying) {
player.decorationEnabled = true;
};
};
conf.onBeforeLoad = function(){
//_this._disableDecoration(player);
};
/*conf.clip.onPause=function(){
player.clipPlaying = false;
_this._disableDecoration(player);
};
conf.clip.onResume=function(){
player.clipPlaying = true;
_this._enableDecoration(player);
};*/
};
return conf;
},
_addAdsConf:function(player,conf){
var _this=this;
var is_no_ads = player.video.is_no_ads || player.params.is_no_ads || this.CONST.noAds;
var isCarambolaEnabled = !is_no_ads && player.type == 'hot';
if (this.CONST.site=='hot') {
var flavor='HOT';
} else if (this.CONST.site=='ynet' || this.CONST.site=='stage' || this.CONST.site=='pplus') {
var flavor='YNET';
} else if (this.CONST.site=='mekomy') {
var flavor='Mynet';
isCarambolaEnabled = false;
} else if (this.CONST.site=='laisha') {
var flavor='Laisha';
} else {
is_no_ads=true;
};
isCarambolaEnabled = false;
if (is_no_ads) {
if (!player.video.isInvalid) {
conf.clip.onFinish=function(clip){
_this._onFinish(player);
_this._onClipFinish(player);
};
};
player.hiroLoaded = false;
} else {
if (player.params.isArtimediaFlag=="1" || this.CONST.isArtimediaFlag ) {
if (!player.video.isInvalid) {
conf.plugins.amta={
url:"http://mediadownload.ynet.co.il/fp3218/amta_plugin_20314.swf",
siteKey: "ynet",
category: window.dcPath ? window.dcPath : "0.noDcpathOnPage"
};
player.hiroLoaded = false;
conf.clip.onFinish=function(clip){
_this._onFinish(player);
_this._onClipFinish(player);
};
}
}
else {
conf.plugins.hiro={
url: this.CONST.FlowplayerHiroPluginSrc,
site_id: player.video.categoryId,
flavor: flavor,
AllowRegScreen: true,
zIndex: 2
};
if (!player.video.isInvalid) {
conf.plugins.hiro.onFinish = function(){
_this._onHiroAdComplete(player, {product : 'Post'});
_this._onFinish(player);
};
conf.plugins.hiro.onHiroAdStart = function(info){
_this._onHiroAdStart(player, info);
};
conf.plugins.hiro.onHiroAdComplete = function(info){
_this._onHiroAdComplete(player, info);
};
conf.clip.onFinish=function(){
if(player.hasDecoration){
_this._disableDecoration(player);
player.clipPlaying=false;
};
player.contentManager.fireEvent('onClipFinish');
_this._onClipFinish(player);
};
};
player.hiroLoaded = true;
}
};
if (!player.video.isInvalid && isCarambolaEnabled) {
conf.plugins.carambola = {
url: this.CONST.FlowplayerCarambolaPluginSrc,
urlClient: this.CONST.FlowplayerCarambolaPluginClientSrc,
fixStage: true,
debugMode: false,
showSoundtrackButton: false,
pid : this.CONST.FlowplayerCarambolaPublisherId,
sMovieIdentifier: player.video.fakeCarambolaSMovieIdentifier || player.video.relativePath,
useJs: 1,
popupJsFunc: 'CmmAppVideoApi_carambolaPopup_' + player.id,
pauseJsFunc: 'CmmAppVideoApi_carambolaPause_' + player.id,
signalActiveLayerJsFunc: 'CmmAppVideoApi_carambolaActiveSignal_' + player.id
};
var _player=player;
window['CmmAppVideoApi_carambolaPopup_' + player.id] = function(url,target) {
_this._carambolaPopup(_player,url,target);
};
window['CmmAppVideoApi_carambolaPause_' + player.id] = function() {
_this._carambolaPause(_player);
};
window['CmmAppVideoApi_carambolaActiveSignal_' + player.id] = function() {
_this._carambolaActiveSignal(_player);
};
};
return conf;
},
_addClipConf:function(player,conf){
var wUrl= window.location.href
conf.clip.url = player.video.path;
if ( player.video.substitutepath.search('/manifest.f4m') != -1 ) {
conf.clip.url = player.video.substitutepath
conf.plugins.akamai = { url: this.CONST.FlowplayerAkamaiPluginSrc_HDN2 };
conf.clip.provider = 'akamai';
conf.clip.type = 'video';
} else if (player.video.path.search('hls-video.ynet') != -1 ) {
conf.clip.url = player.video.iphonePath;
} else if (this._isHDN2Supported(player)) {
conf.plugins.akamai = { url: this.CONST.FlowplayerAkamaiPluginSrc_HDN2 };
conf.clip.provider = 'akamai';
conf.clip.type = 'video';
} else if (conf.clip.url.search('rtmp://') != -1) {
conf.clip.provider = 'rtmp';
conf.plugins.akamai = { url: this.CONST.FlowplayerAkamaiPluginSrc };
conf.plugins.rtmp = { url: this.CONST.FlowplayerRtmpPluginSrc };
} else {
conf.clip.provider = 'http';
};
if ( conf.clip.url.search('_ynetLogo_') != -1 ) {
this.CONST.disableLogo=1
}
if (player.video.origin) {
if ( player.video.origin.search('flv') != -1 ) {
conf.clip.url = player.video.cleanMajorpath } }
if (player.type == 'TopStoryWide') {
conf.clip.scaling = 'scale';
} else if(this.CONST.VideoWideFormatEnabled || player.type == 'hot' || player.type == 'stage'){
conf.clip.scaling = 'fit';
}
return conf;
},
_addLogoConf:function(player,conf){
if(!this.CONST.disableLogo && yq.inArray(player.type, [
"article"
,"videos"
,"article1024"
,"headline"
,"headlineVideos"
,"HomepagePlayer"
,"LightBoxArticlePlayer"
,"TopStory"
,"TopStoryWide"
,"TopStoryArticle"
,"galleries",
,"sixColVidXnet",
"articlePnaiPlus"
]) >= 0)
{
conf.logo = {
url: 'https://mediadownload.ynet.co.il/flowplayerlive/ynetlogo.png' ,
top: 15,
left: 15,
fullscreenOnly: false
};
};
return conf;
},
_addControlsConf:function(player,conf){
conf.plugins.controls = {
zIndex: 1
};
var _this = this;
if (this.CONST.isMotorolaDesign) {
conf.plugins.controls.url = this.CONST.FlowplayerControlsPluginSrc_Motorolla;
conf.plugins.controls.autoHide = 'fullscreen';
conf.plugins.controls.height = 55;
conf.plugins.controls.logoPopupUrl = this.CONST.FlowplayerMotorolaLogoPopupUrl;
conf.plugins.controls.logoPopupLink = this.CONST.FlowplayerMotorolaLogoPopupLink;
if(player.type=="headline") {
conf.plugins.controls.buttonsBackgroundWidth = 45;
conf.plugins.controls.pause = false;
conf.plugins.controls.play = false;
conf.plugins.controls.stop = false;
conf.plugins.controls.toggleplay = true;
conf.plugins.controls.spacing = { all: 2, fullscreen: 5, scrubber: 0, mute: -10, volume: 10, time: 0, stop: 25, toggleplay: 4};
conf.plugins.controls.volumeBackgroundWidth = 92;
};
conf.plugins.controls.onPopupClicked = function() {
_this._onMotorolaPopupClick(player);
};
conf.plugins.controls.onPopupDisplayed = function() {
_this._onMotorolaPopupDisplay(player);
};
} else {
conf.plugins.controls.url = this.CONST.FlowplayerControlsPluginSrc;
conf.plugins.controls.autoHide = 'fullscreen';
if(player.type=="headline") {
conf.plugins.controls.time=false;
} else if (yq.inArray(player.type, [
"TopStory"
,"TopStoryWide"
,"TopStoryArticle"
]) >= 0)
{
conf.plugins.controls.autoHide = true;
}
};
return conf;
},
_addPlaylistConf:function(player,conf){
var _this = this;
conf.playlist = [];
if (this._isHDN2Supported(player)) {
conf.clip = {
provider : 'akamai',
type : 'video'
};
};
var playlist = player.video.playlist;
if(playlist.length == 0){playlist.push(player.video);};
for(var i = 0; i < playlist.length; i++){
conf.playlist.push({
url:playlist[i].path,
autoPlay:(i>0),
onBegin:function(clip){_this._onClipStart(player,clip);},
onFinish:function(clip){_this._onFinish(player,clip);}
});
};
return conf;
},
_addAdvisionConf:function(player,conf){
var changedDcPath = '';
var changedDcTags = '';
var checkedDcContentID = '';
if(window.dcContentID) {
checkedDcContentID = parseInt(window.dcContentID) || '';
}
if(window.dcTags) {
changedDcTags = (window.dcTags).join(',');
if(typeof checkedDcContentID == 'number') {
changedDcTags = changedDcTags+',';
}
}
if(window.dcPath) {
changedDcPath = (window.dcPath).replace(/\./g, ',');
if(changedDcTags.length || typeof checkedDcContentID == 'number') {
changedDcPath = changedDcPath+',';
}
}
conf.plugins.amta = {
url: this.CONST.FlowplayerAdvisionPluginSrc,
siteKey: 'ynet',
keywords: changedDcPath+changedDcTags+checkedDcContentID
};
return conf;
},
_addStatisticsConf:function(player,conf){
conf.plugins.gatracker = {
url: this.CONST.FlowplayerAnalyticsPluginSrc,
// labels: {
// start: 'Start',
// play: 'Play',
// pause: 'Pause',
// resume: 'Resume',
// seek: 'Seek',
// stop: 'Stop',
// finish: 'Finish',
// mute: 'Mute',
// unmute: 'Unmute',
// fullscreen: 'Full Screen',
// fullscreenexit: 'Full Screen Exit'
// },
// trackingMode: 'AS3',
// googleId: this.CONST.FlowplayerAnalyticsPluginId
events: {
all: true
},
accountId: this.CONST.FlowplayerAnalyticsPluginId
};
return conf;
},
_addEventsConf:function(player,conf){
var self = this;
conf.clip.onCuepoint = new Array([0, 100], function(clip, cuepoint) {
if (cuepoint == 0 && player.params.autoStart === false && !player.getVar('dontPausePlayerOnCuepoint0')) {
player.setVar('dontPausePlayerOnCuepoint0', true);
player.pause();
} else {
self._onCuepoint(player, clip, cuepoint);
}
});
conf.clip.onBeforeBegin = function(clip){
self._onClipBeforeBegin(player, clip);
};
if (player.params.isArtimediaFlag=="1" || this.CONST.isArtimediaFlag ) {
conf.onVideoStart = function(clip) {self._onClipStart(player, clip);}
} else {
conf.clip.onStart = function(clip){
self._onClipStart(player, clip);
};
}
conf.onLoad = function(){self._onPlayerLoad(player); };
conf.onPause = function() {self._onPlayerPause(player);};
conf.onResume = function() {self._onPlayerResume(player);};
conf.onSeek = function() {self._onPlayerSeek(player);};
conf.onBeforeSeek = function() {self._onPlayerBeforeSeek(player);};
conf.onStop = function() {self._onPlayerStop(player);};
return conf;
},
_addAudioPluginsConf:function(player,conf){
if (this._isHDN2Supported(player)) {
conf.plugins.akamai = {
url : this.CONST.FlowplayerAkamaiPluginSrc_HDN2
};
} else {
conf.plugins.audio = {
url: this.CONST.FlowplayerAudioPluginSrc
};
}
return conf;
},
_initContent: function(player,conf){
var self = this;
if(!player.contentManager){
player.contentManager = new this.ContentManager(player);
var splash = player.contentManager.getContent('Splash');
};
return player.contentManager.getHtml();
},
_getConf:function(player){
var _this=this;
var conf = {
key: this.CONST.FlowplayerAppKey,
debug: false,
canvas: {
backgroundColor: '#000000',
backgroundGradient: 'none'
},
clip: {
autoPlay: true,
bufferLength: 5,
autoBuffering: true,
eventCategory: window.dcPath || 'undefined'
},
plugins: {}
};
conf.play={display:'none'};
// conf=this._addAdsConf(player,conf);
conf=this._addClipConf(player,conf);
conf=this._addControlsConf(player,conf);
if (!player.video.isInvalid) {
conf=this._addEventsConf(player,conf);
if(this.CONST.FlowplayerAdvisionPluginIsActive==1) {
conf=this._addAdvisionConf(player,conf);
}
conf=this._addStatisticsConf(player,conf);
conf=this._addLogoConf(player,conf);
if(!player.params.dontShowDecoration){
conf=this._addDecorationConf(player,conf);
}
};
return conf;
},
_getAudioConf:function(player){
var _this=this;
var conf = {
debug:false,
key: this.CONST.FlowplayerAppKey,
plugins: {
controls: {
url: this.CONST.FlowplayerControlsPluginSrc_Audio,
autoHide: false,
fullscreen:false,
play:false,
volume:false,
time:true,
mute:false,
background: 'url(/images/audio/audioPlayerFlashMiddle.jpg)',
height:this.CONST.AudioPlayerDimensions[player.type].height,
scrubberHeightRatio:0.6,
scrubberBarHeightRatio:0.55,
volumeSliderHeightRatio:0.4,
volumeBarHeightRatio:0.2,
tooltips:{scrubber:false,volume:false},
backgroundColor: 'transparent',
backgroundGradient: 'none',
buttonColor: '#ffffff',
progressColor: '#c11315',
progressGradient: [0.6, 0.2, 0],
sliderColor: '#ffffff',
volumeColor: '#009cca',
timeColor: '#ffffff',
durationColor: '#ffffff'
}
},
onLoad: function() {
this.unmute();
yq('#audio_player_'+player.id+' .fp_audio_player').animate({
opacity: 1
}, 700);
yq('#audio_player_'+player.id+' .audio_name').html(player.video.name);
if (player.audioPlayerController) {
player.audioPlayerController.onPlayerLoad();
};
},
onFinish:function(){
player.flowplayer.getPlugin("play").hide();
yq('#audio_player_'+player.id+' .audioplayer_button.audioplayer_pause').hide().siblings().show();
}
};
conf=this._addAudioPluginsConf(player,conf);
conf=this._addStatisticsConf(player,conf);
conf=this._addPlaylistConf(player,conf);
return conf;
},
_loadPlayer:function(player, is_lightbox){
var FlowPlayerSixIframeFlg = '';
if (parseInt(this.CONST.FlowPlayer6iframeFlg)) FlowPlayerSixIframeFlg = 1 ;
if (yq.browser.msie && yq.browser.version <= 8) { FlowPlayerSixIframeFlg = 0}
if ( FlowPlayerSixIframeFlg && player.type != 'VideoChannel' ) {
this._loadFlowplayer6Ifrm(player, is_lightbox)
return;
};
if (this._invalid(player.params, 'loadPlayer: missing params')
|| this._invalid(player.params.destId, 'loadPlayer: missing params.destId')
|| this._invalid(document.getElementById(player.params.destId), 'loadPlayer: missing container div ' + player.params.destId)) {
return;
};
var video=this._getVideo(player.videoId);
if(!video) {
this._loadPlayerAjax(player);
return;
};
player.video=video;
if (video.geoType == 'local' && !video.gotSecuredData) {
this._getSecuredData(player);
return;
}
if (this._invalid(video, 'loadPlayer: video not found - must call CmmAppVideoApi.addVideo with the video details')
|| this._invalid(video.path, 'loadPlayer: missing path for videoId='+player.videoId)
|| (!this._isAudio(player) && this._invalid(video.categoryId, 'loadPlayer: missing categoryId for videoId='+player.videoId))) {
return;
};
var isHtmlPlayer = this.displayHtmlPlayer();
if ( FlowPlayerSixIframeFlg && player.type == 'VideoChannel' ) {
this._loadFlowplayer6Ifrm(player, is_lightbox)
return;
};
if(!isHtmlPlayer ){
this._initContainer(player);
};
if (this._isAudio(player)){
player.audioPlayerController = new YnetAudioPlayer.PlayerController(yq("#"+player.params.destId));
};
if (isHtmlPlayer){
this._loadHtmlPlayer(player);
} else {
var LightBoxFlg = '';
if (this.CONST.FlowPlayer6iframeLightBoxFlg) LightBoxFlg = 1 ;
if ( player.type == 'HomepagePlayer' && LightBoxFlg ) {
this._loadFlowplayer6Ifrm(player)
} else this._loadFlashPlayer(player) //this._loadFlashPlayer(player); this._loadFlowplayer6Ifrm(player, is_lightbox)
};
},
_getSecuredData : function(player) {
var self = this;
this._doSecuredDataAjax(player, function(player, data){
player.video.gotSecuredData = true;
if (data && data.length) {
player.video.isInvalid = false;
player.video.path = data[0];
player.video.htmlPath = data[1];
player.video.relativePath = data[2];
} else {
player.video.isInvalid = true;
var errorImageSrc = '';
if (self.CONST.VideoRestrictedContentImageSrc) {
errorImageSrc = self.CONST.VideoRestrictedContentImageSrc.replace('PLAYERTYPE', player.type);
}
player.video.path = errorImageSrc;
player.video.iphonePath = errorImageSrc;
};
self._loadPlayer(player);
});
},
_doSecuredDataAjax : function(player, callback) {
var self = this;
var url = window.CmmAppVideoApi.CONST.SecuredDataJsonUrl;
url = url.replace('videoId',player.videoId);
paramsIndex = document.location.href.indexOf('?');
if (paramsIndex != -1) {
url += document.location.href.slice(paramsIndex);
};
this._ajax.go(url,function(res){
var dataArray = null;
if (res && res.responseText) {
self._log('Secured data response text', res.responseText);
var filteredStringMatch = res.responseText.match(/#(.*)#/);
if (filteredStringMatch && filteredStringMatch[1]) {
var arrayString = filteredStringMatch[1];
dataArray = arrayString.split('#');
};
}
self._log('Secured data array', dataArray);
callback(player, dataArray);
});
},
_loadFlashPlayer:function(player){
var self = this;
var conf={};
var videoId = player.videoId;
var articleId = player.params.artId;
var catId = window.dcPath;
var sSitePrefix = this.CONST.site;
if(this._isAudio(player)) {
conf=this._getAudioConf(player);
} else {
conf=this._getConf(player);
};
this._log('Flowplayer configuration object:', conf);
player.flowplayer=flowplayer(document.getElementById('yntfpcontainer'+player.id),{
src:this.CONST.FlowplayerPlayerSrc,
wmode:'opaque',
allowScriptAccess:'always',
version: [10, 0],
onFail: function(){self._onFlashFail(player);}
},conf);
/* set volume */
//setTimeout(function(){
// player.flowplayer.setVolume(50);
// }, 1500);
if (player.params.isVideoViewreportON=="1" || this.CONST.isVideoViewreportON) {
yq.ajax({
url:" http://" + this.CONST.VideoViewreportUrlPhpDomaim + "/video_view_report.php?articleId="+articleId+"&catId="+catId+"&videoId="+videoId+"&ms="+new Date().getTime()
// old triger- url:"/hot/Ext/Comp/VideoViewReport/CdaVideoViewReport/0,20562,,00.html?articleId="+articleId+"&catId="+catId+"&videoId="+videoId+"&ms="+new Date().getTime()
});
}
},
_checkReportedPopularity:function(player, clipDuration) {
if (!player.video.reporetedPopularity) {
this._reportPopularity(player, clipDuration);
player.video.reporetedPopularity = true;
}
},
_reportPopularity:function(player, clipDuration) {
var url=this.CONST.PopularityReportStatisticsServer;
url+='?content='+player.video.id;
url+='&type=1';
url+='&time='+Math.round(clipDuration);
url+='&random='+((new Date()).getTime());
(document.createElement('img')).src=url;
},
_loadFlowplayer6Ifrm:function(player, is_lightbox){
player.ContentStartedFlg = 0;
var _this=this;
var artclId= ""
var container = document.getElementById(player.params.destId);
var videoId = player.videoId;
var is_Vast = _this.CONST.is_Vast;
var site_vast = _this.CONST.site_vast;
var tmpcrlstr= videoId + artclId
if (is_Vast == "/vast") {
videoURL = "/video/vast/0,20658,tmpId,00.html".replace(/tmpId/g, tmpcrlstr);
} else {
videoURL = "/video/0,20658,tmpId,00.html".replace(/tmpId/g, tmpcrlstr);
}
var PlrType = player.type ? player.type : "" ;
var playerId = player.id ? player.id : "" ;
var mrgn = PlrType.indexOf('VideoChannel') > -1 ? " margin-top: 11.76%;" : ""
//if (PlrType == 'hot') { yq('#vidObjVideo>iframe').css({'top':'-10px','position':'relative'}) }
//document.querySelector('#vidObjVideo>iframe').style.height='378px';
//if (_this.CONST.site=='mekomy') { yq('.sharingFooter').css({'top':'-10px','position':'relative'}) }
var plrTypArr= ['hot','HomepagePlayer','LightBoxArticlePlayer','VideoChannel']
plrTypArr = plrTypArr.toString();
var autoPly = plrTypArr.indexOf(PlrType) > -1 ? true : "" ;
window.IfrmLCntrlVidFin = function(){
if ( (plrTypArr.indexOf(PlrType) > -1 ) && (typeof (CmmAppVideoApi._players[playerId].params.onFinish) == 'function' ) ) CmmAppVideoApi._players[playerId].params.onFinish();
if (typeof(window.pageRefreshEnable)=='function'){
window.pageRefreshEnable();
}
}
window.ContentStarted= function(){ player.ContentStartedFlg = 1; }
if (is_lightbox || PlrType.indexOf('VideoChannel') > -1 || player.type == "hot") {
var obj = {
callbacks: {
"onLoad": "pageRefreshDisable",
"onFinish": "IfrmLCntrlVidFin",
"onContentStart":"ContentStarted"
} , "autoplay":autoPly,
"site_lang":site_vast,
"is_lightbox":"true"
}
} else {
var obj = {
callbacks: {
"onLoad": "pageRefreshDisable",
"onFinish": "IfrmLCntrlVidFin",
"onContentStart":"ContentStarted"
} , "autoplay":autoPly,
"site_lang":site_vast
}
}
if ( PlrType.indexOf('VideoChannel') > -1) { var objUrl= "');
var containerHtml = '
';
if (isAudio){
containerHtml = '
';
html.push(this._getAudioPlayerHtml(player,containerHtml));
} else {
html.push('
');
html.push(containerHtml);
html.push(objUrl+'
')
html.push(this._initDecoration(player));
html.push(this._initContent(player));
html.push('');
};
html.push('
');
document.getElementById(player.params.destId).innerHTML=html.join('');
player.containerInitialized=true;
yq('#yntfpcontainer'+player.id).parent().hover(
function(){
player.mouseInPlayer = true;
if(player.ContentStartedFlg){
player.contentManager.fireEvent('onPlayerMouseOver');
//if(player){
_this._showDecoration(player);
//};
};
},
function(event){
player.mouseInPlayer = false;
if(player.ContentStartedFlg ){
player.contentManager.fireEvent('onPlayerMouseOut');
//if(player){
_this._hideDecoration(player);
//};
};
}
);
} else {
document.getElementById('yntfpcontainer'+player.id).style.display='block';
if (!isAudio){
document.getElementById('fpPostScreen'+player.id).style.display='none';
if(player.hasDecoration){
document.getElementById('fpDecorationContent'+player.id).innerHTML=this._getDecorationHtml(player);
};
};
};
if (!isAudio && typeof player.contentManager.pool != 'undefined'){
player.contentManager.pool[0].init()
player.contentManager.pool[0].update()
};
},
_loadHtmlPlayer:function(player){
var container = document.getElementById(player.params.destId);
var video=this._getVideo(player.videoId);
if (container && video){
var html = "";
if(this._isAudio(player)) {
var audioPlayer='';
audioPlayer += "