Plugin Directory

Changeset 2373353


Ignore:
Timestamp:
09/01/2020 07:51:34 PM (5 years ago)
Author:
JDAdmin
Message:

v2.0.18

Location:
smartvideo/trunk
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • smartvideo/trunk/README.txt

    r2364102 r2373353  
    8888== Changelog ==
    8989
     90= 2.0.18 =
     91* **Now you see me, now you don't**
     92  * Sometimes it's fun to revert to our inner child and play games like hide & seek. Try it, we'll wait. You really needed that, right? While games are good for humans, it's not good for our Gutenberg block editor to play hide & seek with your block attributes. Naughty code was hiding the URL you set when you specified direct video URL's in our SmartVideo block. Don't worry we had a talk with the code, and it will never hide this data again. Also, rest assured everything is in there from previous blocks you have inserted, it was just.....hidden.
     93  * Gutenberg block editor was not showing the URL's you previously set for videos when you chose the "Another source" option. This has been fixed.
     94
    9095= 2.0.17 =
    9196* **Crouching tiger, hidden classic**
  • smartvideo/trunk/SmartVideo.php

    r2364102 r2373353  
    1111 * Plugin URI:        https://swarmify.com/wordpress-plugin/
    1212 * Description:       SmartVideo makes building a beautiful, professional video experience for your site effortless.
    13  * Version:           2.0.17
     13 * Version:           2.0.18
    1414 * Author:            Swarmify
    1515 * Author URI:        https://swarmify.com/
     
    3030 * Rename this for your plugin and update it as you release new versions.
    3131 */
    32 define( 'SWARMIFY_PLUGIN_VERSION', '2.0.17' );
     32define( 'SWARMIFY_PLUGIN_VERSION', '2.0.18' );
    3333
    3434/**
  • smartvideo/trunk/page-builders/gutenberg/dist/blocks.build.js

    r2197719 r2373353  
    1 !function(e){function t(r){if(n[r])return n[r].exports;var o=n[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,t),o.l=!0,o.exports}var n={};t.m=e,t.c=n,t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:r})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=1)}([function(e,t,n){"use strict";function r(e){var t=e.attributes,n=t.smartvideoEmbedLink,r=t.poster,o=(t.posterMediaLibrary,t.posterAnoterSource,t.posterUrl),l=t.width,a=t.height,i=t.responsive,s=t.autoplay,u=t.loop,p=t.muted,c=t.controls,d=t.playsInline,m=i?"swarm-fluid":"",b=document.createElement("smartvideo");return b.setAttribute("src",n),b.setAttribute("width",l),b.setAttribute("height",a),"none"!==r&&b.setAttribute("poster",o),b.setAttribute("class",m),s&&b.setAttribute("autoplay",""),p&&b.setAttribute("muted",""),u&&b.setAttribute("loop",""),c&&b.setAttribute("controls",""),d&&b.setAttribute("playsinline",""),b}t.a=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});n(2)},function(e,t,n){"use strict";var r=n(3),o=(n.n(r),n(4)),l=(n.n(o),n(5)),a=n(6),i=n(0),__=wp.i18n.__,s=wp.blocks.registerBlockType,u=wp.editor,p=(u.InspectorControls,u.MediaUpload,u.MediaUploadCheck,u.MediaPlaceholder,u.PlainText,wp.components);p.Button,p.PanelBody,p.ToggleControl,p.SelectControl,p.BaseControl,p.TextControl,wp.compose.withState,wp.element.createRef;s("smartvideo/block-smartvideo-guten",{title:__("SmartVideo"),description:__("SmartVideo makes building a beautiful, professional video experience for your site effortless."),icon:l.a,category:"common",keywords:[__("video"),__("smartvideo"),__("embed")],supports:{align:!0},attributes:{autoplay:{type:"boolean",default:!1},loop:{type:"boolean",default:!1},muted:{type:"boolean",default:!1},width:{type:"string",default:"1280"},height:{type:"string",default:"720"},controls:{type:"boolean",default:!0},playsInline:{type:"boolean",default:!1},responsive:{type:"boolean",default:!0},poster:{type:"string",default:"none"},posterId:{type:"number"},posterMediaLibrary:{type:"string"},posterAnoterSource:{type:"string"},posterUrl:{type:"string"},source:{type:"string",default:"media_library"},videoId:{type:"number"},videoInternalUrl:{type:"string"},youtube:{type:"string"},vimeo:{type:"string"},smartvideoEmbedLink:{type:"string",default:"https://swarmify.com/wp-content/uploads/SmartVideoIntroMain.mp4"}},edit:a.a,save:function(e){var t=e.attributes,n=(t.smartvideoEmbedLink,t.poster,t.posterMediaLibrary,t.posterAnoterSource,t.posterUrl,t.width,t.height,t.responsive,t.autoplay,t.loop,t.muted,t.controls,t.playsInline,Object(i.a)(e)),r=n.outerHTML,o={__html:r};return wp.element.createElement(React.Fragment,null,wp.element.createElement("div",{dangerouslySetInnerHTML:o}))}})},function(e,t){},function(e,t){},function(e,t,n){"use strict";var r=wp.components,o=(r.G,r.Path,r.SVG);t.a=wp.element.createElement(o,{xmlns:"http://www.w3.org/2000/svg",xlinkHref:"http://www.w3.org/1999/xlink",viewBox:"0 0 294 336",class:"swarmify-play-button"},wp.element.createElement("defs",null,wp.element.createElement("path",{id:"h",fill:"#000000",d:"M158 0l136.83 79v158L158 316 21.168 237V79z"}),wp.element.createElement("path",{id:"t",d:"M53.499 7.951l51.961 90H1.539z"})),wp.element.createElement("g",{"stroke-linejoin":"round","fill-rule":"evenodd","stroke-linecap":"round"},wp.element.createElement("g",{id:"hex",transform:"translate(-11 10)"},wp.element.createElement("use",{xlinkHref:"#h",height:"100%",width:"100%"}),wp.element.createElement("path",{"stroke-width":"10",fill:"#ffde17",d:"M158-5.774l141.83 81.888v163.77L158 321.774l-141.83-81.88V76.124L158-5.77z"})),wp.element.createElement("g",{transform:"rotate(-30 289.199 -57.894)",id:"tri"},wp.element.createElement("use",{xlinkHref:"#t",height:"100%",width:"100%"}),wp.element.createElement("path",{"stroke-width":"4",fill:"#323232",d:"M53.499 3.951l55.424 96H-1.927l55.429-96z"}))))},function(e,t,n){"use strict";function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function l(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}function a(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var i=n(0),s=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),u=wp.components,p=u.Button,c=u.PanelBody,d=(u.Disabled,u.SelectControl),m=u.ToggleControl,b=u.TextControl,h=u.withNotices,f=wp.editor,w=f.InspectorControls,v=(f.MediaPlaceholder,f.MediaUpload),y=f.MediaUploadCheck,g=wp.element,E=g.Component,k=g.createRef,C=wp.i18n,__=C.__,A=(C.sprintf,wp.compose),_=A.compose,M=A.withInstanceId,S=wp.data.withSelect,V=function(e){function t(){o(this,t);var e=l(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments));return e.containerRef=k(),e.container=null,e}return a(t,e),s(t,[{key:"componentDidUpdate",value:function(e){if(e.attributes!==this.props.attributes){for(var t=this.container;t.firstChild;)t.removeChild(t.firstChild);var n=Object(i.a)(this.props);t.append(n)}}},{key:"componentDidMount",value:function(){this.container=this.containerRef.current;var e=Object(i.a)(this.props);this.container.append(e)}},{key:"setAttributeVal",value:function(e){var t=this;return function(n){t.props.setAttributes(r({},e,n))}}},{key:"render",value:function(){var e=this.props.attributes,t=e.autoplay,n=e.muted,r=e.loop,o=e.width,l=e.height,a=e.controls,i=e.playsInline,s=e.responsive,u=e.poster,h=e.posterMediaLibrary,f=e.posterId,g=e.posterAnoterSource,E=(e.posterUrl,e.source),k=e.videoInternalUrl,C=e.videoId,A=e.anotherSource,_=e.youtube,M=e.vimeo,S=(e.smartvideoEmbedLink,this.props.setAttributes),V=["video"],I=["image"],L=function(e){S({videoInternalUrl:e.url,smartvideoEmbedLink:e.url,videoId:e.id})},O=function(e){var t=/^.*((youtu.be\/)|(v\/)|(\/u\/\w\/)|(embed\/)|(watch\?))\??v?=?([^#\&\?]*).*/,n=e.match(t);return!(!n||11!=n[7].length)&&n[7]},x=function(e){S({vimeo:e}),S({smartvideoEmbedLink:e})},U=function(e){var t="https://www.youtube.com/embed/"+O(e);S({youtube:e}),S({smartvideoEmbedLink:t})},P=function(e){S({anotherSource:e}),S({smartvideoEmbedLink:e})},j=function(e){S({posterMediaLibrary:e.url,posterId:e.id,posterUrl:e.url})},T=function(e){S({posterAnoterSource:e,posterUrl:e})};return wp.element.createElement(React.Fragment,null,wp.element.createElement(w,null,wp.element.createElement(c,{title:__("Video")},wp.element.createElement(d,{label:__("Source"),value:E,onChange:this.setAttributeVal("source"),options:[{value:"media_library",label:__("Media library")},{value:"youtube",label:__("YouTube")},{value:"vimeo",label:__("Vimeo")},{value:"another_source",label:__("Another source")}]}),"media_library"===E&&wp.element.createElement(y,null,wp.element.createElement(v,{onSelect:L,allowedTypes:V,value:C,render:function(e){var t=e.open;return wp.element.createElement(p,{isDefault:!0,onClick:t},__(k?"Replace video":"Select video"))}})),"youtube"===E&&wp.element.createElement(b,{label:"YouTube link",value:_,onChange:U}),"vimeo"===E&&wp.element.createElement(b,{label:"Vimeo link",value:M,onChange:x}),"another_source"===E&&wp.element.createElement(b,{label:"Video Url",value:A,onChange:P})),wp.element.createElement(c,{title:__("Poster"),initialOpen:!1},wp.element.createElement(d,{label:__("Source"),value:u,onChange:this.setAttributeVal("poster"),options:[{value:"media_library",label:__("Media library")},{value:"another_source",label:__("Another source")},{value:"none",label:__("None")}]}),"media_library"===u&&wp.element.createElement(y,null,wp.element.createElement(v,{onSelect:j,allowedTypes:I,value:f,render:function(e){var t=e.open;return wp.element.createElement(p,{isDefault:!0,onClick:t},__(h?"Replace image":"Select poster image"))}})),"another_source"===u&&wp.element.createElement(b,{label:"Poster Url",value:g,onChange:T})),wp.element.createElement(c,{title:__("Basic options"),initialOpen:!1},wp.element.createElement(b,{label:__("Width"),value:o,onChange:this.setAttributeVal("width")}),wp.element.createElement(b,{label:__("Height"),value:l,onChange:this.setAttributeVal("height")}),wp.element.createElement(m,{label:__("Autoplay"),onChange:this.setAttributeVal("autoplay"),checked:t}),wp.element.createElement(m,{label:__("Muted"),onChange:this.setAttributeVal("muted"),checked:n}),wp.element.createElement(m,{label:__("Loop"),onChange:this.setAttributeVal("loop"),checked:r})),wp.element.createElement(c,{title:__("Advanced options"),initialOpen:!1},wp.element.createElement(m,{label:__("Controls"),onChange:this.setAttributeVal("controls"),checked:a}),wp.element.createElement(m,{label:__("Play inline"),onChange:this.setAttributeVal("playsInline"),checked:i}),wp.element.createElement(m,{label:__("Responsive"),onChange:this.setAttributeVal("responsive"),checked:s}))),wp.element.createElement("div",{ref:this.containerRef}))}}]),t}(E);t.a=_([S(function(e){return{mediaUpload:(0,e("core/block-editor").getSettings)().__experimentalMediaUpload}}),h,M])(V)}]);
     1!function(e){function t(r){if(n[r])return n[r].exports;var o=n[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,t),o.l=!0,o.exports}var n={};t.m=e,t.c=n,t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:r})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=1)}([function(e,t,n){"use strict";function r(e){var t=e.attributes,n=t.smartvideoEmbedLink,r=t.poster,o=(t.posterMediaLibrary,t.posterAnoterSource,t.posterUrl),l=t.width,a=t.height,i=t.responsive,s=t.autoplay,u=t.loop,p=t.muted,c=t.controls,d=t.playsInline,m=i?"swarm-fluid":"",b=document.createElement("smartvideo");return b.setAttribute("src",n),b.setAttribute("width",l),b.setAttribute("height",a),"none"!==r&&b.setAttribute("poster",o),b.setAttribute("class",m),s&&b.setAttribute("autoplay",""),p&&b.setAttribute("muted",""),u&&b.setAttribute("loop",""),c&&b.setAttribute("controls",""),d&&b.setAttribute("playsinline",""),b}t.a=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});n(2)},function(e,t,n){"use strict";var r=n(3),o=(n.n(r),n(4)),l=(n.n(o),n(5)),a=n(6),i=n(0),__=wp.i18n.__,s=wp.blocks.registerBlockType,u=wp.editor,p=(u.InspectorControls,u.MediaUpload,u.MediaUploadCheck,u.MediaPlaceholder,u.PlainText,wp.components);p.Button,p.PanelBody,p.ToggleControl,p.SelectControl,p.BaseControl,p.TextControl,wp.compose.withState,wp.element.createRef;s("smartvideo/block-smartvideo-guten",{title:__("SmartVideo"),description:__("SmartVideo makes building a beautiful, professional video experience for your site effortless."),icon:l.a,category:"common",keywords:[__("video"),__("smartvideo"),__("embed")],supports:{align:!0},attributes:{autoplay:{type:"boolean",default:!1},loop:{type:"boolean",default:!1},muted:{type:"boolean",default:!1},width:{type:"string",default:"1280"},height:{type:"string",default:"720"},controls:{type:"boolean",default:!0},playsInline:{type:"boolean",default:!1},responsive:{type:"boolean",default:!0},poster:{type:"string",default:"none"},posterId:{type:"number"},posterMediaLibrary:{type:"string"},posterAnoterSource:{type:"string"},posterUrl:{type:"string"},source:{type:"string",default:"media_library"},videoId:{type:"number"},videoInternalUrl:{type:"string"},youtube:{type:"string"},vimeo:{type:"string"},anotherSource:{type:"string"},smartvideoEmbedLink:{type:"string",default:"https://swarmify.com/wp-content/uploads/SmartVideoIntroMain.mp4"}},edit:a.a,save:function(e){var t=e.attributes,n=(t.smartvideoEmbedLink,t.poster,t.posterMediaLibrary,t.posterAnoterSource,t.posterUrl,t.width,t.height,t.responsive,t.autoplay,t.loop,t.muted,t.controls,t.playsInline,Object(i.a)(e)),r=n.outerHTML,o={__html:r};return wp.element.createElement(React.Fragment,null,wp.element.createElement("div",{dangerouslySetInnerHTML:o}))}})},function(e,t){},function(e,t){},function(e,t,n){"use strict";var r=wp.components,o=(r.G,r.Path,r.SVG);t.a=wp.element.createElement(o,{xmlns:"http://www.w3.org/2000/svg",xlinkHref:"http://www.w3.org/1999/xlink",viewBox:"0 0 294 336",class:"swarmify-play-button"},wp.element.createElement("defs",null,wp.element.createElement("path",{id:"h",fill:"#000000",d:"M158 0l136.83 79v158L158 316 21.168 237V79z"}),wp.element.createElement("path",{id:"t",d:"M53.499 7.951l51.961 90H1.539z"})),wp.element.createElement("g",{"stroke-linejoin":"round","fill-rule":"evenodd","stroke-linecap":"round"},wp.element.createElement("g",{id:"hex",transform:"translate(-11 10)"},wp.element.createElement("use",{xlinkHref:"#h",height:"100%",width:"100%"}),wp.element.createElement("path",{"stroke-width":"10",fill:"#ffde17",d:"M158-5.774l141.83 81.888v163.77L158 321.774l-141.83-81.88V76.124L158-5.77z"})),wp.element.createElement("g",{transform:"rotate(-30 289.199 -57.894)",id:"tri"},wp.element.createElement("use",{xlinkHref:"#t",height:"100%",width:"100%"}),wp.element.createElement("path",{"stroke-width":"4",fill:"#323232",d:"M53.499 3.951l55.424 96H-1.927l55.429-96z"}))))},function(e,t,n){"use strict";function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function l(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}function a(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var i=n(0),s=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),u=wp.components,p=u.Button,c=u.PanelBody,d=(u.Disabled,u.SelectControl),m=u.ToggleControl,b=u.TextControl,h=u.withNotices,f=wp.editor,w=f.InspectorControls,v=(f.MediaPlaceholder,f.MediaUpload),y=f.MediaUploadCheck,g=wp.element,E=g.Component,k=g.createRef,C=wp.i18n,__=C.__,A=(C.sprintf,wp.compose),_=A.compose,S=A.withInstanceId,M=wp.data.withSelect,V=function(e){function t(){o(this,t);var e=l(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments));return e.containerRef=k(),e.container=null,e}return a(t,e),s(t,[{key:"componentDidUpdate",value:function(e){if(e.attributes!==this.props.attributes){for(var t=this.container;t.firstChild;)t.removeChild(t.firstChild);var n=Object(i.a)(this.props);t.append(n)}}},{key:"componentDidMount",value:function(){this.container=this.containerRef.current;var e=Object(i.a)(this.props);this.container.append(e)}},{key:"setAttributeVal",value:function(e){var t=this;return function(n){t.props.setAttributes(r({},e,n))}}},{key:"render",value:function(){var e=this.props.attributes,t=e.autoplay,n=e.muted,r=e.loop,o=e.width,l=e.height,a=e.controls,i=e.playsInline,s=e.responsive,u=e.poster,h=e.posterMediaLibrary,f=e.posterId,g=e.posterAnoterSource,E=(e.posterUrl,e.source),k=e.videoInternalUrl,C=e.videoId,A=e.anotherSource,_=e.youtube,S=e.vimeo,M=e.smartvideoEmbedLink,V=this.props.setAttributes;"another_source"!==E||A||V({anotherSource:M});var I=["video"],L=["image"],O=function(e){V({videoInternalUrl:e.url,smartvideoEmbedLink:e.url,videoId:e.id})},x=function(e){var t=/^.*((youtu.be\/)|(v\/)|(\/u\/\w\/)|(embed\/)|(watch\?))\??v?=?([^#\&\?]*).*/,n=e.match(t);return!(!n||11!=n[7].length)&&n[7]},U=function(e){V({vimeo:e}),V({smartvideoEmbedLink:e})},P=function(e){var t="https://www.youtube.com/embed/"+x(e);V({youtube:e}),V({smartvideoEmbedLink:t})},j=function(e){V({anotherSource:e}),V({smartvideoEmbedLink:e})},T=function(e){V({posterMediaLibrary:e.url,posterId:e.id,posterUrl:e.url})},R=function(e){V({posterAnoterSource:e,posterUrl:e})};return wp.element.createElement(React.Fragment,null,wp.element.createElement(w,null,wp.element.createElement(c,{title:__("Video")},wp.element.createElement(d,{label:__("Source"),value:E,onChange:this.setAttributeVal("source"),options:[{value:"media_library",label:__("Media library")},{value:"youtube",label:__("YouTube")},{value:"vimeo",label:__("Vimeo")},{value:"another_source",label:__("Another source")}]}),"media_library"===E&&wp.element.createElement(y,null,wp.element.createElement(v,{onSelect:O,allowedTypes:I,value:C,render:function(e){var t=e.open;return wp.element.createElement(p,{isDefault:!0,onClick:t},__(k?"Replace video":"Select video"))}})),"youtube"===E&&wp.element.createElement(b,{label:"YouTube link",value:_,onChange:P}),"vimeo"===E&&wp.element.createElement(b,{label:"Vimeo link",value:S,onChange:U}),"another_source"===E&&wp.element.createElement(b,{label:"Video Url",value:A,onChange:j})),wp.element.createElement(c,{title:__("Poster"),initialOpen:!1},wp.element.createElement(d,{label:__("Source"),value:u,onChange:this.setAttributeVal("poster"),options:[{value:"media_library",label:__("Media library")},{value:"another_source",label:__("Another source")},{value:"none",label:__("None")}]}),"media_library"===u&&wp.element.createElement(y,null,wp.element.createElement(v,{onSelect:T,allowedTypes:L,value:f,render:function(e){var t=e.open;return wp.element.createElement(p,{isDefault:!0,onClick:t},__(h?"Replace image":"Select poster image"))}})),"another_source"===u&&wp.element.createElement(b,{label:"Poster Url",value:g,onChange:R})),wp.element.createElement(c,{title:__("Basic options"),initialOpen:!1},wp.element.createElement(b,{label:__("Width"),value:o,onChange:this.setAttributeVal("width")}),wp.element.createElement(b,{label:__("Height"),value:l,onChange:this.setAttributeVal("height")}),wp.element.createElement(m,{label:__("Autoplay"),onChange:this.setAttributeVal("autoplay"),checked:t}),wp.element.createElement(m,{label:__("Muted"),onChange:this.setAttributeVal("muted"),checked:n}),wp.element.createElement(m,{label:__("Loop"),onChange:this.setAttributeVal("loop"),checked:r})),wp.element.createElement(c,{title:__("Advanced options"),initialOpen:!1},wp.element.createElement(m,{label:__("Controls"),onChange:this.setAttributeVal("controls"),checked:a}),wp.element.createElement(m,{label:__("Play inline"),onChange:this.setAttributeVal("playsInline"),checked:i}),wp.element.createElement(m,{label:__("Responsive"),onChange:this.setAttributeVal("responsive"),checked:s}))),wp.element.createElement("div",{ref:this.containerRef}))}}]),t}(E);t.a=_([M(function(e){return{mediaUpload:(0,e("core/block-editor").getSettings)().__experimentalMediaUpload}}),h,S])(V)}]);
  • smartvideo/trunk/page-builders/gutenberg/src/block/block.js

    r2161602 r2373353  
    120120            type: "string",
    121121        },
     122        anotherSource: {
     123            type: "string",
     124        },
    122125        smartvideoEmbedLink: {
    123126            type: "string",
  • smartvideo/trunk/page-builders/gutenberg/src/block/edit.js

    r2197719 r2373353  
    108108        const posterVal = 'none' !== poster ? posterUrl : '';
    109109
     110        // Fix for non-storage of 'anotherSource'
     111        if ( 'another_source' === source &&
     112            ! anotherSource ) {
     113            setAttributes( { anotherSource: smartvideoEmbedLink } );               
     114        }
     115
    110116        // define supported media upload
    111117        const ALLOWED_MEDIA_TYPES = [ 'video' ];
Note: See TracChangeset for help on using the changeset viewer.