PageSourceSearch

https://hou.la/chunk-4PUTNY7Z.js

js hou.la collected 2026-10-02 16:01:07 UTC 14,842 bytes, 1 lines download raw bytes

1import{o as Q}from"./chunk-EU6HCBUP.js";import"./chunk-KAJMKXZ6.js";import{D as h,l as O,m as y}from"./chunk-ZAQTNZYS.js";import{c as L}from"./chunk-SRTXE2HR.js";import{Fa as V,Jb as a,Lb as z,Wb as r,Xb as s,Yb as f,Zb as R,_a as M,_b as U,ac as q,da as C,db as o,dd as B,gc as A,hc as c,ka as N,la as S,ma as T,na as D,nc as x,oc as E,pc as w,sb as v,uc as d,vc as g,wa as G,wc as p,yb as l}from"./chunk-NTTV6FWH.js";import{g as I}from"./chunk-W7GRJBO5.js";var J=["video"];function Z(n,t){if(n&1&&(r(0,"span",7),d(1),s()),n&2){let e=c(2);o(),p("\xD7",e.current.quantity,"")}}function W(n,t){if(n&1){let e=q();r(0,"div",2)(1,"video",3,0),A("ended",function(){S(e);let m=c();return T(m.onEnded())})("error",function(){S(e);let m=c();return T(m.onEnded())}),s(),r(3,"div",4)(4,"span",5),d(5),s(),l(6,Z,2,1,"span",6),s()()}if(n&2){let e=c();o(5),g(e.current.senderName),o(),a("ngIf",e.current.quantity>1)}}var k=class n{queue=[];videoRef;current=null;playing=!1;pending=[];lastKey=-1;ngOnChanges(t){if(t.queue){for(let e of this.queue)e.key>this.lastKey&&(this.pending.push(e),this.lastKey=e.key);this.drain()}}drain(){if(this.playing)return;let t=this.pending.shift();t&&(this.playing=!0,this.current=t,setTimeout(()=>{let e=this.videoRef?.nativeElement;if(!e){this.onEnded();return}e.src=t.assetUrl,e.play().catch(()=>this.onEnded())}),setTimeout(()=>{this.current===t&&this.onEnded()},(t.durationMs||5e3)+2e3))}onEnded(){this.current=null,this.playing=!1,this.drain()}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=v({type:n,selectors:[["app-egress-gift-overlay"]],viewQuery:function(e,i){if(e&1&&x(J,5),e&2){let m;E(m=w())&&(i.videoRef=m.first)}},inputs:{queue:"queue"},features:[N],decls:1,vars:1,consts:[["video",""],["class","gift-overlay",4,"ngIf"],[1,"gift-overlay"],["muted","","autoplay","","playsinline","",1,"gift-overlay__video",3,"ended","error"],[1,"gift-overlay__sender"],[1,"gift-overlay__name"],["class","gift-overlay__qty",4,"ngIf"],[1,"gift-overlay__qty"]],template:function(e,i){e&1&&l(0,W,7,2,"div",1),e&2&&a("ngIf",i.current)},dependencies:[h,y],styles:[".gift-overlay[_ngcontent-%COMP%]{position:absolute;inset:0;pointer-events:none;z-index:30}.gift-overlay__video[_ngcontent-%COMP%]{position:absolute;inset:0;width:100%;height:100%;object-fit:contain;background:transparent}.gift-overlay__sender[_ngcontent-%COMP%]{position:absolute;left:0;right:0;bottom:18%;display:flex;align-items:center;justify-content:center;gap:6px;text-shadow:0 1px 4px rgba(0,0,0,.7)}.gift-overlay__name[_ngcontent-%COMP%]{color:#fff;font-size:18px;font-weight:700}.gift-overlay__qty[_ngcontent-%COMP%]{color:#ffd34d;font-size:18px;font-weight:800}"],changeDetection:0})};function X(n,t){if(n&1&&f(0,"img",14),n&2){let e=c().$implicit;a("src",e.senderAvatarUrl,M)}}function ee(n,t){if(n&1&&(r(0,"span"),d(1),s()),n&2){let e=c().$implicit,i=c();o(),g(i.initial(e.senderName))}}function te(n,t){if(n&1&&(r(0,"span",18),d(1),s()),n&2){let e=c(2).$implicit;o(),p("",e.coins," coins")}}function ne(n,t){if(n&1&&(r(0,"span",15),D(),r(1,"svg",16),f(2,"path",17),s(),l(3,te,2,1,"span",12),s()),n&2){let e=c().$implicit;o(3),a("ngIf",e.coins)}}function ie(n,t){n&1&&(D(),r(0,"svg",19),f(1,"path",20)(2,"path",21),s())}function oe(n,t){n&1&&(r(0,"span",22),d(1,"bot"),s())}function re(n,t){if(n&1&&(r(0,"span",23),d(1),s()),n&2){let e=c().$implicit;o(),p("/",e.commande,"")}}function se(n,t){if(n&1&&(r(0,"span",18),d(1),s()),n&2){let e=c().$implicit;o(),p("",e.coins," coins")}}function ae(n,t){if(n&1&&(r(0,"div",2)(1,"div",3),l(2,X,1,1,"img",4)(3,ee,2,1,"span",5),s(),r(4,"div",6),l(5,ne,4,1,"span",7),r(6,"span",8),d(7),l(8,ie,3,0,"svg",9),s(),l(9,oe,2,0,"span",10)(10,re,2,1,"span",11)(11,se,2,1,"span",12),r(12,"span",13),d(13),s()()()),n&2){let e=t.$implicit;z("is-priority",e.kind==="prioritaire")("is-command",e.kind==="commande"),o(2),a("ngIf",e.senderAvatarUrl),o(),a("ngIf",!e.senderAvatarUrl),o(2),a("ngIf",e.kind==="prioritaire"),o(2),p(" ",e.senderName," "),o(),a("ngIf",e.isVerified),o(),a("ngIf",e.isBot),o(),a("ngIf",e.commande),o(),a("ngIf",e.kind==="commande"&&e.coins),o(2),g(e.text)}}var P=class n{comments=[];trackByKey(t,e){return e.key}initial(t){return(t||"?").trim().charAt(0).toUpperCase()}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=v({type:n,selectors:[["app-egress-comment-feed"]],inputs:{comments:"comments"},decls:2,vars:2,consts:[[1,"comment-feed"],["class","comment-feed__row",3,"is-priority","is-command",4,"ngFor","ngForOf","ngForTrackBy"],[1,"comment-feed__row"],[1,"comment-feed__avatar"],["alt","","referrerpolicy","no-referrer",3,"src",4,"ngIf"],[4,"ngIf"],[1,"comment-feed__bubble"],["class","comment-feed__paid",4,"ngIf"],[1,"comment-feed__name"],["class","comment-feed__badge","viewBox","0 0 24 24","width","13","height","13",4,"ngIf"],["class","comment-feed__bot",4,"ngIf"],["class","comment-feed__cmdtag",4,"ngIf"],["class","comment-feed__coins",4,"ngIf"],[1,"comment-feed__text"],["alt","","referrerpolicy","no-referrer",3,"src"],[1,"comment-feed__paid"],["viewBox","0 0 24 24","width","12","height","12","aria-hidden","true"],["fill","currentColor","d","M3 10v4h3l5 4V6L6 10H3zm12.5 2a3.5 3.5 0 0 0-2-3.16v6.32A3.5 3.5 0 0 0 15.5 12zm-2 -7.6v2.06A5.5 5.5 0 0 1 13.5 17.5v2.06A7.5 7.5 0 0 0 13.5 4.4z"],[1,"comment-feed__coins"],["viewBox","0 0 24 24","width","13","height","13",1,"comment-feed__badge"],["fill","#3897f0","d","M12 2l2.4 1.8 3 .2.9 2.9L21 9l-1.1 2.8L21 14.6l-2.7 1.9-.9 2.9-3 .2L12 22l-2.4-1.4-3-.2-.9-2.9L3 14.6l1.1-2.8L3 9l2.7-1.9.9-2.9 3-.2z"],["fill","#fff","d","M10.4 14.6l-2.3-2.3 1.1-1.1 1.2 1.2 3-3 1.1 1.1z"],[1,"comment-feed__bot"],[1,"comment-feed__cmdtag"]],template:function(e,i){e&1&&(r(0,"div",0),l(1,ae,14,13,"div",1),s()),e&2&&(o(),a("ngForOf",i.comments)("ngForTrackBy",i.trackByKey))},dependencies:[h,O,y],styles:[".comment-feed[_ngcontent-%COMP%]{position:absolute;
1left:12px;right:90px;bottom:90px;display:flex;flex-direction:column;justify-content:flex-end;gap:8px;z-index:20;pointer-events:none}.comment-feed__row[_ngcontent-%COMP%]{display:flex;align-items:flex-start;gap:8px;animation:_ngcontent-%COMP%_fadeUp .25s ease-out}.comment-feed__avatar[_ngcontent-%COMP%]{flex:0 0 28px;width:28px;height:28px;border-radius:50%;overflow:hidden;background:#fff3;display:flex;align-items:center;justify-content:center;color:#fff;font-size:12px;font-weight:700}.comment-feed__avatar[_ngcontent-%COMP%]   img[_ngcontent-%COMP%]{width:100%;height:100%;object-fit:cover}.comment-feed__bubble[_ngcontent-%COMP%]{max-width:100%;padding:6px 10px;border-radius:14px;background:#0006;backdrop-filter:blur(2px)}.comment-feed__row.is-priority[_ngcontent-%COMP%]   .comment-feed__bubble[_ngcontent-%COMP%]{background:#fffffff0;border:2px solid rgba(0,0,0,.85);border-left-width:5px;color:#111}.comment-feed__row.is-priority[_ngcontent-%COMP%]   .comment-feed__bubble[_ngcontent-%COMP%]   .comment-feed__name[_ngcontent-%COMP%], .comment-feed__row.is-priority[_ngcontent-%COMP%]   .comment-feed__bubble[_ngcontent-%COMP%]   .comment-feed__text[_ngcontent-%COMP%], .comment-feed__row.is-priority[_ngcontent-%COMP%]   .comment-feed__bubble[_ngcontent-%COMP%]   .comment-feed__paid[_ngcontent-%COMP%]{color:#111}.comment-feed__row.is-priority[_ngcontent-%COMP%]   .comment-feed__bubble[_ngcontent-%COMP%]   .comment-feed__coins[_ngcontent-%COMP%], .comment-feed__row.is-priority[_ngcontent-%COMP%]   .comment-feed__bubble[_ngcontent-%COMP%]   .comment-feed__cmdtag[_ngcontent-%COMP%], .comment-feed__row.is-priority[_ngcontent-%COMP%]   .comment-feed__bubble[_ngcontent-%COMP%]   .comment-feed__bot[_ngcontent-%COMP%]{color:#111;border-color:#000000b3;background:transparent}.comment-feed__row.is-command[_ngcontent-%COMP%]   .comment-feed__bubble[_ngcontent-%COMP%]{background:#0000008c;border-left:3px dashed rgba(255,255,255,.75)}.comment-feed__paid[_ngcontent-%COMP%]{display:flex;align-items:center;gap:4px;margin-bottom:2px;color:#fff}.comment-feed__coins[_ngcontent-%COMP%]{display:inline-flex;align-items:center;margin-right:5px;padding:0 6px;border:1px solid rgba(255,255,255,.85);border-radius:999px;color:#fff;font-size:10.5px;font-weight:800;line-height:15px;white-space:nowrap;vertical-align:middle}.comment-feed__cmdtag[_ngcontent-%COMP%]{display:inline-block;margin-right:5px;padding:0 5px;border:1px solid rgba(255,255,255,.6);border-radius:5px;background:#ffffff38;color:#fff;font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:11px;font-weight:800;line-height:16px;vertical-align:middle}.comment-feed__bot[_ngcontent-%COMP%]{display:inline-block;margin-right:5px;padding:0 5px;border:1px dashed rgba(255,255,255,.7);border-radius:5px;color:#fff;font-size:9.5px;font-weight:800;text-transform:uppercase;letter-spacing:.05em;line-height:14px;vertical-align:middle}.comment-feed__name[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:4px;color:#ffd34d;font-size:12px;font-weight:700;margin-right:6px}.comment-feed__badge[_ngcontent-%COMP%]{vertical-align:middle}.comment-feed__text[_ngcontent-%COMP%]{color:#fff;font-size:13px;line-height:1.3;word-break:break-word}@keyframes _ngcontent-%COMP%_fadeUp{0%{opacity:0;transform:translateY(8px)}to{opacity:1;transform:translateY(0)}}"],changeDetection:0})};var me=["hostVideo"],ce=["audioSink"];function de(n,t){if(n&1&&f(0,"img",15),n&2){let e=c().$implicit;a("src",e.assetUrl,M)}}function le(n,t){if(n&1&&(R(0),d(1),U()),n&2){let e=c().$implicit;o(),p("\xD7",e.quantity,"")}}function pe(n,t){if(n&1&&(r(0,"div",9),l(1,de,1,1,"img",10),r(2,"div",11)(3,"span",12),d(4),s(),r(5,"span",13),d(6),l(7,le,2,1,"ng-container",14),s()()()),n&2){let e=t.$implicit;o(),a("ngIf",e.assetUrl),o(3),g(e.senderName),o(2),p("",e.giftName," "),o(),a("ngIf",e.quantity>1)}}var H=class n{hostVideo;audioSink;route=C(Q);zone=C(G);cdr=C(B);platformId=C(V);comments=[];screenGifts=[];bubbles=[];connected=!1;room=null;keyCounter=0;maxComments=6;timeouts=new Set;ngOnInit(){return I(this,null,function*(){if(!L(this.platformId))return;
1let t=this.route.snapshot.queryParamMap,e=t.get("url"),i=t.get("token");if(!e||!i){console.error("[egress] missing url/token query params");return}try{yield this.connect(e,i)}catch(m){console.error("[egress] connect failed",m),console.log("END_RECORDING")}})}connect(t,e){return I(this,null,function*(){let i=yield import("./chunk-MW3ZKR3I.js"),{Room:m,RoomEvent:_,Track:F}=i,b=new m({adaptiveStream:!1,dynacast:!1});this.room=b,b.on(_.TrackSubscribed,u=>{if(u.kind===F.Kind.Video)u.attach(this.hostVideo.nativeElement);else if(u.kind===F.Kind.Audio){let Y=u.attach();this.audioSink.nativeElement.appendChild(Y)}}),b.on(_.DataReceived,u=>{this.onData(u)}),b.on(_.Disconnected,()=>{console.log("END_RECORDING")}),yield b.connect(t,e),this.zone.run(()=>{this.connected=!0,this.cdr.markForCheck()}),console.log("START_RECORDING")})}onData(t){let e;try{e=JSON.parse(new TextDecoder().decode(t))}catch{return}e.type==="chat"?this.pushComment(e.payload):e.type==="screen_gift_play"?this.scheduleScreenGift(e):e.type==="gift"&&this.pushBubble(e.payload)}pushComment(t){let e=Number(t.coins),i={id:t.id,senderName:t.senderName,senderAvatarUrl:t.senderAvatarUrl,text:t.text,isVerified:!!t.senderIsVerified,key:this.keyCounter++,kind:t.kind==="prioritaire"||t.kind==="commande"?t.kind:"texte",coins:Number.isFinite(e)&&e>0?e:0,commande:(t.commande||"").trim(),isBot:!!t.isBot};this.zone.run(()=>{this.comments=[...this.comments,i].slice(-this.maxComments),this.cdr.markForCheck()})}scheduleScreenGift(t){let e=t.assetUrlAndroid||t.assetUrlIos;if(!e)return;let i=Math.max(0,(t.scheduledPlayAt||0)-Date.now()),m={key:this.keyCounter++,assetUrl:e,durationMs:t.durationMs||5e3,senderName:t.senderName,quantity:t.quantity||1},_=setTimeout(()=>{this.timeouts.delete(_),this.zone.run(()=>{this.screenGifts=[...this.screenGifts,m],this.cdr.markForCheck()})},Math.min(i,1e4));this.timeouts.add(_)}pushBubble(t){let e={key:this.keyCounter++,giftName:t.giftName,senderName:t.senderName,senderAvatarUrl:t.senderAvatarUrl,assetUrl:t.assetUrl,quantity:t.quantity||1};this.zone.run(()=>{this.bubbles=[...this.bubbles,e],this.cdr.markForCheck()});let i=setTimeout(()=>{this.timeouts.delete(i),this.zone.run(()=>{this.bubbles=this.bubbles.filter(m=>m.key!==e.key),this.cdr.markForCheck()})},4e3);this.timeouts.add(i)}trackByKey(t,e){return e.key}ngOnDestroy(){for(let e of this.timeouts)clearTimeout(e);this.timeouts.clear(),this.room?.disconnect?.()}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=v({type:n,selectors:[["app-view-egress-composite"]],viewQuery:function(e,i){if(e&1&&(x(me,7),x(ce,7)),e&2){let m;E(m=w())&&(i.hostVideo=m.first),E(m=w())&&(i.audioSink=m.first)}},decls:9,vars:4,consts:[["hostVideo",""],["audioSink",""],[1,"egress-stage"],["autoplay","","playsinline","","muted","",1,"egress-stage__video"],["aria-hidden","true",1,"egress-stage__audio"],[3,"comments"],[1,"egress-stage__bubbles"],["class","egress-bubble",4,"ngFor","ngForOf","ngForTrackBy"],[3,"queue"],[1,"egress-bubble"],["class","egress-bubble__icon","alt","","referrerpolicy","no-referrer",3,"src",4,"ngIf"],[1,"egress-bubble__text"],[1,"egress-bubble__name"],[1,"egress-bubble__gift"],[4,"ngIf"],["alt","","referrerpolicy","no-referrer",1,"egress-bubble__icon",3,"src"]],template:function(e,i){e&1&&(r(0,"div",2),f(1,"video",3,0)(3,"div",4,1)(5,"app-egress-comment-feed",5),r(6,"div",6),l(7,pe,8,4,"div",7),s(),f(8,"app-egress-gift-overlay",8),s()),e&2&&(o(5),a("comments",i.comments),o(2),a("ngForOf",i.bubbles)("ngForTrackBy",i.trackByKey),o(),a("queue",i.screenGifts))},dependencies:[h,O,y,k,P],styles:["[_nghost-%COMP%]{display:block;width:100vw;height:100vh;background:#000;overflow:hidden}.egress-stage[_ngcontent-%COMP%]{position:relative;width:100%;height:100%}.egress-stage__video[_ngcontent-%COMP%]{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;background:#000}.egress-stage__audio[_ngcontent-%COMP%]{position:absolute;width:0;height:0;overflow:hidden}.egress-stage__bubbles[_ngcontent-%COMP%]{position:absolute;right:12px;top:80px;display:flex;flex-direction:column;gap:6px;z-index:25;pointer-events:none}.egress-bubble[_ngcontent-%COMP%]{display:flex;align-items:center;gap:8px;padding:5px 10px 5px 6px;border-radius:999px;background:linear-gradient(90deg,#764ba2d9,#667eead9);animation:_ngcontent-%COMP%_slideIn .25s ease-out}.egress-bubble__icon[_ngcontent-%COMP%]{width:26px;height:26px;object-fit:contain}.egress-bubble__text[_ngcontent-%COMP%]{display:flex;flex-direction:column;line-height:1.15}.egress-bubble__name[_ngcontent-%COMP%]{color:#fff;font-size:11px;font-weight:700}.egress-bubble__gift[_ngcontent-%COMP%]{color:#ffe9a8;font-size:11px;font-weight:600}@keyframes _ngcontent-%COMP%_slideIn{0%{opacity:0;transform:translate(20px)}to{opacity:1;transform:translate(0)}}"],changeDetection:0})};export{H as ViewEgressCompositeComponent};

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.