Changeset 3091257
- Timestamp:
- 05/23/2024 06:33:33 AM (23 months ago)
- Location:
- codeflavors-vimeo-video-post-lite/trunk
- Files:
-
- 4 edited
-
CHANGELOG.md (modified) (1 diff)
-
assets/back-end/js/apps/player/app.build.js (modified) (1 diff)
-
main.php (modified) (2 diffs)
-
readme.txt (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
codeflavors-vimeo-video-post-lite/trunk/CHANGELOG.md
r3083053 r3091257 1 1 *** Vimeotheque Lite Changelog *** 2 3 2024-05-23 - Version 2.3.2 4 - Attempt to autoplay lazy-loaded videos when user clicks play. See https://developer.chrome.com/blog/autoplay/ for more details on autoplay. 2 5 3 6 2024-05-08 - Version 2.3.1 -
codeflavors-vimeo-video-post-lite/trunk/assets/back-end/js/apps/player/app.build.js
r3075417 r3091257 1 (()=>{"use strict";var e={n:t=>{var o=t&&t.__esModule?()=>t.default:()=>t;return e.d(o,{a:o}),o},d:(t,o)=>{for(var i in o)e.o(o,i)&&!e.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:o[i]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t)};const t=jQuery;var o,i=e.n(t);i().fn.VimeoPlayer=function(e){if(0==this.length)return!1;if(this.length>1)return this.each((function(e,t){i()(t).VimeoPlayer()}));var t,o=this,n=i().extend({},i().fn.VimeoPlayer.defaults,e),a=i()(this).data(),r=!1;this.isError=!1;try{t=new Vimeo.Player(i()(this).find("iframe"))}catch(e){o.isError=e}if(this.isError){try{console.log("%cCould not load Vimeotheque player for video "+a.video_id+" due to Vimeo.Player error.","color: #FF0000")}catch(e){}return i()(this).find("iframe").on("load",n.onIframeReload),o}return t.on("loaded",(function(){o.addClass("loaded"),n.onLoad(o),i()(document).trigger("Vimeotheque_PlayerReady",[o])})),t.on("play",(function(e){r||(o.setVolume(parseInt(a.volume)/100),r=!0),n.onPlay(e,o),o.trigger("onPlay",a)})),t.on("timeupdate",(function(e){n.onPlayback(e,o)})),t.on("pause",(function(e){n.onPause(e,o),o.trigger("onPause",e)})),t.on("ended",(function(e){n.onFinish(e,o),o.trigger("onEnd",e)})),t.on("error",(function(e){n.onError(e,o)})),t.on("volumechange",(function(e){r=!0})),this.loadVideo=function(e){return t.loadVideo(e).then((function(e){})).catch((function(e){})),o},this.pause=function(){return t.pause().then((function(){})).catch((function(e){})),o},this.play=function(){return t.play().then((function(){})).catch((function(e){})),o},this.setVolume=function(e){return a.background||a.muted||t.setVolume(e).then((function(e){})).catch((function(e){})),o},this.getVolume=function(){return t.getVolume()},this.setPlaybackPosition=function(e){return t.setCurrentTime(e).then((function(e){})).catch((function(e){})),o},this.getPlayer=function(){return t},i()(this).data("ref",this),o},i().fn.VimeoPlayer.defaults={onIframeReload:function(){},onLoad:function(e){},onPlay:function(e){},onPlayback:function(e){},onPause:function(e){},onFinish:function(e){},onError:function(e){}},window.vimeotheque=window.vimeotheque||{},(o=vimeotheque).resizeAll=function(){i()("div.vimeotheque-player").each((function(e,t){vimeotheque.resize(t)}))},o.resize=function(e){var t,o=parseFloat(i()(e).attr("data-size_ratio")||0),n=i()(e).attr("data-aspect_ratio"),a=i()(e).width();if(o>0)t=Math.floor(a/o);else switch(n){case"16x9":default:t=Math.floor(9*a/16);break;case"4x3":t=Math.floor(3*a/4);break;case"2.35x1":t=Math.floor(a/2.35)}i()(e).css({height:t})},i()(document).ready(vimeotheque.resizeAll),i()(window).on("resize",vimeotheque.resizeAll),i().fn.VimeoPlaylist=function(e){if(0==this.length)return!1;if(this.length>1)return this.each((function(t,o){i()(o).VimeoPlaylist(e)}));var t=!1,o=i().extend({},i().fn.VimeoPlaylist.defaults,e),n=this,a=i()(this).find(o.player).VimeoPlayer({onIframeReload:function(){n.VimeoPlaylist(o)},onFinish:function(){y()},onPlay:function(){t=!0},onLoad:function(){1==m&&t&&a.play()}});if(!a.isError){var r=i()(this).find(o.items),l=i()(a).data(),u=l.playlist_loop,c=l.volume;if(l.shuffle&&r.length>2)for(var s=r.length-1;s>1;--s){var d=1+Math.floor(Math.random()*s),f=[r[d],r[s]];r[s]=f[0],r[d]=f[1]}var h=0,m=parseInt(u),v=function(e,t){var l=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(t!==h){var u=i()(e).data(),c=(u.autoplay,u.video_id),s=u.size_ratio,d=u.aspect_ratio;i()(r[h]).removeClass("active-video"),i()(e).addClass("active-video"),a.loadVideo(c).attr({"data-size_ratio":s,"data-aspect_ratio":d}),l&&a.setVolume(l),vimeotheque.resize(a),h=t,o.loadVideo.call(n,e,t,a)}},y=function(){1==m&&h<r.length-1&&i()(r[h+1]).trigger("click")};return vimeotheque.resize(a),a.setVolume(c/100),i().each(r,(function(e,t){0==e&&(v(t,e),i()(t).addClass("active-video")),i()(t).on("click",(function(o){o.preventDefault(),a.getVolume().then((function(o){v(t,e,o)}))}))})),n}},i().fn.VimeoPlaylist.defaults={player:".vimeotheque-player",items:".cvm-playlist-item a[data-video_id]",loadVideo:function(){}},window.vimeotheque=window.vimeotheque||{},i()(document).ready((function(){var e={};i()(".vimeotheque-player.lazy-load .vimeotheque-load-video").on("click",(function(t){t.preventDefault(),i()(this).closest(".vimeotheque-player.lazy-load").html(i()("<iframe />",{src:i()(this).data("url"),width:"100%",height:"100%",frameborder:0,allowFullScreen:"",mozallowfullscreen:"",webkitallowfullscreen:""})).removeClass("lazy-load").VimeoPlayer(e)})),i()(".vimeotheque-player.lazy-load").each((function(e,t){var o=i()(t).find("img.video-thumbnail");if(0!=o.length){var n=!1,a=!1;i()(o[0]).prop("complete")&&(n=i()(o[0]).width(),a=i()(o[0]).height()),i()(o[0]).on("load",(function(){n=i()(o[0]).width(),a=i()(o[0]).height()}));var r=setInterval((function(){if(n&&a){i()(t).width();var e=i()(t).height();a<e&&i()(o[0]).addClass("center-horizontal"),clearInterval(r)}}),300)}})),vimeotheque.players=i()(".vimeotheque-player:not(.lazy-load)").VimeoPlayer(e)}))})();1 (()=>{"use strict";var e={n:t=>{var o=t&&t.__esModule?()=>t.default:()=>t;return e.d(o,{a:o}),o},d:(t,o)=>{for(var i in o)e.o(o,i)&&!e.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:o[i]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t)};const t=jQuery;var o,i=e.n(t);i().fn.VimeoPlayer=function(e){if(0==this.length)return!1;if(this.length>1)return this.each((function(e,t){i()(t).VimeoPlayer()}));var t,o=this,n=i().extend({},i().fn.VimeoPlayer.defaults,e),a=i()(this).data(),r=!1;this.isError=!1;try{t=new Vimeo.Player(i()(this).find("iframe"))}catch(e){o.isError=e}if(this.isError){try{console.log("%cCould not load Vimeotheque player for video "+a.video_id+" due to Vimeo.Player error.","color: #FF0000")}catch(e){}return i()(this).find("iframe").on("load",n.onIframeReload),o}return t.on("loaded",(function(){o.addClass("loaded"),n.onLoad(o),i()(document).trigger("Vimeotheque_PlayerReady",[o])})),t.on("play",(function(e){r||(o.setVolume(parseInt(a.volume)/100),r=!0),n.onPlay(e,o),o.trigger("onPlay",a)})),t.on("timeupdate",(function(e){n.onPlayback(e,o)})),t.on("pause",(function(e){n.onPause(e,o),o.trigger("onPause",e)})),t.on("ended",(function(e){n.onFinish(e,o),o.trigger("onEnd",e)})),t.on("error",(function(e){n.onError(e,o)})),t.on("volumechange",(function(e){r=!0})),this.loadVideo=function(e){return t.loadVideo(e).then((function(e){})).catch((function(e){})),o},this.pause=function(){return t.pause().then((function(){})).catch((function(e){})),o},this.play=function(){return t.play().then((function(){})).catch((function(e){})),o},this.setVolume=function(e){return a.background||a.muted||t.setVolume(e).then((function(e){})).catch((function(e){})),o},this.getVolume=function(){return t.getVolume()},this.setPlaybackPosition=function(e){return t.setCurrentTime(e).then((function(e){})).catch((function(e){})),o},this.getPlayer=function(){return t},i()(this).data("ref",this),o},i().fn.VimeoPlayer.defaults={onIframeReload:function(){},onLoad:function(e){},onPlay:function(e){},onPlayback:function(e){},onPause:function(e){},onFinish:function(e){},onError:function(e){}},window.vimeotheque=window.vimeotheque||{},(o=vimeotheque).resizeAll=function(){i()("div.vimeotheque-player").each((function(e,t){vimeotheque.resize(t)}))},o.resize=function(e){var t,o=parseFloat(i()(e).attr("data-size_ratio")||0),n=i()(e).attr("data-aspect_ratio"),a=i()(e).width();if(o>0)t=Math.floor(a/o);else switch(n){case"16x9":default:t=Math.floor(9*a/16);break;case"4x3":t=Math.floor(3*a/4);break;case"2.35x1":t=Math.floor(a/2.35)}i()(e).css({height:t})},i()(document).ready(vimeotheque.resizeAll),i()(window).on("resize",vimeotheque.resizeAll),i().fn.VimeoPlaylist=function(e){if(0==this.length)return!1;if(this.length>1)return this.each((function(t,o){i()(o).VimeoPlaylist(e)}));var t=!1,o=i().extend({},i().fn.VimeoPlaylist.defaults,e),n=this,a=i()(this).find(o.player).VimeoPlayer({onIframeReload:function(){n.VimeoPlaylist(o)},onFinish:function(){y()},onPlay:function(){t=!0},onLoad:function(){1==m&&t&&a.play()}});if(!a.isError){var r=i()(this).find(o.items),l=i()(a).data(),u=l.playlist_loop,c=l.volume;if(l.shuffle&&r.length>2)for(var s=r.length-1;s>1;--s){var f=1+Math.floor(Math.random()*s),d=[r[f],r[s]];r[s]=d[0],r[f]=d[1]}var h=0,m=parseInt(u),v=function(e,t){var l=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(t!==h){var u=i()(e).data(),c=(u.autoplay,u.video_id),s=u.size_ratio,f=u.aspect_ratio;i()(r[h]).removeClass("active-video"),i()(e).addClass("active-video"),a.loadVideo(c).attr({"data-size_ratio":s,"data-aspect_ratio":f}),l&&a.setVolume(l),vimeotheque.resize(a),h=t,o.loadVideo.call(n,e,t,a)}},y=function(){1==m&&h<r.length-1&&i()(r[h+1]).trigger("click")};return vimeotheque.resize(a),a.setVolume(c/100),i().each(r,(function(e,t){0==e&&(v(t,e),i()(t).addClass("active-video")),i()(t).on("click",(function(o){o.preventDefault(),a.getVolume().then((function(o){v(t,e,o)}))}))})),n}},i().fn.VimeoPlaylist.defaults={player:".vimeotheque-player",items:".cvm-playlist-item a[data-video_id]",loadVideo:function(){}},window.vimeotheque=window.vimeotheque||{},i()(document).ready((function(){i()(".vimeotheque-player.lazy-load .vimeotheque-load-video").on("click",(function(e){e.preventDefault(),i()(this).closest(".vimeotheque-player.lazy-load").html(i()("<iframe />",{src:i()(this).data("url"),width:"100%",height:"100%",frameborder:0,allowFullScreen:"",mozallowfullscreen:"",webkitallowfullscreen:"",allow:"autoplay; fullscreen"})).removeClass("lazy-load").VimeoPlayer({onLoad:function(e){e.play()}})})),i()(".vimeotheque-player.lazy-load").each((function(e,t){var o=i()(t).find("img.video-thumbnail");if(0!=o.length){var n=!1,a=!1;i()(o[0]).prop("complete")&&(n=i()(o[0]).width(),a=i()(o[0]).height()),i()(o[0]).on("load",(function(){n=i()(o[0]).width(),a=i()(o[0]).height()}));var r=setInterval((function(){if(n&&a){i()(t).width();var e=i()(t).height();a<e&&i()(o[0]).addClass("center-horizontal"),clearInterval(r)}}),300)}})),vimeotheque.players=i()(".vimeotheque-player:not(.lazy-load)").VimeoPlayer({})}))})(); -
codeflavors-vimeo-video-post-lite/trunk/main.php
r3083053 r3091257 5 5 * Description: Vimeotheque imports public Vimeo videos as WordPress posts. It is a perfect fit for membership, portfolio, online courses or any type of video collection. 6 6 * Author: CodeFlavors 7 * Version: 2.3. 17 * Version: 2.3.2 8 8 * Author URI: https://codeflavors.com 9 9 * Text Domain: codeflavors-vimeo-video-post-lite … … 17 17 define( 'VIMEOTHEQUE_PATH', plugin_dir_path( __FILE__ ) ); 18 18 define( 'VIMEOTHEQUE_URL', plugin_dir_url( __FILE__ ) ); 19 define( 'VIMEOTHEQUE_VERSION', '2.3. 1' );19 define( 'VIMEOTHEQUE_VERSION', '2.3.2' ); 20 20 define( 'VIMEOTHEQUE_TEMPLATE_DEBUG_MODE', false ); 21 21 /** -
codeflavors-vimeo-video-post-lite/trunk/readme.txt
r3083053 r3091257 5 5 Tested up to: 6.5.3 6 6 Requires PHP: 7.4 7 Stable tag: 2.3. 17 Stable tag: 2.3.2 8 8 License: GPLv2 or later 9 9 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 13 13 == Description == 14 14 15 = Vimeo WordPress Plugin =15 = Vimeo WordPress Video Gallery Plugin = 16 16 17 17 Looking for a powerful and easy-to-use solution to embed Vimeo videos on your WordPress site? Look no further than Vimeotheque – the ultimate plugin for managing Vimeo videos on WordPress. … … 136 136 137 137 == Changelog == 138 = 2.3.2 = 139 - - Attempt to autoplay lazy-loaded videos when user clicks play. See [https://developer.chrome.com/blog/autoplay/](https://developer.chrome.com/blog/autoplay/) for more details on autoplay. 140 138 141 = 2.3.1= 139 142 - Introduced option for customizable Series slug;
Note: See TracChangeset
for help on using the changeset viewer.