Votre question

{RESOLU} Créer son player, avec des spots publicitaires avant la lecture de la vidéo

Tags :
  • actionscript
  • Flash
  • player vidéo
  • publicité
  • Programmation
Dernière réponse : dans Programmation
10 Avril 2012 02:21:21

Bonjour à tous !

Pratiquement tout est dans le titre, je souhaiterai savoir comment avoir/créer son propre player vidéo, dans lequel on pourrai ajouter la lecture d'un spot publicitaire avant la lecture de la vidéo (comme sur youtube ou plus précisément canal + ).

Merci d'avance ! Je reste à l'écoute !!

Autres pages sur : resolu creer player spots publicitaires lecture video

a c 232 L Programmation
10 Avril 2012 09:21:07

Salut,

Il te faut des connaissances en Flash pour te créer ton player de vidéos FLV.
Et tu pourras ajouter la lecture d'un spot publicitaire avant.

Il existe peut-être des players tout fait qui supportent les pub avant.
10 Avril 2012 09:37:22

Bonjour et merci pour votre réponse...

Ce genre de player est difficile à coder ? Je compte l'insérer sous prestashop, il faudrait donc pouvoir avoir une gestion "assez complète" des spots publicitaires.
Je ne connais rien en flash :/ 

J'ai récupéré ça du site de Canal Plus :

  1. _cptlnttop=self;function _cptlntStart(){try{window.lntCoeffs={15:{792:{39780:1422,24306:1571,34821:1496,32314:1575,43026:1654,25982:1654,43480:1571,24345:1737,25679:1422,24348:1737,51113:1496,30554:1575,39129:0,40608:1737,24346:1496,30636:1422,24304:1654,24339:1737,50895:1575,30870:1737,24322:1654,39508:1496,28022:1654,26757:1422,26099:1737,32022:1654,24342:1654,30863:1422,30871:1737,25980:1654,44612:1654,24344:0,26100:1575,26514:1654,38978:1422,26098:1575,30869:1737,24343:1737},809:{90730:1571,51850:1103,52574:1000,91155:0,65323:0,43263:1000,39507:1195,27600:1425,44615:1496,25680:1350,27695:1103,23906:1824,65329:1140,65460:1050,43964:1050,43480:1417,24330:1135,62823:1000,40301:1425,51113:1200,65322:1200,39129:0,26077:1135,30455:1200,91451:0,24314:1135,24324:1654,26088:1000,24297:1571,65453:1575,24300:1158,30794:0,24298:0,44609:1496,44606:1654,30863:1000,26834:1000,49954:0,24302:0,30636:1158,33767:1050,81791:1425,35248:1050,39127:1737,26084:1138,24348:1000,30793:1496,26078:1195,44611:1140,95864:1000,24333:0,26079:1050,24303:1654,26080:1135}},18:{809:{83580:0,83586:0,43964:1000,83591:0,90730:1000,24330:1000,23906:0,43263:1000,24348:1000,81791:1000,26834:1000,65329:1000,49954:0,44606:0,39507:1000,65460:1000,35248:1000,83588:1000,95864:1000,91155:0,24333:1000,24303:0,52574:0,24297:0,30636:1000,83585:0,26079:1000,24314:1000,65323:1000,27600:1000,40301:1000,90045:1000,43480:1000,25680:1000,51850:1000,44609:0,24300:0,39129:0,26078:1000,30863:1000,83582:0,62823:1000,26077:1000,26080:1000,33767:1000,26088:1000,44611:1000,65453:0,83583:0,27695:1000,91451:0,24298:0,26084:1000,83589:1000}},20:{809:{39129:0,30863:1000,83582:1575,83588:1425,24348:1000,44606:1575,83586:1575,44611:1425,83589:1425,23906:0,40301:1425,26077:1286,65460:1158,65329:1286,35248:1350,43263:1350,33767:1286,30636:1158,27695:1158,26084:1286,24297:1650,24330:1354,26078:1354,24333:1354,91155:0,205536:0,25680:1103,24300:1000}},21:{809:{205536:0}},25:{792:{38978:1286,40608:0,49954:1575,39508:0,51113:1422,26099:1737,43480:1654,39780:0,30869:1737,24339:1824,24343:1575,32022:1737,43519:1654,25679:1222,30554:1571,43026:1737,27765:0,30636:1350,24347:1571,30870:1824,25982:0,42931:0,26100:1737,25973:1575,44612:0,28022:1737,24304:1824,29855:1737,24306:1422,30863:1571,26098:1737,24348:1824,30871:1575,26757:1222,24342:1824,24344:1824,24337:1824,26514:1654,24346:1824},809:{65308:1050,81789:0,40301:1137,83580:1575,24303:0,30455:1137,24299:0,81791:1496,24324:1000,83590:0,65321:1323,24301:1824,65453:1493,30794:0,83586:1575,44611:1026,30793:1571,83589:1425,62823:1350,83591:1575,39129:1000,26653:1824,24302:0,83583:1575,91451:0,24298:0,65322:1422,44615:1194,24348:0,44606:0,39127:0,51113:1137,26834:0,44608:1737,49954:0,30863:1000,83582:1575,65323:1137,44609:1254,27600:1496,83588:1425,65329:1137,65460:1251,25680:1347,26084:1134,27695:1347,24297:1103,205536:0,33767:1216,91155:0,35248:1194,39507:1050,43263:1528,43480:1568,90730:1650,52574:0,26080:1251,26079:1251,24314:1216,43964:1251,142710:0,23906:0,24330:1251,24333:1194,26077:1251,30636:1158,26078:1251,51850:1314,24300:1000}},29:{809:{24298:0,44606:0,83583:0,24297:0,44609:0,24330:1000,24301:0,27600:1000,83586:0,83591:0,26078:1000,90730:1000,83580:0,40301:1000,26084:1000,83589:1000,24300:0,51850:1000,81791:0,23906:0,44611:1000,24302:0,83582:0,83588:1000,83585:0}},30:{809:{25680:1103,30636:1158,43480:1571,91155:0,40301:1425,30863:1000,49954:0,83589:1000,44611:1000,83586:0,24324:1000,44606:0,93449:1000,83588:1000,83582:1000,24301:0,90730:1050,81791:0,23906:1824,24300:1496,24314:1286,24330:1422,26077:1350,26078:1422,26079:1350,26080:1222,26084:1286,65460:1350,142710:0,43964:1286,39507:1422,33767:1422,27695:1103}},35:{809:{26078:1000,23906:0,30636:1000,40301:1000}}}}catch(E){}var b=true;var r=false;var c;var x=(function(){try{return(document.location.protocol=="https:")}catch(a){return false}})();function G(){try{return document.location!=window.parent.location}catch(a){return true}}function A(a){try{if(a.document.body.tagName=="BODY"){return true}else{return false}}catch(i){return false}}function q(L){try{var i=L.document.location.href;return true}catch(p){return false}}function y(){var a=[];var e=window;a.push(_cptlnttop);_cptlnttop=e;window.wlnt_ft=0;if(G()){while(e!=e.parent){e=e.parent;if(q(e)){a.push(e);_cptlnttop=e;if(A(e)){window.wlnt_ft=2}else{window.wlnt_ft=1}}else{window.wlnt_ft=3}}}return a}function d(){var a=document.getElementsByTagName("script");for(var L=a.length-1;L>=0;L--){var N=a[L];var e=N.getAttribute("id")||"";if((N.src.indexOf("http://js.alenty.com/canalplus/l/")==0)&&(e.indexOf("_cptlnt_")<0)){var p=new RegExp("^[^#]+#?","g");var M=N.src.replace(p,"");if(M=="lnt_injection"){N.setAttribute("id","_cptlnt_injected");return true}else{c=N}break}}return false}var n=y();if(n.length>1){try{if(!_cptlnttop._cptlnt){_cptlnttop.thisIsAnInjection=true;var E=_cptlnttop.document.createElement("SCRIPT");E.src=(x?"https://dtf4bhqgzyfqg.cloudfront.net/canalplus/":"http://js.alenty.com/canalplus/")+"l/adtrk4flash.js#lnt_injection";E.setAttribute("type","text/javascript");try{_cptlnttop.document.getElementsByTagName("head")[0].appendChild(E)}catch(K){_cptlnttop.document.body.insertBefore(E,_cptlnttop.document.body.firstChild)}if(!_cptlnttop._cptlnt_injectedScripts){_cptlnttop._cptlnt_injectedScripts=[]}_cptlnttop._cptlnt_injectedScripts.push(E)}}catch(E){_cptlnttop=self;r=true;window.wlnt_ft=3}}else{if(d()){r=true;b=false}if(!_cptlnttop._cptlnt){r=true}}function t(L){if(L){return"https://ats.alenty.com/"}var N="http://";var O=[{h:"at01",w:5},{h:"at02",w:5},{h:"at03",w:5},{h:"at04",w:5},{h:"at05",w:5},{h:"at06",w:5},{h:"at07",w:5},{h:"at08",w:5}];var a=0;for(var p=0;p<O.length;p++){a+=O[p].w;O[p].threshold=a}var M=Math.random()*a;var p=0;var e;do{e=O[p++]}while(e.threshold<=M&&p<O.length);return N+e.h+".alenty.com/"}var J=new Date().getTime();var m=t(x);var I=(function(){var a=navigator.userAgent.toLowerCase();return a.indexOf("apple")>-1&&a.indexOf("chrome")==-1&&a.indexOf("webclip")==-1&&a.indexOf("android")==-1})();var j={baseJsUrl:(x?"https://dtf4bhqgzyfqg.cloudfront.net/canalplus/":"http://js.alenty.com/canalplus/"),trackingURL:m+"trk/",trackingCachedURL:m+(I?"ftrkc":"trkc")+"/",cdURL:m+"cd/"+J+"?u=",skinsPath:"http://js.alenty.com/canalplus/s/",defaultCustomerID:"canalplus",UserAgentDetailed:"",trkDelay:10000,trkInit:false,idSession:J,trkLast:J,trkProtocolRevision:28856,markerIdDiscriminant:1,rootPanel:""};var s;if(!_cptlnttop._cptlnt){_cptlnttop._cptlnt=j;if(_cptlnttop._cptlnt_injectedScripts&&_cptlnttop._cptlnt_injectedScripts.length>0){_cptlnttop._cptlnt.injectedScripts=_cptlnttop._cptlnt_injectedScripts;_cptlnttop._cptlnt_injectedScripts=undefined}_cptlnttop._cptlnt.fixedURLPart="?pr="+_cptlnttop._cptlnt.trkProtocolRevision+"&si=canalplus&ids="+_cptlnttop._cptlnt.idSession}s=_cptlnttop._cptlnt;if(b){try{s.alenty_ad_idelement=s.markerIdDiscriminant+"_"+new Date().getTime();s.rootPanel="_cptlnt_"+s.alenty_ad_idelement;s.getVarIfExists=function(p,e,a){if(!a){a=window}var i=a[p]||"";if(e&&a[p]){a[p]=""}return escape(i)};s.scriptParameters={sas_pageid:{readOnly:true,shortName:"sas_p",jsVarPrefix:""},sas_formatid:{readOnly:true,shortName:"sas_f",jsVarPrefix:""},sas_netid:{readOnly:true,shortName:"sas_n",jsVarPrefix:"alenty_"},OAS_sitepage:{readOnly:true,shortName:"oas_p",jsVarPrefix:""},customer_id:{readOnly:true,shortName:"cuid",jsVarPrefix:"alenty_",excludeFromAdParams:true},tracking_type:{shortName:"tt",excludeFromAdParams:true},support_type:{shortName:"st",excludeFromAdParams:true},wallpaper:{shortName:"wpp",jsVarPrefix:"alenty_",excludeFromAdParams:true},targetsite:{shortName:"tgs",jsVarPrefix:"alenty_",excludeFromAdParams:true},loadurl:{shortName:"loadurl",jsVarPrefix:"alenty_",excludeFromAdParams:true},nourl:{shortName:"nourl",jsVarPrefix:"alenty_",excludeFromAdParams:true},forceurl:{shortName:"forceurl",jsVarPrefix:"alenty_",excludeFromAdParams:true},url:{shortName:"url",jsVarPrefix:"alenty_",excludeFromAdParams:true},insertion_id:{shortName:"si"},script:{shortName:"sc"},external_id:{shortName:"exi"},sas_tag_id:{shortName:"sas_ei"},at_bnid:{shortName:"at_bi"},at_i:{shortName:"at_i"},at_divi:{shortName:"at_divi"},at_obji:{shortName:"at_obji"},at_ifi:{shortName:"at_ifi"},advertiser:{shortName:"a"},refresh_time:{shortName:"rt"},site:{shortName:"s"},page:{readOnly:true,shortName:"pg"},sitepage:{shortName:"sp"},placement:{shortName:"p"},format:{readOnly:true,shortName:"f"},creative:{shortName:"c"},image_id:{shortName:"ai"},campaign:{shortName:"cp"},dimension:{shortName:"d"},visibility_time:{shortName:"vt"},tag_id:{shortName:"ei",excludeFromAdParams:true},questionId:{shortName:"qi",jsVarPrefix:"alenty_"},repId:{shortName:"ri",jsVarPrefix:"alenty_"},surveyId:{shortName:"sui",jsVarPrefix:"alenty_"},spot_duration:{shortName:"sd"}};s.alenty_ad_predefined_objects_template={NODE_ID:[],NODE_ID_CHILDREN:[],NODE:[],NODE_CHILDREN:[]};s.clonePredefinedObject=function(i){var a={};for(var e in s.alenty_ad_predefined_objects_template){if(!i[e]){a[e]=[]}else{if(i[e] instanceof Array){a[e]=i[e].slice(0)}else{a[e]=[i[e]]}}}return a};function w(Q,R){R.setAttribute("id",s.rootPanel);var N=new RegExp("^[^#]+#?","g");var M=R.src.replace(N,"");if(M&&M.length>0){var O=new RegExp("\\+","g");var ab=M.split(new RegExp("[;&]"));var Y=[];var p=[];s.extImgcd=[];for(var U=0;U<ab.length;U++){var S=ab[U].split("=");if(!S||S.length<1||S.length>2){continue}if(S[1]==undefined){S[1]="1"}var Z=unescape(S[0]);var aa=unescape(S[1]).replace(O," ");if(Z=="imgu"){if(aa.indexOf("[ALENTY_UI]")>0){s.extImgcd.push(aa)}else{Y.push(aa)}}else{if(Z=="jsu"){p.push(aa)}}var L=Z;if(Z in s.scriptParameters){var T=s.scriptParameters[Z].jsVarPrefix;if(!T){T="alenty_ad_"}L=T+L;Q[L]=aa}}s.fillExtParams=function(ac){try{for(var i in s.scriptParameters){var ad=s.scriptParameters[i].jsVarPrefix;if(!ad){ad="alenty_ad_"}var a=ad+i;ac=ac.replace("["+a+"]",Q[a])}ac=ac.replace("[alenty_timestamp]",s.idSession)}catch(ae){}return ac};for(var U=0;U<Y.length;U++){try{var W=new Image(1,1);W.src=s.fillExtParams(decodeURIComponent(Y[U]))}catch(V){}}for(var U=0;U<p.length;U++){try{var P=document.createElement("script");P.src=s.fillExtParams(decodeURIComponent(p[U]));var X=document.getElementsByTagName("script");var W=X[X.length-1];W.parentNode.insertBefore(P,W)}catch(V){}}}else{var N=new RegExp("^[^\\?]+\\??","g");var M=R.src.replace(N,"");if(M&&M.length>0){var O=new RegExp("\\+","g");var ab=M.split(new RegExp("[;&]"));for(var U=0;U<ab.length;U++){var S=ab[U].split("=");if(!S||S.length<1||S.length>2){continue}if(S[1]==undefined){S[1]="1"}var Z=unescape(S[0]);var aa=unescape(S[1]).replace(O," ");Q[Z]=aa}}}}s.parseScriptParameters=function(p){if(!p){p=window}if(!!c){w(p,c)}else{var a=document.getElementsByTagName("script");for(var L=a.length-1;L>=0;L--){var M=a[L];var e=M.getAttribute("id")||"";if((M.src.indexOf(s.baseJsUrl+"l/")==0)&&(e.indexOf("_cptlnt_")<0)){c=M;w(p,c);break}}}};s.fillPredefinedObjects=function(e){if(!!e.alenty_ad_predefined_objects){for(var M in s.alenty_ad_predefined_objects_template){if(!e.alenty_ad_predefined_objects[M]){e.alenty_ad_predefined_objects[M]=[]}}}else{e.alenty_ad_predefined_objects=s.clonePredefinedObject(s.alenty_ad_predefined_objects_template)}if(!!e.alenty_ad_tag_id){e.alenty_ad_predefined_objects.NODE_ID=e.alenty_ad_predefined_objects.NODE_ID.concat(e.alenty_ad_tag_id);e.alenty_ad_tag_id=""}if(s.getVarIfExists("alenty_wallpaper",true,e)!=""){var a=s.parametersToString(window,"|",false);var L=(!window.alenty_customer_id)?s.defaultCustomerID:window.alenty_customer_id;if(s.wppexists){for(var p=0;p<s.wppexists.length;p++){if(L+a==s.wppexists[p]){throw new Error("wppx2")}}}else{s.wppexists=new Array()}s.wppexists.push(L+a);e.alenty_ad_support_type="wpp";e.alenty_ad_tracking_type="page"}if(s.getVarIfExists("alenty_targetsite",true,e)!=""){e.alenty_ad_support_type="tgs";e.alenty_ad_tracking_type="page"}var N=s.getVarIfExists("alenty_ad_tracking_type",false,e);if(N=="page"){e.alenty_ad_predefined_objects={NODE_ID:["wpp_Marker"]}}else{if(!(N=="video"||N=="pixel")){e.alenty_ad_tracking_type=undefined}}s.url=e.alenty_url;if(e.alenty_url!=undefined){e.alenty_url=undefined}s.nourl=s.getVarIfExists("alenty_nourl",true,e);s.forceurl=s.getVarIfExists("alenty_forceurl",true,e)};s.parametersToString=function(a,L,e){var P="";var i="";for(var O in s.scriptParameters){var p=s.scriptParameters[O];if(!p.excludeFromAdParams){var M=(!!p.jsVarPrefix?p.jsVarPrefix:"alenty_ad_")+O;var N=e?!p.readOnly:false;i=s.getVarIfExists(M,N,a);if(i!=""){P+=L+p.shortName+"="+i}}}return P};s.setUrlAdObject=function(a){if(!s.adslist){s.adslist=new Array()}s.adslist.push(a);if(!s.adsUrlEnd){s.adsUrlEnd="";s.adsToFlushNumber=1}else{s.adsToFlushNumber++}s.adsUrlEnd+="&i"+s.adsToFlushNumber+"="+a.baseId+a.infoAd+"&cu"+s.adsToFlushNumber+"="+a.cuid;if(window.wlnt_ft!=0){s.adsUrlEnd+="&ft"+s.adsToFlushNumber+"="+window.wlnt_ft}if(a.trackingType!=undefined){s.adsUrlEnd+="&tt"+s.adsToFlushNumber+"="+a.trackingType}if(a.supportType!=undefined){s.adsUrlEnd+="&st"+s.adsToFlushNumber+"="+a.supportType}if(s.trkStart){s.trkStart()}};s.adGetUrl=function(e){if(!s.adslist||s.adslist.length<=0||!s.adsUrlEnd){return""}var a=s.adsUrlEnd;if(s.adsToFlushNumber>1){a+="&n="+s.adsToFlushNumber}if(window.alenty_loadurl){a+="&loadurl=1"}window.alenty_loadurl=undefined;s.adsUrlEnd="";return a};s.addAdObject=function(){s.setUrlAdObject(s.getAdObject())};s.createFlashTrackedObject=function(Y,p,af,N,T,O,P,aa,M,Q,a,L,Z,R,U,W,V,S,X,ae){window.alenty_ad_tracking_type="video";var ac={w:n,t:"flash",cuid:!T?s.defaultCustomerID:T,clip:p,objects:{FLASH_API:[Y]},c:new Date().getTime(),marker:s.markerIdDiscriminant,trackingType:window.alenty_ad_tracking_type,playerKey:af,apiVersion:N,sce:c};s.markerIdDiscriminant++;var i={alenty_customer_id:T,alenty_ad_advertiser:O,alenty_ad_campaign:P,alenty_ad_site:aa,alenty_ad_page:M,alenty_ad_sitepage:Q,alenty_ad_placement:a,alenty_ad_format:L,alenty_ad_creative:Z,alenty_ad_image_id:R,alenty_ad_dimension:U,alenty_ad_insertion_id:W,alenty_ad_script:V,alenty_ad_external_id:S,sas_pageid:X,sas_formatid:ae};if(!!af){ac.baseId=af+"_"+N+"_"+ac.marker+"_"+ac.c}else{ac.baseId=Y+ac.marker+"_"+ac.c}ac.infoAd=s.parametersToString(i,"|",true);s.setUrlAdObject(ac);window.alenty_ad_tracking_type=undefined;if(typeof s.wakeUp=="function"){try{s.wakeUp()}catch(ab){}}};s.createErrorTrackedObject=function(i,e){var a={t:"error",cuid:(!window.alenty_customer_id)?s.defaultCustomerID:window.alenty_customer_id,baseId:e,infoAd:"|sc=ERR_CREA|cp=ERR_CAMP|a=ERR_ADVR|p=ERR_PLAC"};s.setUrlAdObject(a)};s.fireSpecialEvents=function(e,a){if(a=="player_clip_invalid"){s.createErrorTrackedObject(e,a);return true}if(a=="player_ad_block"){s.createErrorTrackedObject(e,a);return true}return false};window.lntFlashAPI={createFlashTrackedObject4Smart:function(e,O,N,Q,L,M,S,P,a,p,i,R){s.createFlashTrackedObject(e,O,"canal",0,N,Q,L,null,R,null,p,null,null,null,a,M,S,P,p,i)},notifyClipEvent:function(a,i,p){try{s.clipc[a](i,p)}catch(M){var L={clipUID:a,eventCode:i,eventDate:(i=="clip_duration"?p:new Date().getTime())};window.lntFlashCache.notifyClipEvent.push(L)}},notifyFlashEvent:function(L,p){if(s.fireSpecialEvents(L,p)){return}try{for(var a=0;a<s.playr[L].length;a++){s.playr[L][a](p)}}catch(N){var M={flashObjectDomID:L,eventCode:p,eventDate:new Date().getTime()};window.lntFlashCache.notifyFlashEvent.push(M)}}};if(!!window.lntFlashCache){try{while(window.lntFlashCache.createFlashTrackedObject4Smart.length>0){var H=window.lntFlashCache.createFlashTrackedObject4Smart.shift();s.createFlashTrackedObject(H.flashObjectDomID,H.clipUID,"canal",0,H.customerID,H.advertiserID,H.campaignID,null,H.contentKeyword,null,H.smart_pageID,null,null,null,H.dimensions,H.insertionID,H.creativeID,H.externalID,H.smart_pageID,H.smart_formatID)}}catch(E){}}}catch(E){if(E.message=="wppx2"){return}var z=0;if(s.adslist){z=s.adslist.length}if(!s.adsUrlEnd){s.adsUrlEnd=""}s.adsUrlEnd+="&er=100|1";if(z==0){var F={baseId:"error_100",infoAd:"",cuid:(!window.alenty_customer_id)?s.defaultCustomerID:window.alenty_customer_id};s.setUrlAdObject(F)}}if(!!window.lnt_hk){try{window.lnt_hk(s)}catch(E){if(!window.tp_l){window.tp_l=[]}window.tp_l.push(E)}}}if(r){function v(){var a;if(s.url==undefined){if(s.forceurl==undefined||s.forceurl!=""||s.nourl==undefined||s.nourl==""){a="&l="+s.location+(s.ref==""?"":"&r="+s.ref)}else{a=""}}else{a="&url";if(s.url){a+="&l="+s.url}}return a}var k;try{k=_cptlnttop.document.referrer}catch(E){k=document.referrer}s.ref=escape(k);if(window.wlnt_ft==2||window.wlnt_ft==3){if(k!=""){s.location=escape(k);s.ref=""}}else{var h=_cptlnttop.document.location.href;var u=h.indexOf("#");if(u!=-1){h=h.substr(0,u)}s.location=escape(h)}s.trkStart=function(){if(!s.adGetUrl){return}var e=new Date().getTime();var p=0;if(!s.gwtstarted){p=Math.round((e-s.trkLast)/100)/10}var a=s.adGetUrl(p);if(a==""){return}var i=(s.trkInit?s.trackingCachedURL:s.trackingURL)+s.trkLast+s.fixedURLPart;i+=v();i+="&sw="+screen.width+"&sh="+screen.height;if(p>0){i+="&d="+p}i+=a;s.adsToFlushNumber=0;s.sendTrackingData(i,!s.trkInit);s.trkInit=true};s.firstTrkRequestWasSent=false;function D(){s.trkFrameNames=[];s.removeTrkFrameName=function(e){for(var a=0;a<s.trkFrameNames.length;a++){if(s.trkFrameNames[a]==e){s.trkFrameNames.splice(a,1);return}}};s.formsToSubmit=[];s.sendTrackingData=function(N,i){if(!document.body){document.addEventListener("DOMContentLoaded",function(){s.sendTrackingData(N,i)},false);return}var e="_lntSafari_HiddenIframe";var p=document.getElementById(e);if(!p){p=document.createElement("IFRAME");p.setAttribute("name",e);p.setAttribute("id",e);p.style.width="1px";p.style.height="1px";p.style.left="-100px";p.style.top="-100px";p.frameBorder=0;p.style.setProperty("display","none");p.style.setProperty("border","0px");document.body.insertBefore(p,document.body.firstChild)}p=p.contentDocument.body;var M="_cptlnt_frm_"+new Date().getTime();var a=document.createElement("IFRAME");a.style.width="1px";a.style.height="1px";a.frameBorder=0;a.style.setProperty("display","none");a.style.setProperty("border","0px");a.setAttribute("name",M);s.trkFrameNames.push(M);p.appendChild(a);var L=document.createElement("FORM");L.setAttribute("method","POST");L.setAttribute("action",N);L.setAttribute("target",M);s.trkFrameNames.push(M);if(i){a.onload=function(){s.firstTrkRequestWasSent=true;s.removeTrkFrameName(M);for(var O=0;O<s.formsToSubmit.length;O++){s.formsToSubmit[O].submit()}};L.submit()}else{a.onload=function(){s.removeTrkFrameName(M)};if(s.firstTrkRequestWasSent){L.submit()}else{s.formsToSubmit.push(L)}}}}function C(){s.trkImages=[];s.removePendingImage=function(a){if(!a){return}for(var e=0;e<s.trkImages.length;e++){var p=s.trkImages[e];if(p.src==a.src){s.trkImages.splice(e,1);return}}};s.sendTrackingData=function(i,a){var e=new Image();if(a){e.onload=function(){s.firstTrkRequestWasSent=true;s.removePendingImage(this);for(var p=0;p<s.trkImages.length;p++){var L=s.trkImages[p];if(L&&L.srcToLoad){L.src=L.srcToLoad;L.srcToLoad=undefined}}};e.onerror=e.onload;e.src=i}else{e.onload=function(){s.removePendingImage(this)};e.onerror=e.onload;if(s.firstTrkRequestWasSent){e.src=i}else{e.srcToLoad=i}}s.trkImages.push(e)}}if(I){D()}else{C()}function g(){var a=o();s.UserAgentDetailed=a;if(a=="ie6"||a=="ie7"){s.UserAgent="ie6"}else{if(a=="iphone"){s.UserAgent="safari"}else{s.UserAgent=a}}}function o(){var p=navigator.userAgent.toLowerCase();var L=function(M){return parseInt(M[1])*1000+parseInt(M[2])};if(p.indexOf("opera")!=-1){return"opera"}else{if(p.indexOf("ipod")!=-1||p.indexOf("iphone")!=-1){return"iphone"}else{if(p.indexOf("webkit")!=-1){if(p.indexOf("chrome")!=-1){return"chrome"}else{return"safari"}}else{if(p.indexOf("msie")!=-1){var e=_cptlnttop.location.href.toLowerCase();if(p.indexOf("windows live messenger")!=-1||(e.indexOf("http://rad.msn.com/adsadclient31.dll")!=-1&&e.indexOf("&ap=1007")!=-1)){return"wlm"}var a=new RegExp("msie ([0-9]+).([0-9]+)","ig").exec(p);if(a&&a.length==3){var i=L(a);if(i>=9000){return"ie9"}else{if(i>=8000){return"ie8"}else{if(i>=7000){return"ie7"}else{if(i>=6000){return"ie6"}}}}}}else{if(p.indexOf("gecko")!=-1){var a=new RegExp("rv:([0-9]+).([0-9]+)","ig").exec(p);if(a&&a.length==3){if(L(a)>=10000){return"gecko10"}if(L(a)>=2000){return"gecko2_0"}}return"gecko1_8"}}}}}return"unknown"}g();s.trkStart();if(s.extImgcd!=undefined){for(var z=0;z<s.extImgcd.length;z++){try{var f=encodeURIComponent(s.fillExtParams(s.extImgcd[z]));var l=s.cdURL+f;s.sendTrackingData(l,false)}catch(B){}}}s.loadScript=function(p){var i=document.createElement("SCRIPT");i.setAttribute("id","_cptlnt_injected_cache");i.setAttribute("type","text/javascript");i.setAttribute("src",p);try{document.getElementsByTagName("head")[0].appendChild(i)}catch(a){document.body.insertBefore(i,document.body.firstChild)}if(!s.injectedScripts){s.injectedScripts=[]}s.injectedScripts.push(i)};s.loadCSS=function(p){var i=document.createElement("LINK");i.setAttribute("rel","stylesheet");i.setAttribute("href",p);try{document.getElementsByTagName("head")[0].appendChild(i)}catch(a){document.body.insertBefore(i,document.body.firstChild)}};s._cptlntFct=function(){var a;var p={ie8:"28856_F69911B024575C6780F060291E1920EC",ie9:"28856_5F1D659A072CFA7FFA6D6CB1CDE3C36F",gecko10:"28856_779746001F2461D0AC39340C6C65F2CA",gecko2_0:"28856_33CD54BFDD13DC111EA3A28631AE50A4",ie6:"28856_AA80FB80C8CA959156D1520DA0A0CD4E",safari:"28856_EA7C4E87361F1C3DA8A6FF51FCD93824",chrome:"28856_381E8320A0530107DE9F9DEDF32BFBAB",gecko1_8:"28856_CF724F3EF6CD0B16C56EEF75EBC53C88",opera:"28856_5335F64DD67970D16CE8202A32713B62",wlm:"28856_905CE3FC3FB473D419876EE0683CBA60"};try{if(s.UserAgent=="unknown"){return}a=p[s.UserAgent]}catch(i){return}if(!a){return}s.loadScript("http://js.alenty.com/canalplus/c/"+a+".js")};s._cptlntFct()}}_cptlntStart();



Il y a moyen de s'en servir ? À la limite si je prend un lecteur flash dispo sur le web, pouvez vous me dire comment rajouter ce système de spots publicitaires ?
a c 232 L Programmation
10 Avril 2012 09:47:42

Il faudra très certainement modifier le code flash du lecteur pour ajouter du code pour gérer les spots publicitaires.
Et ça, je suis bien incapable de le faire :) 

Mais sinon, faut essayer de voir si tu peux trouver directement des lecteurs flash qui supportent les spots publicitaires, ça doit exister... j'en ai trouvé un mais payant ($30 de mémoire), j'ai pas cherché très longtemps non plus.

Edit: et pour le code de canal plus, je suis pas sûr que ce soit ça... pour moi c'est directement dans le lecteur flash qu'il y a une fonction pour des pubs.
10 Avril 2012 10:11:31

D'accord merci beaucoup j'ai un peu cherché pour des lecteurs déjà prêts, mais j'ai rien trouvé, maintenant votre lecteur pour $30 (environ) me convient parfaitement.
Je vais continuer de chercher mais si vous retrouvez le lien, à l'occasion je reste à l'écoute !

Merci beaucoup !!!

PS : sinon je pensai aussi au HTML5, si ce genre de gestion est possible... Qu'en pensez vous ?

Sur code canyon j'ai quelques player mais rien avec des pub.

10 Avril 2012 10:45:48

PS : sinon je pensai aussi au HTML5, si ce genre de gestion est possible... Qu'en pensez vous ?

Sur code canyon j'ai quelques player mais rien avec des pub.


Merci pour le lien j'étais justement en train de chercher sur notre ami evento ! ^^
Plusieurs players ont l'air pas mal !

Merci encore beaucoup !!
a c 232 L Programmation
10 Avril 2012 11:12:53

Je pense pas que ce soit possible nativement avec HTML 5.
Mais tu dois pouvoir t'en sortir quand même...

Il y a le JW Player qui a l'air de l'avoir : http://www.longtailvideo.com/support/blog/22968/jw-play...
Peut-être aussi ça : http://www.mefeedianetwork.com/html5-video-ads/

Sinon, peut être avoir un système qui lors de la lecture met pause, affiche la publicité et bloque tous les contrôles, et une fois la publicité finie, relance la lecture normalement. Et tu dois pouvoir afficher la publicité en overlay :
http://app-solut.com/blog/2011/03/display-additional-ov...
10 Avril 2012 11:30:58

Merci beaucoup pour toutes vos réponses j'ai de quoi travailler !!

À très bientôt !!!
Tom's guide dans le monde
  • Allemagne
  • Italie
  • Irlande
  • Royaume Uni
  • Etats Unis
Suivre Tom's Guide
Inscrivez-vous à la Newsletter
  • ajouter à twitter
  • ajouter à facebook
  • ajouter un flux RSS