Every line of 'jquery click image to play youtube video' code snippets is scanned for vulnerabilities by our powerful machine learning engine that combs millions of open source libraries, ensuring your JavaScript code is secure.
165 function playVideo(e){ 166 if (e) { 167 e.preventDefault(); 168 } 169 var el = $("#videoPlayer")[0]; 170 el.vjs_play(); 171 }
75 function loadVideo(data) 76 { 77 if(data['video-path']) 78 { 79 $("#video a").click(function(){ 80 changeTo('video',data); 81 }); 82 } 83 }
988 function loadVideo($video, src) { 989 var w = "100%", h = "100%"; 990 if (src.indexOf("//www.youtube.com") != -1 || src.indexOf("//youtu") != -1 || src.indexOf("vimeo.com") != -1) { 991 // youtube/vimeo videos won't trigger mediaMetadata() from mediaPlayer.js so size needs to be set initially 992 if ($video.closest(".overviewStep").length > 0 || smallScreen == true) { 993 w = 200; h = 150; 994 } else { 995 w = 320; h = 240; 996 } 997 998 }else { 999 $video.css("visibility", "hidden"); 1000 } 1001 1002 $video.mediaPlayer({ 1003 type :"video", 1004 source :src, 1005 width :w, 1006 height :h, 1007 pageName:"decisionTemplate" 1008 }); 1009 }
260 play() { 261 this.trigger(Events.PLAYBACK_PLAY_INTENT) 262 this._stopped = false 263 this._setupSrc(this._src) 264 this._handleBufferingEvents() 265 let promise = this.el.play() 266 // For more details, see https://developers.google.com/web/updates/2016/03/play-returns-promise 267 if (promise && promise.catch) 268 promise.catch(() => {}) 269 270 }
36 function playAndToggle(video, imageContainer) { 37 video.play(); 38 toggle(video, imageContainer, false); 39 }
465 function resumeVideo(callback) { 466 console.log('resumeVideo', arguments); 467 localLargeStream.getVideoTracks()[0].enabled = true; 468 callback && callback(); 469 }
17 play(): void { 18 this.nativeView.playVideo(); 19 }
75 _launchVideo (videoId) { 76 this.video_id = videoId; 77 78 // Show this component in full screen 79 this.style.display = 'block'; 80 this._playVideo(); 81 }
26 handleVideo() { 27 if ( ! this.getElementSettings( 'lightbox' ) ) { 28 this.elements.$imageOverlay.remove(); 29 30 this.playVideo(); 31 } 32 }
136 function playVideo() { 137 console.log("play", playerId) 138 player.playVideo(); 139 clearInterval(self.timeUpdateId); 140 }