PageSourceSearch

https://www.handwerk-technik.de/_next/static/chunks/reactPlayerTwitch.7f4d40f93b136aa0.js

js handwerk-technik.de collected 2026-09-25 05:32:20 UTC 9,151 bytes, 21 lines download raw bytes

1!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},t=(new e.Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="fa98ce7d-33b7-41cd-b4ee-15d9d1c16eeb",e._sentryDebugIdIdentifier="sentry-dbid-fa98ce7d-33b7-41cd-b4ee-15d9d1c16eeb")}catch(e){}}();"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2042],{37238:(e,t,i)=>{i.r(t),i.d(t,{default:()=>E});var s=i(75834);let n="https://player.twitch.tv",a=/(?:www\.|go\.)?twitch\.tv\/(?:videos?\/|\?video=)(\d+)($|\?)/,r=/(?:www\.|go\.)?twitch\.tv\/([a-zA-Z0-9_]+)($|\?)/,o={IDLE:"Idle",ENDED:"Ended"},l={PAUSE:2,PLAY:3,SEEK:4,SET_MUTED:10,SET_VOLUME:11};function u(e,t={}){let i={src:d(e,t),frameborder:"0",width:"100%",height:"100%",allow:"accelerometer; fullscreen; autoplay; encrypted-media; picture-in-picture;",sandbox:"allow-modals allow-scripts allow-same-origin allow-popups allow-popups-to-escape-sandbox",scrolling:"no"};return t.config&&(i["data-config"]=JSON.stringify(t.config)),`
2    <style>
3      :host {
4        display: inline-block;
5        min-width: 300px;
6        min-height: 150px;
7        position: relative;
8      }
9      iframe {
10        position: absolute;
11        top: 0;
12        left: 0;
13        width: 100%;
14        height: 100%;
15      }
16      :host(:not([controls])) {
17        pointer-events: none;
18      }
19    </style>
20    <iframe${function(e){let t="";for(let i in e){let s=e[i];""===s?t+=` ${c(i)}`:t+=` ${c(i)}="${c(`${s}`)}"`}return t}(i)}></iframe>
21  `}function d(e,t){var i;if(!e.src)return;let s=e.src.match(a),o=e.src.match(r),l={parent:null==(i=globalThis.location)?void 0:i.hostname,controls:""===e.controls&&null,autoplay:""===e.autoplay&&null,muted:e.muted,preload:e.preload,...t.config};if(s){let e=s[1];return`${n}/?video=v${e}&${p(l)}`}if(o){let e=o[1];return`${n}/?channel=${e}&${p(l)}`}return""}class h extends(globalThis.HTMLElement??class{}){static getTemplateHTML=u;static shadowRootOptions={mode:"open"};static observedAttributes=["autoplay","controls","loop","muted","playsinline","preload","src"];loadComplete=new m;#e;#t;#i;#s={};#n=0;#a=!1;#r=1;#o=!this.autoplay;#l=!1;#u=0;#d=null;constructor(){super(),this.#h("config")}get config(){return this.#d}set config(e){this.#d=e}async load(){if(this.#e)return;this.shadowRoot||this.attachShadow({mode:"open"});let e=!this.#t;if(this.#t&&(this.loadComplete=new m),this.#t=!0,await (this.#e=Promise.resolve()),this.#e=null,this.#u=0,this.dispatchEvent(new Event("emptied")),!this.src){this.shadowRoot.innerHTML="",globalThis.removeEventListener("message",this.#c);return}this.dispatchEvent(new Event("loadstart"));let t=this.shadowRoot.querySelector("iframe"),i=function(e){let t={};for(let i of e)t[i.name]=i.value;return t}(this.attributes);e&&t&&(this.#d=JSON.parse(t.getAttribute("data-config")||"{}")),(null==t?void 0:t.src)&&t.src===d(i,this)||(this.shadowRoot.innerHTML=u(i,this),t=this.shadowRoot.querySelector("iframe")),this.#i=t,globalThis.addEventListener("message",this.#c)}attributeChangedCallback(e,t,i){if(t!==i)switch(e){case"src":case"controls":this.load()}}getVideoPlaybackQuality(){return this.#s.stats.videoStats}get src(){return this.getAttribute("src")}set src(e){this.setAttribute("src",e)}get readyState(){return this.#u}get seeking(){return this.#l}get buffered(){var e,t,i,s;return i=0,s=(null==(t=null==(e=this.#s.stats)?void 0:e.videoStats)?void 0:t.bufferSize)??0,Array.isArray(0)?f(i):null==i||null==s||0===i&&0===s?f([[0,0]]):f([[i,s]])}get paused(){return this.#s.playback?this.#s.playback===o.IDLE:this.#o}get ended(){return!!this.#s.playback&&this.#s.playback===o.ENDED}get duration(){return this.#s.duration??NaN}get autoplay(){return this.hasAttribute("autoplay")}set autoplay(e){this.autoplay!=e&&this.toggleAttribute("autoplay",!!e)}get controls(){return this.hasAttribute("controls")}set controls(e){this.controls!=e&&this.toggleAttribute("controls",!!e)}get currentTime(){return this.#s.currentTime?this.#s.currentTime:this.#n}set currentTime(e){this.#n=e,this.loadComplete.then(()=>{this.#p(l.SEEK,e)})}get defaultMuted(){return this.hasAttribute("muted")}set defaultMuted(e){this.toggleAttribute("muted",!!e)}get loop(){return this.hasAttribute("loop")}set loop(e){this.toggleAttribute("loop",!!e)}get muted(){return this.#a}set muted(e){this.#a=e,this.loadComplete.then(()=>{this.#p(l.SET_MUTED,e)})}get volume(){return this.#r}set volume(e){this.#r=e,this.loadComplete.then(()=>{this.#p(l.SET_VOLUME,e)})}
21get playsInline(){return this.hasAttribute("playsinline")}set playsInline(e){this.toggleAttribute("playsinline",!!e)}play(){this.#o=!1,this.#p(l.PLAY)}pause(){this.#o=!0,this.#p(l.PAUSE)}#c=async e=>{var t,i,s,n;if(!this.#i.contentWindow)return;let{data:a,source:r}=e;if(r===this.#i.contentWindow){if("twitch-embed"===a.namespace)await new Promise(e=>setTimeout(e,10)),"ready"===a.eventName?(this.dispatchEvent(new Event("loadcomplete")),this.loadComplete.resolve(),this.#u=1,this.dispatchEvent(new Event("loadedmetadata"))):"seek"===a.eventName?(this.#l=!0,this.dispatchEvent(new Event("seeking"))):"playing"===a.eventName?(this.#l&&(this.#l=!1,this.dispatchEvent(new Event("seeked"))),this.#u=3,this.dispatchEvent(new Event("playing"))):this.dispatchEvent(new Event(a.eventName));else if("twitch-embed-player-proxy"===a.namespace&&"UPDATE_STATE"===a.eventName){let e=this.#s.duration,r=this.#s.currentTime,o=this.#s.volume,l=this.#s.muted,u=null==(i=null==(t=this.#s.stats)?void 0:t.videoStats)?void 0:i.bufferSize;this.#s={...this.#s,...a.params},e!==this.#s.duration&&this.dispatchEvent(new Event("durationchange")),r!==this.#s.currentTime&&this.dispatchEvent(new Event("timeupdate")),(o!==this.#s.volume||l!==this.#s.muted)&&(void 0!==this.#s.volume&&(this.#r=this.#s.volume),void 0!==this.#s.muted&&(this.#a=this.#s.muted),this.dispatchEvent(new Event("volumechange"))),u!==(null==(n=null==(s=this.#s.stats)?void 0:s.videoStats)?void 0:n.bufferSize)&&this.dispatchEvent(new Event("progress"))}}};#p(e,t){this.#i.contentWindow&&this.#i.contentWindow.postMessage({eventName:e,params:t,namespace:"twitch-embed-player-proxy"},n)}#h(e){if(Object.prototype.hasOwnProperty.call(this,e)){let t=this[e];delete this[e],this[e]=t}}}function c(e){return e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&apos;").replace(/`/g,"&#x60;")}function p(e){return String(new URLSearchParams(function(e){let t={};for(let i in e){let s=e[i];!0===s||""===s?t[i]=!0:!1===s?t[i]=!1:null!=s&&(t[i]=s)}return t}(e)))}class m extends Promise{constructor(e=()=>{}){let t,i;super((s,n)=>{e(s,n),t=s,i=n}),this.resolve=t,this.reject=i}}function f(e){return Object.defineProperties(e,{start:{value:t=>e[t][0]},end:{value:t=>e[t][1]}}),e}globalThis.customElements&&!globalThis.customElements.get("twitch-video")&&globalThis.customElements.define("twitch-video",h);var g=new Set(["style","children","ref","key","suppressContentEditableWarning","suppressHydrationWarning","dangerouslySetInnerHTML"]),y={className:"class",htmlFor:"for"};function v(e){return e.toLowerCase()}function w(e){return"boolean"==typeof e?e?"":void 0:"function"==typeof e?void 0:"object"!=typeof e||null===e?e:void 0}function b(e,t,i){var s;e[t]=i,null==i&&t in((null==(s=globalThis.HTMLElement)?void 0:s.prototype)??{})&&e.removeAttribute(t)}var E=function({react:e,tagName:t,elementClass:i,events:s,displayName:n,defaultProps:a,toAttributeName:r=v,toAttributeValue:o=w}){let l=Number.parseInt(e.version)>=19,u=e.forwardRef((n,u)=>{var d,h;let c=e.useRef(null),p=e.useRef(new Map),m={},f={},v={},E={};for(let[e,t]of Object.entries(n)){if(g.has(e)){v[e]=t;continue}let s=r(y[e]??e);if(i.prototype&&e in i.prototype&&!(e in((null==(d=globalThis.HTMLElement)?void 0:d.prototype)??{}))&&!(null==(h=i.observedAttributes)?void 0:h.some(e=>e===s))){E[e]=t;continue}if(e.startsWith("on")){m[e]=t;continue}let n=o(t);s&&null!=n&&(f[s]=String(n),l||(v[s]=n)),s&&l&&(n!==w(t)?v[s]=n:v[s]=t)}if("undefined"!=typeof window){for(let t in m){let i=m[t],n=t.endsWith("Capture"),a=((null==s?void 0:s[t])??t.slice(2).toLowerCase()).slice(0,n?-7:void 0);e.useLayoutEffect(()=>{let e=null==c?void 0:c.current;if(e&&"function"==typeof i)return e.addEventListener(a,i,n),()=>{e.removeEventListener(a,i,n)}},[null==c?void 0:c.current,i])}e.useLayoutEffect(()=>{if(null===c.current)return;let e=new Map;for(let t in E)b(c.current,t,E[t]),p.current.delete(t),e.set(t,E[t]);for(let[e,t]of p.current)b(c.current,e,void 0);p.current=e})}if("undefined"==typeof window&&(null==i?void 0:i.getTemplateHTML)&&(null==i?void 0:i.shadowRootOptions)){let{mode:t,delegatesFocus:s}=i.shadowRootOptions;v.children=[e.createElement("template",{shadowrootmode:t,shadowrootdelegatesfocus:s,dangerouslySetInnerHTML:{__html:i.getTemplateHTML(f,n)}}),v.children]}return e.createElement(t,{...a,...v,ref:e.useCallback(e=>{c.current=e,"function"==typeof u?u(e):null!==u&&(u.current=e)},[u])})});return u.displayName=n??i.name,u}({react:s,tagName:"twitch-video",elementClass:h,toAttributeName:e=>"muted"===e?"":"defaultMuted"===e?"muted":v(e)})}}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.