1 line
1.3 KiB
JavaScript
1 line
1.3 KiB
JavaScript
|
|
"use strict";var e=function(){function e(e,t){for(var r in t){var n=t[r];n.configurable=!0,n.value&&(n.writable=!0)}Object.defineProperties(e,t)}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),t=function a(e,t,r){var n=Object.getOwnPropertyDescriptor(e,t);if(void 0===n){var o=Object.getPrototypeOf(e);return null===o?void 0:a(o,t,r)}if("value"in n&&n.writable)return n.value;var i=n.get;if(void 0!==i)return i.call(r)},r=function(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&&(e.__proto__=t)},n=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},o=require("../layer").EventBaseLayer,i={layerType:"Audio Event",properties:{AudioEvent:{type:"audio",defaultValue:{file:""}}}},u=function(o){function u(){n(this,u),t(Object.getPrototypeOf(u.prototype),"constructor",this).call(this)}return r(u,o),e(u,null,{getInfo:{value:function(){return i}},generateEvent:{value:function(e){var t={name:"play-audio",payload:{file:e.AudioEvent.file}};return t}},isValid:{value:function(e){return"play-audio"===e.name&&e.payload.file.length>0}}}),u}(o);module.exports=u;
|