PageSourceSearch

https://jcdecaux-transport.com.hk/themes/custom/jcd/html/generic/js/behaviors/autoplay.video-min.js?tckdou

js jcdecaux-transport.com.hk collected 2026-09-29 09:22:15 UTC 2,705 bytes, 1 lines download raw bytes

1var jcd=jcd||{};!function(e){"use strict";var t=document.createElement("script");t.src="https://www.youtube.com/iframe_api";var i=document.getElementsByTagName("script")[0];i.parentNode.insertBefore(t,i);var o=e.Deferred();window.onYouTubeIframeAPIReady=function(){o.resolve(window.YT)},window.onload=function(){for(var e=document.getElementsByClassName("youtube"),t=0;t<e.length;t++)e[t].getAttribute("data-src")&&e[t].setAttribute("src",e[t].getAttribute("data-src"))},jcd.autoPlayVideo=function(t){e(once("autoPlayVideo",".autoplay-video",t)).each(function(){var t=e(this).parent(),i=e(this),d=t.find("iframe.youtube"),n=t.find("iframe.vimeo").attr("id"),a=d.attr("id");if(o.done(function(o){var d;void 0!==a&&(d=new o.Player(a,{events:{onReady:function(o){i.on("click",function(i){if(t.removeClass("with-video"),d.playVideo(),window.videoStatus.id!=a){void 0===jcd.getVideoTitle(e("#"+a))||jcd.getVideoTitle(e("#"+a));window.videoStatus.id=a,jcdecaux.gtm_push({eventCategory:"Video",eventAction:"Play",eventLabel:d.getVideoData().title,type:"event",event:"click"})}})}}}))}),void 0!==n&&"undefined"!=typeof Vimeo){var c=new Vimeo.Player(n);i.on("click",function(){t.removeClass("with-video"),c.play(),c.on("play",function(){var t=void 0===jcd.getVideoTitle(e("#"+n))?"":jcd.getVideoTitle(e("#"+n));window.videoStatus.id!=n&&(window.videoStatus.id=n,jcdecaux.gtm_push({eventCategory:"Video",eventAction:"Play",eventLabel:t,type:"event",event:"click"}))})})}}),jcd.videoGtm(e(".jcdecaux-video-embed-block .youtube")),jcd.videoVimeoGTM(e(".jcdecaux-video-embed-block .vimeo")),e(once("playVideoOnHover",".jcdecaux-picture-block video")).each(function(){var t=this,i=e(t).closest(".img");t.pause(),i.hover(function(){t.play(),i.addClass("hide-img")},function(){t.pause()})})},jcd.videoGtm=function(t){window.videoStatus={},o.done(function(i){t.each(function(){var o=e(this).attr("id");void 0!==o&&new i.Player(o,{events:{onStateChange:function(e){var i=void 0===jcd.getVideoTitle(t)?"":jcd.getVideoTitle(t);window.videoStatus.id!=o&&(window.videoStatus.id=o,jcdecaux.gtm_push({eventCategory:"Video",eventAction:"Play",eventLabel:i,type:"event",event:"click"}))}}})})})},jcd.videoVimeoGTM=function(e){var t=e.attr("id");if(void 0!==t&&"undefined"!=typeof Vimeo){var i=void 0===jcd.getVideoTitle(e)?"":jcd.getVideoTitle(e);new Vimeo.Player(t).on("play",function(){window.videoStatus.id!=t&&(window.videoStatus.id=t,jcdecaux.gtm_push({eventCategory:"Video",eventAction:"Play",eventLabel:i,type:"event",event:"click"}))})}},jcd.getVideoTitle=function(e){return e.data("title")}}(jQuery),Drupal.behaviors.autoPlayVideo={attach:jcd.autoPlayVideo},jQuery.isReady&&Drupal.behaviors.autoPlayVideo.attach(document);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.