1"use strict";(self.webpackChunkPeerTube=self.webpackChunkPeerTube||[]).push([[8276],{8276:(u,g,o)=>{o.d(g,{CS:()=>i.C,Pd:()=>A});var i=o(38454),_=(o(61057),o(84099)),T=o(95498),R=o(16354),S=o(20755);let A=(()=>{var s;class M{}return(s=M).\u0275fac=function(l){return new(l||s)},s.\u0275mod=S.oAB({type:s}),s.\u0275inj=S.cJS({providers:[i.C],imports:[R.n,_.hA,T.Y]}),M})()},67634:(u,g,o)=>{o.d(g,{z:()=>I});var i=o(20755);let I=(()=>{var _;class T{}return(_=T).\u0275fac=function(S){return new(S||_)},_.\u0275cmp=i.Xpm({type:_,selectors:[["my-live-documentation-link"]],decls:3,vars:0,consts:function(){let R;return R=" See " + "\ufffd#2\ufffd" + "the documentation" + "\ufffd/#2\ufffd" + " to learn how to use the PeerTube live streaming feature.\n",[R,["href","https://docs.joinpeertube.org/use/create-upload-video#publish-a-live","target","_blank","rel","noopener noreferrer",1,"link-orange"]]},template:function(S,A){1&S&&(i.TgZ(0,"p"),i.tHW(1,0),i._UZ(2,"a",1),i.N_p(),i.qZA())},encapsulation:2}),T})()},61057:(u,g,o)=>{o.d(g,{y:()=>J});var i=o(83473),I=o(3508),_=o(20755),T=o(80839),R=o(38454),S=o(76733),A=o(69508),s=o(32377),M=o(35557),r=o(15311),l=o(67634);const O=["modal"];function h(e,E){1&e&&(_.TgZ(0,"div",22),_.SDv(1,23),_.qZA())}function H(e,E){1&e&&(_.TgZ(0,"div",22),_.SDv(1,24),_.qZA())}function y(e,E){if(1&e&&(_.TgZ(0,"div",15)(1,"label",25),_.SDv(2,26),_.qZA(),_._UZ(3,"my-input-text",27),_.qZA()),2&e){const n=_.oxw(3);_.xp6(3),_.Q6J("value",n.live.rtmpUrl)("withToggle",!1)("withCopy",!0)("show",!0)("readonly",!0)}}function x(e,E){if(1&e&&(_.TgZ(0,"div",15)(1,"label",28),_.SDv(2,29),_.qZA(),_._UZ(3,"my-input-text",30),_.qZA()),2&e){const n=_.oxw(3);_.xp6(3),_.Q6J("value",n.live.rtmpsUrl)("withToggle",!1)("withCopy",!0)("show",!0)("readonly",!0)}}function U(e,E){1&e&&(_.TgZ(0,"span",41),_.SDv(1,42),_.qZA())}function b(e,E){if(1&e&&(_.TgZ(0,"span",43),_._uU(1),_.qZA()),2&e){const n=_.oxw().$implicit,t=_.oxw(4);_.xp6(1),_.Oqu(t.getErrorLabel(n))}}function Z(e,E){if(1&e&&(_.TgZ(0,"span"),_.SDv(1,44),_.ALo(2,"date"),_.qZA()),2&e){const n=_.oxw().$implicit;_.xp6(2),_.pQV(_.xi3(2,1,n.endDate,"medium")),_.QtT(1)}}function G(e,E){if(1&e&&(_.TgZ(0,"a",45),_.SDv(1,46),_.qZA()),2&e){const n=_.oxw().$implicit,t=_.oxw(4);_.Q6J("routerLink",t.getVideoUrl(n.replayVideo))}}function z(e,E){1&e&&(_.TgZ(0,"span"),_.SDv(1,47),_.qZA())}function X(e,E){if(1&e&&(_.TgZ(0,"div",35),_.YNc(1,U,2,0,"span",36),_.YNc(2,b,2,1,"span",37),_.TgZ(3,"span"),_.SDv(4,38),_.ALo(5,"date"),_.qZA(),_.YNc(6,Z,3,4,"span",39),_.YNc(7,G,2,1,"a",40),_.YNc(8,z,2,0,"span",39),_.qZA()),2&e){const n=E.$implicit,t=_.oxw(4);_.xp6(1),_.Q6J("ngIf",!t.getErrorLabel(n)),_.xp6(1),_.Q6J("ngIf",t.getErrorLabel(n)),_.xp6(3),_.pQV(_.xi3(5,6,n.startDate,"medium")),_.QtT(4),_.xp6(1),_.Q6J("ngIf",n.endDate),_.xp6(1),_.Q6J("ngIf",n.replayVideo),_.xp6(1),_.Q6J("ngIf",t.isReplayBeingProcessed(n))}}function K(e,E){if(1&e&&(_.TgZ(0,"div",31)(1,"div",32),_.SDv(2,33),_.qZA(),_.YNc(3,X,9,9,"div",34),_.qZA()),2&e){const n=_.oxw(3);_.xp6(3),_.Q6J("ngForOf",n.latestLiveSessions)}}function B(e,E){if(1&e&&(_.TgZ(0,"div",11)(1,"div"),_.YNc(2,h,2,0,"div",12),_.YNc(3,H,2,0,"div",12),_.qZA(),_.TgZ(4,"div",13),_._UZ(5,"my-live-documentation-link"),_.qZA(),_.YNc(6,y,4,5,"div",14),_.YNc(7,x,4,5,"div",14),_.TgZ(8,"div",15)(9,"label",16),_.SDv(10,17),_.qZA(),_._UZ(11,"my-input-text",18),_.TgZ(12,"div",19),_.SDv(13,20),_.qZA()(),_.YNc(14,K,4,1,"div",21),_.qZA()),2&e){const n=_.oxw(2);_.xp6(2),_.Q6J("ngIf",n.live.permanentLive),_.xp6(1),_.Q6J("ngIf",n.live.saveReplay),_.xp6(3),_.Q6J("ngIf",n.live.rtmpUrl),_.xp6(1),_.Q6J("ngIf",n.live.rtmpsUrl),_.xp6(4),_.Q6J("value",n.live.streamKey)("withCopy",!0)("readonly",!0),_.xp6(3),_.Q6J("ngIf",0!==n.latestLiveSessions.length)}}const k=function(e){return["/videos","update",e]};function Q(e,E){if(1&e){const n=_.EpF();_.TgZ(0,"div",1)(1,"h4",2),_.SDv(2,3),_.qZA(),_.TgZ(3,"button",4),_.NdJ("click",function(){const c=_.CHM(n).dismiss;return _.KtG(c())}),_._UZ(4,"my-global-icon",5),_.qZA()(),_.YNc(5,B,15,8,"div",6),_.TgZ(6,"div",7)(7,"div",8)(8,"input",9),_.NdJ("click",function(){const c=_.CHM(n).dismiss;return _.KtG(c())}),_.qZA(),_.TgZ(9,"my-edit-button",10),_.NdJ("click",function(){const c=_.CHM(n).dismiss;return _.KtG(c())}),_.qZA()()()}if(2&e){const n=_.oxw();_.xp6(5),_.Q6J("ngIf",n.live),_.xp6(4),_.Q6J("ptRouterLink",_.VKq(2,k,n.video.uuid))}}let J=(()=>{var e;class E{constructor(t,a){this.modalService=t,this.liveVideoService=a,this.latestLiveSessions=[]}show(t){this.video=t,this.live=void 0,this.loadLiveInfo(t),this.modalService.open(this.modal,{centered:!0})}getVideoUrl(t){return i.nk.buildWatchUrl(t)}
1getErrorLabel(t){return t.error?{[I.dz.BAD_SOCKET_HEALTH]:"Server too slow",[I.dz.BLACKLISTED]:"Live blacklisted",[I.dz.DURATION_EXCEEDED]:"Max duration exceeded",[I.dz.FFMPEG_ERROR]:"Server error",[I.dz.QUOTA_EXCEEDED]:"Quota exceeded",[I.dz.RUNNER_JOB_CANCEL]:"Runner job cancelled",[I.dz.RUNNER_JOB_ERROR]:"Error in runner job",[I.dz.UNKNOWN_ERROR]:"Unknown error",[I.dz.INVALID_INPUT_VIDEO_STREAM]:"Invalid input video stream"}[t.error]:void 0}isReplayBeingProcessed(t){return!!t.endDate&&t.saveReplay&&!t.endingProcessed}loadLiveInfo(t){this.liveVideoService.getVideoLive(t.id).subscribe(a=>this.live=a),this.liveVideoService.listSessions(t.id).subscribe(({data:a})=>this.latestLiveSessions=a.reverse().slice(0,5))}}return(e=E).\u0275fac=function(t){return new(t||e)(_.Y36(T.FF),_.Y36(R.C))},e.\u0275cmp=_.Xpm({type:e,selectors:[["my-live-stream-information"]],viewQuery:function(t,a){if(1&t&&_.Gf(O,7),2&t){let c;_.iGM(c=_.CRH())&&(a.modal=c.first)}},decls:2,vars:0,consts:function(){let n,t,a,c,p,m,L,v,N,D,C,f,P,V,$,F;return n="Live information",t="Close this modal",a="Close",c="Update live settings",p="Live stream key",m="\u26A0\uFE0F Never share your stream key with anyone.",L="Permanent/Recurring live",v="Replay will be saved",N="Live RTMP Url",D="Live RTMPS Url",C="Latest live sessions",f="Started on " + "\ufffd0\ufffd" + "",P="Success",V="Ended on " + "\ufffd0\ufffd" + "",$="Go to replay",F="Replay is being processed...",[["modal",""],[1,"modal-header"],[1,"modal-title"],n,["title",t,1,"border-0","p-0",3,"click"],["iconName","cross"],["class","modal-body",4,"ngIf"],[1,"modal-footer"],[1,"form-group","inputs"],["type","button","role","button","value",a,1,"peertube-button","grey-button",3,"click"],["label",c,3,"ptRouterLink","click"],[1,"modal-body"],["class","pt-badge badge-blue",4,"ngIf"],[1,"alert","pt-alert-primary"],["class","form-group",4,"ngIf"],[1,"form-group"],["for","liveVideoStreamKey"],p,["inputId","liveVideoStreamKey",3,"value","withCopy","readonly"],[1,"form-group-description"],m,["class","journal",4,"ngIf"],[1,"pt-badge","badge-blue"],L,v,["for","liveVideoRTMPUrl"],N,["inputId","liveVideoRTMPUrl",3,"value","withToggle","withCopy","show","readonly"],["for","liveVideoRTMPSUrl"],D,["inputId","liveVideoRTMPSUrl",3,"value","withToggle","withCopy","show","readonly"],[1,"journal"],[1,"mb-2","fw-bold"],C,["class","journal-session",4,"ngFor","ngForOf"],[1,"journal-session"],["class","pt-badge badge-success",4,"ngIf"],["class","pt-badge badge-danger",4,"ngIf"],f,[4,"ngIf"],["target","_blank",3,"routerLink",4,"ngIf"],[1,"pt-badge","badge-success"],P,[1,"pt-badge","badge-danger"],V,["target","_blank",3,"routerLink"],$,F]},template:function(t,a){1&t&&_.YNc(0,Q,10,4,"ng-template",null,0,_.W1O)},dependencies:[S.sg,S.O5,A.rH,s.M,M.m,r.$,l.z,S.uU],styles:['@charset "UTF-8";p-autocomplete[_ngcontent-%COMP%]{display:block}.form-group[_ngcontent-%COMP%]{margin:20px 0}.pt-alert-primary[_ngcontent-%COMP%]{margin:1rem 0}.pt-badge[_ngcontent-%COMP%]{margin-inline-end:.3125rem;font-size:13px}.journal-session[_ngcontent-%COMP%]{margin-bottom:5px}.journal-session[_ngcontent-%COMP%] span[_ngcontent-%COMP%]:not(.pt-badge, [_ngcontent-%COMP%]:last-child):after{margin:3px;content:"\\2022"}']}),E})()},38454:(u,g,o)=>{o.d(g,{C:()=>s});var A,i=o(17560),I=o(20553),_=o(83473),T=o(20755),R=o(2939),S=o(76521);class s{constructor(r,l){this.authHttp=r,this.restExtractor=l}goLive(r){return this.authHttp.post(s.BASE_VIDEO_LIVE_URL,r).pipe((0,i.K)(l=>this.restExtractor.handleError(l)))}getVideoLive(r){return this.authHttp.get(s.BASE_VIDEO_LIVE_URL+r).pipe((0,i.K)(l=>this.restExtractor.handleError(l)))}listSessions(r){return this.authHttp.get(s.BASE_VIDEO_LIVE_URL+r+"/sessions").pipe((0,i.K)(l=>this.restExtractor.handleError(l)))}findLiveSessionFromVOD(r){return this.authHttp.get(_.kI.BASE_VIDEO_URL+"/"+r+"/live-session").pipe((0,i.K)(l=>this.restExtractor.handleError(l)))}updateLive(r,l){return this.authHttp.put(s.BASE_VIDEO_LIVE_URL+r,l).pipe((0,i.K)(O=>this.restExtractor.handleError(O)))}}(A=s).BASE_VIDEO_LIVE_URL=I.N.apiUrl+"/api/v1/videos/live/",A.\u0275fac=function(r){return new(r||A)(T.LFG(R.eN),T.LFG(S.DI))},A.\u0275prov=T.Yz7({token:A,factory:A.\u0275fac})}}]);
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.