Changeset 2007
- Timestamp:
- 10/13/11 07:37:01 (19 months ago)
- Location:
- plugins/ping
- Files:
-
- 4 edited
-
ping.js (modified) (1 diff)
-
ping.swf (modified) (previous)
-
src/as/Ping.as (modified) (1 diff)
-
src/js/ping.js (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
plugins/ping/ping.js
r2006 r2007 1 (function(a){var b=function(h,s,g){var o;var f=30;var e=-1;var r="";var q="";var d=-1;function l(t){if(t.oldstate=="IDLE"){o=h.getPlaylistItem();k("item");d=-1;e=-1}}function c(t){k("complete")}function m(t){r=t.message;k("error")}function p(t){if(d>-1){k("stop")}}function i(){if(s.interval){f=s.interval}h.onBuffer(l);h.onComplete(c);h.onError(m);h.onIdle(p);h.onTime(j);if(window.addEventListener){window.addEventListener("beforeunload",n)}else{if(window.attachEvent){window.attachEvent("onbeforeunload",n)}else{window.onbeforeunload=n}}if(window.top!=window){q=document.referrer}else{q=window.location.href}k("ready")}h.onReady(i);this.resize=function(t,u){};function k(t){var u="?event="+t;switch(t){case"error":u+="&file="+encodeURIComponent(o.file);u+="&mediaid="+encodeURIComponent(o.mediaid);u+="&message="+encodeURIComponent(r);break;case"complete":case"item":u+="&file="+encodeURIComponent(o.file);u+="&mediaid="+encodeURIComponent(o.mediaid);break;case"ready":u+="&referrer="+encodeURIComponent(q);u+="&playerid="+encodeURIComponent(h.id);u+="&renderingmode="+h.getRenderingMode();break;case"progress":case"seek":case"stop":u+="&file="+encodeURIComponent(o.file);u+="&mediaid="+encodeURIComponent(o.mediaid);u+="&start="+Math.round(d*10)/10;u+="&duration="+Math.round((e-d)*10)/10;break}u+="&r="+Math.random();if(s.pixel){var v=new Image();v.src=s.pixel+u} else{console.log(u)}}function n(t){if(d>-1){k("stop")}}function j(t){if(d==-1){d=e=t.position}else{if(Math.abs(t.position-e)>1){if(e-d>2){k("seek")}d=-1;e=-1}else{if(e-d>f){k("progress");d=e=t.position}else{e=t.position}}}}};a().registerPlugin("ping",b)})(jwplayer);1 (function(a){var b=function(h,s,g){var o;var f=30;var e=-1;var r="";var q="";var d=-1;function l(t){if(t.oldstate=="IDLE"){o=h.getPlaylistItem();k("item");d=-1;e=-1}}function c(t){k("complete")}function m(t){r=t.message;k("error")}function p(t){if(d>-1){k("stop")}}function i(){if(s.interval){f=s.interval}h.onBuffer(l);h.onComplete(c);h.onError(m);h.onIdle(p);h.onTime(j);if(window.addEventListener){window.addEventListener("beforeunload",n)}else{if(window.attachEvent){window.attachEvent("onbeforeunload",n)}else{window.onbeforeunload=n}}if(window.top!=window){q=document.referrer}else{q=window.location.href}k("ready")}h.onReady(i);this.resize=function(t,u){};function k(t){var u="?event="+t;switch(t){case"error":u+="&file="+encodeURIComponent(o.file);u+="&mediaid="+encodeURIComponent(o.mediaid);u+="&message="+encodeURIComponent(r);break;case"complete":case"item":u+="&file="+encodeURIComponent(o.file);u+="&mediaid="+encodeURIComponent(o.mediaid);break;case"ready":u+="&referrer="+encodeURIComponent(q);u+="&playerid="+encodeURIComponent(h.id);u+="&renderingmode="+h.getRenderingMode();break;case"progress":case"seek":case"stop":u+="&file="+encodeURIComponent(o.file);u+="&mediaid="+encodeURIComponent(o.mediaid);u+="&start="+Math.round(d*10)/10;u+="&duration="+Math.round((e-d)*10)/10;break}u+="&r="+Math.random();if(s.pixel){var v=new Image();v.src=s.pixel+u}}function n(t){if(d>-1){k("stop")}}function j(t){if(d==-1){d=e=t.position}else{if(Math.abs(t.position-e)>1){if(e-d>2){k("seek")}d=-1;e=-1}else{if(e-d>f){k("progress");d=e=t.position}else{e=t.position}}}}};a().registerPlugin("ping",b)})(jwplayer); -
plugins/ping/src/as/Ping.as
r2006 r2007 145 145 if(_config.pixel) { 146 146 sendToURL(new URLRequest(_config.pixel+query)); 147 } else {148 try {149 ExternalInterface.call("console.log",query);150 } catch(err:Error) {}151 147 } 152 148 }; -
plugins/ping/src/js/ping.js
r2006 r2007 121 121 var image = new Image(); 122 122 image.src = _options.pixel + query; 123 } else {124 console.log(query);125 123 } 126 124 };
Note: See TracChangeset
for help on using the changeset viewer.
