@playkit-js/live-asl
Version:
Live ASL plugin for Kaltura V7 player - enables switching between main and ASL live streams
3 lines • 32 kB
JavaScript
/*! For license information please see playkit-live-asl.js.LICENSE.txt */
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define("KalturaPlayer",[],e):"object"==typeof exports?exports.KalturaPlayer=e():(t.KalturaPlayer=t.KalturaPlayer||{},t.KalturaPlayer.plugins=t.KalturaPlayer.plugins||{},t.KalturaPlayer.plugins.liveASL=e())}(self,(()=>(()=>{var t={470:(t,e,n)=>{"use strict";n.d(e,{HV:()=>s,ZP:()=>p,Zd:()=>c,cT:()=>u,ip:()=>l});var r=n(537),o=n.n(r),i=n(645),a=n.n(i)()(o());a.push([t.id,".playkit-plx-aslToggle{position:absolute;bottom:60px;right:16px;display:flex;align-items:center;gap:8px;padding:8px 12px;background:rgba(0,0,0,.7);border-radius:6px;color:#fff;cursor:pointer;font-size:14px;font-weight:500;transition:all .2s ease;z-index:1000;user-select:none}.playkit-plx-aslToggle:hover{background:rgba(0,0,0,.8);transform:translateY(-2px)}.playkit-plx-aslToggle:focus{outline:2px solid #007bff;outline-offset:2px}.playkit-plx-aslToggle:active{transform:translateY(0)}.playkit-plx-aslIcon{display:flex;align-items:center;justify-content:center;width:24px;height:24px}.playkit-plx-aslIcon svg{width:100%;height:100%}.playkit-plx-aslText{white-space:nowrap}.playkit-plx-aslActive{background:rgba(0,123,255,.8)}.playkit-plx-aslActive:hover{background:rgba(0,123,255,.9)}@media(max-width: 280px){.playkit-plx-aslText{display:none}.playkit-plx-aslToggle{padding:8px;min-width:40px;justify-content:center}}.playkit-plx-aslToggle[data-position=bottom-left]{left:16px;right:auto}.playkit-plx-aslToggle[data-position=top-right]{top:16px;bottom:auto}.playkit-plx-aslToggle[data-position=top-left]{top:16px;left:16px;right:auto;bottom:auto}","",{version:3,sources:["webpack://./src/ui/asl-toggle/asl-toggle.component.scss"],names:[],mappings:"AAAA,uBACE,iBAAA,CACA,WAAA,CACA,UAAA,CACA,YAAA,CACA,kBAAA,CACA,OAAA,CACA,gBAAA,CACA,yBAAA,CACA,iBAAA,CACA,UAAA,CACA,cAAA,CACA,cAAA,CACA,eAAA,CACA,uBAAA,CACA,YAAA,CACA,gBAAA,CAEA,6BACE,yBAAA,CACA,0BAAA,CAGF,6BACE,yBAAA,CACA,kBAAA,CAGF,8BACE,uBAAA,CAIJ,qBACE,YAAA,CACA,kBAAA,CACA,sBAAA,CACA,UAAA,CACA,WAAA,CAEA,yBACE,UAAA,CACA,WAAA,CAIJ,qBACE,kBAAA,CAGF,uBACE,6BAAA,CAEA,6BACE,6BAAA,CAKJ,yBACE,qBACE,YAAA,CAGF,uBACE,WAAA,CACA,cAAA,CACA,sBAAA,CAAA,CAKJ,kDACE,SAAA,CACA,UAAA,CAGF,gDACE,QAAA,CACA,WAAA,CAGF,+CACE,QAAA,CACA,SAAA,CACA,UAAA,CACA,WAAA",sourcesContent:['.aslToggle {\n position: absolute;\n bottom: 60px;\n right: 16px;\n display: flex;\n align-items: center;\n gap: 8px;\n padding: 8px 12px;\n background: rgba(0, 0, 0, 0.7);\n border-radius: 6px;\n color: white;\n cursor: pointer;\n font-size: 14px;\n font-weight: 500;\n transition: all 0.2s ease;\n z-index: 1000;\n user-select: none;\n \n &:hover {\n background: rgba(0, 0, 0, 0.8);\n transform: translateY(-2px);\n }\n \n &:focus {\n outline: 2px solid #007bff;\n outline-offset: 2px;\n }\n \n &:active {\n transform: translateY(0);\n }\n}\n\n.aslIcon {\n display: flex;\n align-items: center;\n justify-content: center;\n width: 24px;\n height: 24px;\n \n svg {\n width: 100%;\n height: 100%;\n }\n}\n\n.aslText {\n white-space: nowrap;\n}\n\n.aslActive {\n background: rgba(0, 123, 255, 0.8);\n \n &:hover {\n background: rgba(0, 123, 255, 0.9);\n }\n}\n\n// Responsive design - hide text on small screens\n@media (max-width: 280px) {\n .aslText {\n display: none;\n }\n \n .aslToggle {\n padding: 8px;\n min-width: 40px;\n justify-content: center;\n }\n}\n\n// Position variants\n.aslToggle[data-position="bottom-left"] {\n left: 16px;\n right: auto;\n}\n\n.aslToggle[data-position="top-right"] {\n top: 16px;\n bottom: auto;\n}\n\n.aslToggle[data-position="top-left"] {\n top: 16px;\n left: 16px;\n right: auto;\n bottom: auto;\n}\n'],sourceRoot:""}]);var s="playkit-plx-aslToggle",l="playkit-plx-aslIcon",c="playkit-plx-aslText",u="playkit-plx-aslActive";const p=a},645:t=>{"use strict";t.exports=function(t){var e=[];return e.toString=function(){return this.map((function(e){var n="",r=void 0!==e[5];return e[4]&&(n+="@supports (".concat(e[4],") {")),e[2]&&(n+="@media ".concat(e[2]," {")),r&&(n+="@layer".concat(e[5].length>0?" ".concat(e[5]):""," {")),n+=t(e),r&&(n+="}"),e[2]&&(n+="}"),e[4]&&(n+="}"),n})).join("")},e.i=function(t,n,r,o,i){"string"==typeof t&&(t=[[null,t,void 0]]);var a={};if(r)for(var s=0;s<this.length;s++){var l=this[s][0];null!=l&&(a[l]=!0)}for(var c=0;c<t.length;c++){var u=[].concat(t[c]);r&&a[u[0]]||(void 0!==i&&(void 0===u[5]||(u[1]="@layer".concat(u[5].length>0?" ".concat(u[5]):""," {").concat(u[1],"}")),u[5]=i),n&&(u[2]?(u[1]="@media ".concat(u[2]," {").concat(u[1],"}"),u[2]=n):u[2]=n),o&&(u[4]?(u[1]="@supports (".concat(u[4],") {").concat(u[1],"}"),u[4]=o):u[4]="".concat(o)),e.push(u))}},e}},537:t=>{"use strict";t.exports=function(t){var e=t[1],n=t[3];if(!n)return e;if("function"==typeof btoa){var r=btoa(unescape(encodeURIComponent(JSON.stringify(n)))),o="sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(r),i="/*# ".concat(o," */");return[e].concat([i]).join("\n")}return[e].join("\n")}},379:t=>{"use strict";var e=[];function n(t){for(var n=-1,r=0;r<e.length;r++)if(e[r].identifier===t){n=r;break}return n}function r(t,r){for(var i={},a=[],s=0;s<t.length;s++){var l=t[s],c=r.base?l[0]+r.base:l[0],u=i[c]||0,p="".concat(c," ").concat(u);i[c]=u+1;var f=n(p),h={css:l[1],media:l[2],sourceMap:l[3],supports:l[4],layer:l[5]};if(-1!==f)e[f].references++,e[f].updater(h);else{var g=o(h,r);r.byIndex=s,e.splice(s,0,{identifier:p,updater:g,references:1})}a.push(p)}return a}function o(t,e){var n=e.domAPI(e);return n.update(t),function(e){if(e){if(e.css===t.css&&e.media===t.media&&e.sourceMap===t.sourceMap&&e.supports===t.supports&&e.layer===t.layer)return;n.update(t=e)}else n.remove()}}t.exports=function(t,o){var i=r(t=t||[],o=o||{});return function(t){t=t||[];for(var a=0;a<i.length;a++){var s=n(i[a]);e[s].references--}for(var l=r(t,o),c=0;c<i.length;c++){var u=n(i[c]);0===e[u].references&&(e[u].updater(),e.splice(u,1))}i=l}}},569:t=>{"use strict";var e={};t.exports=function(t,n){var r=function(t){if(void 0===e[t]){var n=document.querySelector(t);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(t){n=null}e[t]=n}return e[t]}(t);if(!r)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");r.appendChild(n)}},216:t=>{"use strict";t.exports=function(t){var e=document.createElement("style");return t.setAttributes(e,t.attributes),t.insert(e,t.options),e}},575:t=>{"use strict";t.exports=function(t,e){Object.keys(e).forEach((function(n){t.setAttribute(n,e[n])}))}},37:t=>{"use strict";var e,n=(e=[],function(t,n){return e[t]=n,e.filter(Boolean).join("\n")});function r(t,e,r,o){var i;if(r)i="";else{i="",o.supports&&(i+="@supports (".concat(o.supports,") {")),o.media&&(i+="@media ".concat(o.media," {"));var a=void 0!==o.layer;a&&(i+="@layer".concat(o.layer.length>0?" ".concat(o.layer):""," {")),i+=o.css,a&&(i+="}"),o.media&&(i+="}"),o.supports&&(i+="}")}if(t.styleSheet)t.styleSheet.cssText=n(e,i);else{var s=document.createTextNode(i),l=t.childNodes;l[e]&&t.removeChild(l[e]),l.length?t.insertBefore(s,l[e]):t.appendChild(s)}}var o={singleton:null,singletonCounter:0};t.exports=function(t){if("undefined"==typeof document)return{update:function(){},remove:function(){}};var e=o.singletonCounter++,n=o.singleton||(o.singleton=t.insertStyleElement(t));return{update:function(t){r(n,e,!1,t)},remove:function(t){r(n,e,!0,t)}}}},61:(t,e,n)=>{var r=n(698).default;function o(){"use strict";t.exports=o=function(){return n},t.exports.__esModule=!0,t.exports.default=t.exports;var e,n={},i=Object.prototype,a=i.hasOwnProperty,s=Object.defineProperty||function(t,e,n){t[e]=n.value},l="function"==typeof Symbol?Symbol:{},c=l.iterator||"@@iterator",u=l.asyncIterator||"@@asyncIterator",p=l.toStringTag||"@@toStringTag";function f(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{f({},"")}catch(e){f=function(t,e,n){return t[e]=n}}function h(t,e,n,r){var o=e&&e.prototype instanceof b?e:b,i=Object.create(o.prototype),a=new B(r||[]);return s(i,"_invoke",{value:P(t,n,a)}),i}function g(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}n.wrap=h;var d="suspendedStart",y="suspendedYield",A="executing",v="completed",m={};function b(){}function L(){}function x(){}var S={};f(S,c,(function(){return this}));var w=Object.getPrototypeOf,C=w&&w(w(O([])));C&&C!==i&&a.call(C,c)&&(S=C);var k=x.prototype=b.prototype=Object.create(S);function E(t){["next","throw","return"].forEach((function(e){f(t,e,(function(t){return this._invoke(e,t)}))}))}function T(t,e){function n(o,i,s,l){var c=g(t[o],t,i);if("throw"!==c.type){var u=c.arg,p=u.value;return p&&"object"==r(p)&&a.call(p,"__await")?e.resolve(p.__await).then((function(t){n("next",t,s,l)}),(function(t){n("throw",t,s,l)})):e.resolve(p).then((function(t){u.value=t,s(u)}),(function(t){return n("throw",t,s,l)}))}l(c.arg)}var o;s(this,"_invoke",{value:function(t,r){function i(){return new e((function(e,o){n(t,r,e,o)}))}return o=o?o.then(i,i):i()}})}function P(t,n,r){var o=d;return function(i,a){if(o===A)throw new Error("Generator is already running");if(o===v){if("throw"===i)throw a;return{value:e,done:!0}}for(r.method=i,r.arg=a;;){var s=r.delegate;if(s){var l=I(s,r);if(l){if(l===m)continue;return l}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(o===d)throw o=v,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);o=A;var c=g(t,n,r);if("normal"===c.type){if(o=r.done?v:y,c.arg===m)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(o=v,r.method="throw",r.arg=c.arg)}}}function I(t,n){var r=n.method,o=t.iterator[r];if(o===e)return n.delegate=null,"throw"===r&&t.iterator.return&&(n.method="return",n.arg=e,I(t,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),m;var i=g(o,t.iterator,n.arg);if("throw"===i.type)return n.method="throw",n.arg=i.arg,n.delegate=null,m;var a=i.arg;return a?a.done?(n[t.resultName]=a.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,m):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,m)}function j(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function M(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function B(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(j,this),this.reset(!0)}function O(t){if(t||""===t){var n=t[c];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,i=function n(){for(;++o<t.length;)if(a.call(t,o))return n.value=t[o],n.done=!1,n;return n.value=e,n.done=!0,n};return i.next=i}}throw new TypeError(r(t)+" is not iterable")}return L.prototype=x,s(k,"constructor",{value:x,configurable:!0}),s(x,"constructor",{value:L,configurable:!0}),L.displayName=f(x,p,"GeneratorFunction"),n.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===L||"GeneratorFunction"===(e.displayName||e.name))},n.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,x):(t.__proto__=x,f(t,p,"GeneratorFunction")),t.prototype=Object.create(k),t},n.awrap=function(t){return{__await:t}},E(T.prototype),f(T.prototype,u,(function(){return this})),n.AsyncIterator=T,n.async=function(t,e,r,o,i){void 0===i&&(i=Promise);var a=new T(h(t,e,r,o),i);return n.isGeneratorFunction(e)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},E(k),f(k,p,"Generator"),f(k,c,(function(){return this})),f(k,"toString",(function(){return"[object Generator]"})),n.keys=function(t){var e=Object(t),n=[];for(var r in e)n.push(r);return n.reverse(),function t(){for(;n.length;){var r=n.pop();if(r in e)return t.value=r,t.done=!1,t}return t.done=!0,t}},n.values=O,B.prototype={constructor:B,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(M),!t)for(var n in this)"t"===n.charAt(0)&&a.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=e)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var n=this;function r(r,o){return s.type="throw",s.arg=t,n.next=r,o&&(n.method="next",n.arg=e),!!o}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],s=i.completion;if("root"===i.tryLoc)return r("end");if(i.tryLoc<=this.prev){var l=a.call(i,"catchLoc"),c=a.call(i,"finallyLoc");if(l&&c){if(this.prev<i.catchLoc)return r(i.catchLoc,!0);if(this.prev<i.finallyLoc)return r(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return r(i.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return r(i.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&a.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var o=r;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=t,i.arg=e,o?(this.method="next",this.next=o.finallyLoc,m):this.complete(i)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),m},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),M(n),m}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var o=r.arg;M(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:O(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),m}},n}t.exports=o,t.exports.__esModule=!0,t.exports.default=t.exports},698:t=>{function e(n){return t.exports=e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},t.exports.__esModule=!0,t.exports.default=t.exports,e(n)}t.exports=e,t.exports.__esModule=!0,t.exports.default=t.exports},687:(t,e,n)=>{var r=n(61)();t.exports=r;try{regeneratorRuntime=r}catch(t){"object"==typeof globalThis?globalThis.regeneratorRuntime=r:Function("r","regeneratorRuntime = r")(r)}}},e={};function n(r){var o=e[r];if(void 0!==o)return o.exports;var i=e[r]={id:r,exports:{}};return t[r](i,i.exports,n),i.exports}n.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return n.d(e,{a:e}),e},n.d=(t,e)=>{for(var r in e)n.o(e,r)&&!n.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var r={};return(()=>{"use strict";n.r(r);const t=KalturaPlayer;function e(t,e,n,r,o,i,a){try{var s=t[i](a),l=s.value}catch(t){return void n(t)}s.done?e(l):Promise.resolve(l).then(r,o)}function o(t){return function(){var n=this,r=arguments;return new Promise((function(o,i){var a=t.apply(n,r);function s(t){e(a,o,i,s,l,"next",t)}function l(t){e(a,o,i,s,l,"throw",t)}s(void 0)}))}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function a(t){return a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},a(t)}function s(t){var e=function(t,e){if("object"!=a(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,"string");if("object"!=a(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==a(e)?e:String(e)}function l(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,s(r.key),r)}}function c(t,e,n){return e&&l(t.prototype,e),n&&l(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function u(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function p(t,e){if(e&&("object"===a(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return u(t)}function f(t){return f=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},f(t)}function h(){return h="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=f(t)););return t}(t,e);if(r){var o=Object.getOwnPropertyDescriptor(r,e);return o.get?o.get.call(arguments.length<3?t:n):o.value}},h.apply(this,arguments)}function g(t,e){return g=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},g(t,e)}function d(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&g(t,e)}function y(t,e,n){return(e=s(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var A=n(687),v=n.n(A);const m=KalturaPlayer.ui.preact;var b=n(379),L=n.n(b),x=n(37),S=n.n(x),w=n(569),C=n.n(w),k=n(575),E=n.n(k),T=n(216),P=n.n(T),I=n(470),j={attributes:{id:"@playkit-js/live-asl"}};function M(t,e,n){return e=f(e),p(t,B()?Reflect.construct(e,n||[],f(t).constructor):e.apply(t,n))}function B(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(B=function(){return!!t})()}j.setAttributes=E(),j.insert=C().bind(null,"head"),j.domAPI=S(),j.insertStyleElement=P(),L()(I.ZP,j),I.ZP&&I.ZP.locals&&I.ZP.locals;var O=function(){return(0,m.h)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",width:"24",height:"24",fill:"currentColor","aria-hidden":"true",focusable:"false"},(0,m.h)("g",{transform:"translate(0,512) scale(0.1,-0.1)"},(0,m.h)("path",{d:"M1790 5097 c-168 -57 -285 -178 -334 -346 -14 -48 -16 -172 -16\n-1090 -1 -921 -3 -1034 -16 -1016 -8 11 -47 70 -87 130 -95 147 -269 323 -382\n389 -44 26 -116 58 -160 73 -108 35 -288 37 -410 4 -103 -27 -225 -88 -301\n-149 -103 -84 -107 -123 -18 -242 74 -99 252 -365 348 -518 244 -391 494 -883\n670 -1321 113 -279 176 -382 320 -526 242 -242 586 -387 1068 -449 328 -43\n999 -47 1222 -7 207 37 408 115 570 222 105 70 269 228 346 336 116 164 215\n397 259 613 40 194 41 249 41 1683 0 1537 4 1430 -62 1562 -91 179 -320 291\n-525 256 -218 -38 -392 -214 -423 -428 -5 -37 -10 -254 -10 -481 l0 -412 -37\n23 c-195 123 -464 93 -623 -68 l-53 -54 -63 59 c-110 102 -243 148 -393 137\n-78 -6 -166 -33 -228 -69 l-33 -20 0 599 c0 329 -4 635 -10 680 -24 212 -171\n385 -374 439 -80 22 -209 18 -286 -9z m285 -211 c58 -27 118 -84 148 -141 l22\n-40 5 -1430 5 -1430 23 -65 c32 -88 72 -149 141 -213 61 -56 142 -100 214\n-117 74 -17 218 -12 289 10 79 24 173 84 218 138 l34 40 52 -53 c99 -100 210\n-145 358 -145 149 0 255 40 354 133 58 55 91 105 125 190 l22 52 5 1225 5\n1225 22 48 c37 80 78 123 151 159 128 63 265 38 360 -67 89 -97 82 26 82\n-1534 0 -878 -4 -1407 -10 -1461 -33 -270 -109 -490 -238 -685 -67 -100 -211\n-242 -317 -311 -149 -97 -306 -156 -500 -190 -193 -33 -860 -27 -1153 12 -329\n43 -600 133 -795 266 -87 59 -207 177 -265 261 -59 87 -89 144 -141 274 -236\n591 -543 1169 -914 1722 -149 220 -146 199 -32 251 119 55 270 66 389 30 243\n-76 498 -402 682 -874 30 -78 45 -103 69 -118 39 -24 90 -17 124 17 l26 25 5\n1303 c6 1460 -2 1332 81 1422 94 102 229 129 354 71z m818 -1631 c50 -21 123\n-89 150 -140 22 -40 22 -47 25 -635 2 -421 0 -607 -8 -636 -19 -68 -77 -134\n-150 -172 -62 -32 -69 -34 -155 -30 -107 4 -149 21 -216 88 -81 81 -79 62 -79\n734 l0 591 24 50 c29 64 113 140 175 160 57 18 180 13 234 -10z m834 -8 c28\n-15 69 -47 91 -72 74 -84 72 -67 72 -725 l0 -587 -31 -61 c-34 -69 -71 -104\n-144 -138 -61 -29 -176 -33 -247 -8 -56 19 -120 72 -153 127 -42 73 -46 145\n-43 723 3 532 3 540 25 587 40 87 104 146 186 173 65 21 182 12 244 -19z"})))},R=function(){return(0,m.h)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",width:"24",height:"24",fill:"currentColor","aria-hidden":"true"},(0,m.h)("g",{transform:"translate(0,512) scale(0.1,-0.1)"},(0,m.h)("path",{d:"M1790 5097 c-168 -57 -285 -178 -334 -346 -14 -48 -16 -172 -16\n-1090 -1 -921 -3 -1034 -16 -1016 -8 11 -47 70 -87 130 -95 147 -269 323 -382\n389 -44 26 -116 58 -160 73 -108 35 -288 37 -410 4 -103 -27 -225 -88 -301\n-149 -103 -84 -107 -123 -18 -242 74 -99 252 -365 348 -518 244 -391 494 -883\n670 -1321 113 -279 176 -382 320 -526 242 -242 586 -387 1068 -449 328 -43\n999 -47 1222 -7 207 37 408 115 570 222 105 70 269 228 346 336 116 164 215\n397 259 613 40 194 41 249 41 1683 0 1537 4 1430 -62 1562 -91 179 -320 291\n-525 256 -218 -38 -392 -214 -423 -428 -5 -37 -10 -254 -10 -481 l0 -412 -37\n23 c-195 123 -464 93 -623 -68 l-53 -54 -63 59 c-110 102 -243 148 -393 137\n-78 -6 -166 -33 -228 -69 l-33 -20 0 599 c0 329 -4 635 -10 680 -24 212 -171\n385 -374 439 -80 22 -209 18 -286 -9z m285 -211 c58 -27 118 -84 148 -141 l22\n-40 5 -1430 5 -1430 23 -65 c32 -88 72 -149 141 -213 61 -56 142 -100 214\n-117 74 -17 218 -12 289 10 79 24 173 84 218 138 l34 40 52 -53 c99 -100 210\n-145 358 -145 149 0 255 40 354 133 58 55 91 105 125 190 l22 52 5 1225 5\n1225 22 48 c37 80 78 123 151 159 128 63 265 38 360 -67 89 -97 82 26 82\n-1534 0 -878 -4 -1407 -10 -1461 -33 -270 -109 -490 -238 -685 -67 -100 -211\n-242 -317 -311 -149 -97 -306 -156 -500 -190 -193 -33 -860 -27 -1153 12 -329\n43 -600 133 -795 266 -87 59 -207 177 -265 261 -59 87 -89 144 -141 274 -236\n591 -543 1169 -914 1722 -149 220 -146 199 -32 251 119 55 270 66 389 30 243\n-76 498 -402 682 -874 30 -78 45 -103 69 -118 39 -24 90 -17 124 17 l26 25 5\n1303 c6 1460 -2 1332 81 1422 94 102 229 129 354 71z m818 -1631 c50 -21 123\n-89 150 -140 22 -40 22 -47 25 -635 2 -421 0 -607 -8 -636 -19 -68 -77 -134\n-150 -172 -62 -32 -69 -34 -155 -30 -107 4 -149 21 -216 88 -81 81 -79 62 -79\n734 l0 591 24 50 c29 64 113 140 175 160 57 18 180 13 234 -10z m834 -8 c28\n-15 69 -47 91 -72 74 -84 72 -67 72 -725 l0 -587 -31 -61 c-34 -69 -71 -104\n-144 -138 -61 -29 -176 -33 -247 -8 -56 19 -120 72 -153 127 -42 73 -46 145\n-43 723 3 532 3 540 25 587 40 87 104 146 186 173 65 21 182 12 244 -19z"})),(0,m.h)("line",{x1:"64",y1:"64",x2:"448",y2:"448",stroke:"currentColor","stroke-width":"48","stroke-linecap":"round"}))},_=function(t){function e(t){var n;return i(this,e),y(u(n=M(this,e,[t])),"handleClick",(function(){n.props.onToggle()})),y(u(n),"handleKeyDown",(function(t){"Enter"!==t.key&&" "!==t.key||(t.preventDefault(),n.props.onToggle())})),y(u(n),"getAltText",(function(){return n.state.isASLMode?"Hide ASL":"Switch to ASL"})),y(u(n),"getDisplayText",(function(){return n.state.isResponsive?"":n.state.isASLMode?"Hide ASL":"Switch to ASL"})),n.state={isASLMode:t.isASLMode,isASLLive:t.isASLLive,isResponsive:t.isResponsive},n}return d(e,t),c(e,[{key:"componentDidUpdate",value:function(t){t.isASLMode===this.props.isASLMode&&t.isASLLive===this.props.isASLLive&&t.isResponsive===this.props.isResponsive||this.setState({isASLMode:this.props.isASLMode,isASLLive:this.props.isASLLive,isResponsive:this.props.isResponsive})}},{key:"render",value:function(){return this.state.isASLLive?(0,m.h)("div",{className:"".concat(I.HV," ").concat(this.state.isASLMode?I.cT:""),onClick:this.handleClick,onKeyDown:this.handleKeyDown,tabIndex:0,role:"button","aria-label":this.getAltText(),title:this.getAltText()},(0,m.h)("div",{className:I.ip},this.state.isASLMode?(0,m.h)(R,null):(0,m.h)(O,null)),this.getDisplayText()&&(0,m.h)("span",{className:I.Zd},this.getDisplayText())):null}}]),e}(m.Component);function F(t,e,n){return e=f(e),p(t,D()?Reflect.construct(e,n||[],f(t).constructor):e.apply(t,n))}function D(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(D=function(){return!!t})()}var N=function(e){function n(t,e,r){var o;return i(this,n),y(u(o=F(this,n,[t,e,r])),"isASLMode",!1),y(u(o),"isASLLive",!1),y(u(o),"aslEntryId",null),y(u(o),"originalEntryId",null),y(u(o),"aslSources",null),y(u(o),"isResponsive",!1),y(u(o),"webcastFeatures",null),y(u(o),"aslToggleComponent",null),y(u(o),"aslToggleComponentRef",null),o.setupErrorHandling(),o}var r,a,s,l;return d(n,e),c(n,[{key:"setupErrorHandling",value:function(){var t=this;this.player.addEventListener("error",(function(e){t.logger.error("Live ASL Plugin: Player error occurred:",e)}))}},{key:"loadMedia",value:function(){var t;this.logger.info("Live ASL Plugin: loadMedia lifecycle hook called"),this.loadASLEntryId(),this.originalEntryId||this.isASLMode||(this.originalEntryId=(null===(t=this.player.sources)||void 0===t?void 0:t.id)||null),this.checkASLLiveStatus(),this.aslEntryId&&this.originalEntryId&&(this.aslToggleComponent?this.updateASLToggle():this.addASLToggle()),this.player._aslResponsiveSetup||(this.setupResponsiveBehavior(),this.player._aslResponsiveSetup=!0),this.preserveWebcastFeatures()}},{key:"loadASLEntryId",value:function(){var t;if(this.config.aslEntryId)return this.aslEntryId=this.config.aslEntryId,void this.logger.info("Live ASL Plugin: Found ASL entry ID from config:",this.aslEntryId);var e=window.kalturaPlayer,n=null==e||null===(t=e.config)||void 0===t||null===(t=t.plugins)||void 0===t?void 0:t["playkit-live-asl"];null!=n&&n.aslEntryId&&(this.aslEntryId=n.aslEntryId,this.logger.info("Live ASL Plugin: Found ASL entry ID from plugin config:",this.aslEntryId))}},{key:"checkASLLiveStatus",value:(l=o(v().mark((function t(){return v().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(this.aslEntryId){t.next=3;break}return this.logger.warn("Live ASL Plugin: No ASL entry ID found"),t.abrupt("return");case 3:this.isASLLive=!0,this.logger.info("Live ASL Plugin: ASL entry live status (demo mode):",this.isASLLive);case 5:case"end":return t.stop()}}),t,this)}))),function(){return l.apply(this,arguments)})},{key:"getKS",value:function(){var t,e=window.kalturaPlayer;return(null==e||null===(t=e.config)||void 0===t||null===(t=t.provider)||void 0===t?void 0:t.ks)||""}},{key:"addASLToggle",value:function(){var e=this;this.removeASLToggle();var n={label:"live-asl-toggle",area:t.ui.ReservedPresetAreas.InteractiveArea,presets:[t.ui.ReservedPresetNames.Playback],get:function(){return(0,m.h)(_,{ref:function(t){e.aslToggleComponentRef=t},isASLMode:e.isASLMode,isASLLive:e.isASLLive,isResponsive:e.isResponsive,onToggle:e.toggleASL.bind(e)})}};this.aslToggleComponent=this.player.ui.addComponent(n)}},{key:"updateASLToggle",value:function(){this.aslToggleComponentRef?this.aslToggleComponentRef.setState({isASLMode:this.isASLMode,isASLLive:this.isASLLive,isResponsive:this.isResponsive}):(this.removeASLToggle(),this.addASLToggle())}},{key:"removeASLToggle",value:function(){if(this.aslToggleComponent)try{this.aslToggleComponent(),this.aslToggleComponent=null,this.aslToggleComponentRef=null}catch(t){this.aslToggleComponent=null,this.aslToggleComponentRef=null}}},{key:"setupResponsiveBehavior",value:function(){var t=this,e=function(){var e=t.player.dimensions.width;t.isResponsive=e<=(t.config.responsiveBreakpoint||280)};e(),this.player.addEventListener("resize",e)}},{key:"preserveWebcastFeatures",value:function(){this.player.config&&this.player.config.plugins&&(this.webcastFeatures={qa:this.player.config.plugins.qa,polls:this.player.config.plugins.polls,announcements:this.player.config.plugins.announcements,slides:this.player.config.plugins.slides})}},{key:"toggleASL",value:(s=o(v().mark((function t(){return v().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(this.aslEntryId){t.next=3;break}return this.logger.warn("Live ASL Plugin: Cannot toggle - no ASL entry ID"),t.abrupt("return");case 3:if(t.prev=3,!this.isASLMode){t.next=9;break}return t.next=7,this.switchToMainEntry();case 7:t.next=11;break;case 9:return t.next=11,this.switchToASLEntry();case 11:t.next=18;break;case 13:return t.prev=13,t.t0=t.catch(3),this.logger.error("Live ASL Plugin: Error toggling ASL:",t.t0),t.next=18,this.switchToMainEntry();case 18:case"end":return t.stop()}}),t,this,[[3,13]])}))),function(){return s.apply(this,arguments)})},{key:"switchToASLEntry",value:(a=o(v().mark((function t(){return v().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return this.logger.info("Live ASL Plugin: Switching to ASL entry"),t.prev=1,t.next=4,this.player.loadMedia({entryId:this.aslEntryId});case 4:this.applyWebcastFeatures(),this.recordAnalytics("asl_entry_viewed"),this.isASLMode=!0,this.updateASLToggle(),this.logger.info("Live ASL Plugin: Successfully switched to ASL entry"),t.next=26;break;case 11:return t.prev=11,t.t0=t.catch(1),this.logger.error("Live ASL Plugin: Error switching to ASL entry:",t.t0),this.logger.info("Live ASL Plugin: Attempting fallback to main entry"),t.prev=15,t.next=18,this.switchToMainEntry();case 18:t.next=25;break;case 20:t.prev=20,t.t1=t.catch(15),this.logger.error("Live ASL Plugin: Fallback also failed:",t.t1),this.isASLMode=!1,this.updateASLToggle();case 25:throw t.t0;case 26:case"end":return t.stop()}}),t,this,[[1,11],[15,20]])}))),function(){return a.apply(this,arguments)})},{key:"switchToMainEntry",value:(r=o(v().mark((function t(){var e;return v().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(this.logger.info("Live ASL Plugin: Switching to main entry"),this.originalEntryId){t.next=7;break}throw this.logger.error("Live ASL Plugin: No original entry ID found"),e=new Error("No original entry ID available"),this.isASLMode=!1,this.updateASLToggle(),e;case 7:return t.prev=7,t.next=10,this.player.loadMedia({entryId:this.originalEntryId});case 10:this.isASLMode=!1,this.updateASLToggle(),this.logger.info("Live ASL Plugin: Successfully switched to main entry"),t.next=21;break;case 15:throw t.prev=15,t.t0=t.catch(7),this.logger.error("Live ASL Plugin: Error switching to main entry:",t.t0),this.isASLMode=!1,this.updateASLToggle(),t.t0;case 21:case"end":return t.stop()}}),t,this,[[7,15]])}))),function(){return r.apply(this,arguments)})},{key:"applyWebcastFeatures",value:function(){this.webcastFeatures&&this.logger.info("Live ASL Plugin: Applying webcast features to ASL entry")}},{key:"recordAnalytics",value:function(t){try{var e=this.player;e.analytics&&e.analytics.track(t,{entryId:this.originalEntryId,aslEntryId:this.aslEntryId,timestamp:Date.now()})}catch(t){this.logger.warn("Live ASL Plugin: Error recording analytics:",t)}}},{key:"reset",value:function(){this.logger.info("Live ASL Plugin: reset lifecycle hook called"),this.isASLMode=!1,this.originalEntryId=null,this.aslSources=null,this.webcastFeatures=null}},{key:"destroy",value:function(){this.logger.info("Live ASL Plugin: destroy lifecycle hook called"),this.removeASLToggle(),this.isASLMode=!1,this.isASLLive=!1,this.aslEntryId=null,this.originalEntryId=null,this.aslSources=null,this.webcastFeatures=null,this.aslToggleComponent=null,this.aslToggleComponentRef=null,this.player._aslResponsiveSetup&&delete this.player._aslResponsiveSetup,h(f(n.prototype),"destroy",this).call(this)}}],[{key:"isValid",value:function(){return!0}}]),n}(t.BasePlugin);y(N,"defaultConfig",{enabled:!0,autoSwitch:!1,uiPosition:"bottom-right",showIndicator:!0,responsiveBreakpoint:280}),(0,t.registerPlugin)("liveASL",N)})(),r})()));
//# sourceMappingURL=playkit-live-asl.js.map