Take control over your live stream video by running it yourself. Streaming + chat out of the box.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

1 lines
11 KiB

(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[405],{45301:function(e,n,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/",function(){return t(94831)}])},824:function(e,n,t){"use strict";t.d(n,{Z:function(){return m}});var r=t(85893),s=(t(67294),t(84916)),i=t(20550),a=t(17962),o=t(53731),l=t(58091),c=s.Z.Title;function d(e,n){var t="black";return"warning"===n.level?t="orange":"error"===n.level&&(t="red"),(0,r.jsx)(i.Z,{color:t,children:e})}function u(e){return(0,r.jsx)(o.Z,{children:e})}function m(e){var n=e.logs,t=e.pageSize;if(!(null===n||void 0===n?void 0:n.length))return null;var s=[{title:"Level",dataIndex:"level",key:"level",filters:[{text:"Info",value:"info"},{text:"Warning",value:"warning"},{text:"Error",value:"Error"}],onFilter:function(e,n){return 0===n.level.indexOf(e)},render:d},{title:"Timestamp",dataIndex:"time",key:"time",render:function(e){var n=new Date(e);return(0,l.Z)(n,"pp P")},sorter:function(e,n){return new Date(e.time).getTime()-new Date(n.time).getTime()},sortDirections:["descend","ascend"],defaultSortOrder:"descend"},{title:"Message",dataIndex:"message",key:"message",render:u}];return(0,r.jsxs)("div",{className:"logs-section",children:[(0,r.jsx)(c,{children:"Logs"}),(0,r.jsx)(a.Z,{size:"middle",dataSource:n,columns:s,rowKey:function(e){return e.time},pagination:{pageSize:t||20}})]})}},94831:function(e,n,t){"use strict";t.r(n),t.d(n,{default:function(){return V}});var r=t(34051),s=t.n(r),i=t(85893),a=t(67294),o=t(41080),l=t(74763),c=t(97751),d=t(25968),u=t(6226),m=t(24019),v=t(87547),f=t(26555),h=t(85533),x=t(35159),p=t(824),j=t(66567),g=t(63179),w=t(78346),b=t(27482),Z=t(84916),y=t(41664),k=t(92659),N=t(54907),S=t(58091),O=t(58827);function C(e,n,t,r,s,i,a){try{var o=e[i](a),l=o.value}catch(c){return void t(c)}o.done?n(l):Promise.resolve(l).then(r,s)}function _(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}var P=N.Z.Panel,E=Z.Z.Title,D=Z.Z.Link;function T(e){var n=e.title,t=e.url,r=e.content_html,s=e.date_published,a=new Date(s),o=(0,S.Z)(a,"MMM dd, yyyy, HH:mm");return(0,i.jsx)("article",{children:(0,i.jsx)(N.Z,{children:(0,i.jsxs)(P,{header:n,children:[(0,i.jsxs)("p",{className:"timestamp",children:[o," (",(0,i.jsx)(D,{href:"".concat("https://owncast.online").concat(t),target:"_blank",rel:"noopener noreferrer",children:"Link"}),")"]}),(0,i.jsx)("div",{dangerouslySetInnerHTML:{__html:r}})]},t)})})}function U(){var e=(0,a.useState)([]),n=e[0],t=e[1],r=(0,a.useState)(!0),l=r[0],c=r[1],d=function(){var e,n=(e=s().mark((function e(){var n;return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return c(!1),e.prev=1,e.next=4,(0,O.kg)("https://owncast.online/news/index.json");case 4:(null===(n=e.sent)||void 0===n?void 0:n.items.length)>0&&t(n.items),e.next=11;break;case 8:e.prev=8,e.t0=e.catch(1),console.log("==== error",e.t0);case 11:case"end":return e.stop()}}),e,null,[[1,8]])})),function(){var n=this,t=arguments;return new Promise((function(r,s){var i=e.apply(n,t);function a(e){C(i,r,s,a,o,"next",e)}function o(e){C(i,r,s,a,o,"throw",e)}a(void 0)}))});return function(){return n.apply(this,arguments)}}();(0,a.useEffect)((function(){d()}),[]);var u=l?(0,i.jsx)(o.Z,{loading:!0,active:!0}):null,m=l||0!==n.length?null:(0,i.jsx)("div",{children:"No news."});return(0,i.jsxs)("section",{className:"news-feed form-module",children:[(0,i.jsx)(E,{level:2,children:"News & Updates from Owncast"}),u,n.map((function(e){return(0,a.createElement)(T,function(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{},r=Object.keys(t);"function"===typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(t).filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})))),r.forEach((function(n){_(e,n,t[n])}))}return e}({},e,{key:e.url}))})),m]})}var I=Z.Z.Paragraph,z=Z.Z.Text,L=Z.Z.Title,B=c.Z.Meta;function F(e){var n,r,s,o,l=e.logs,m=void 0===l?[]:l,v=e.config,f=((0,a.useContext)(x.aC)||{}).serverConfig,h=f.streamKey,Z=f.rtmpServerPort,N=(null===(n=t.g.window)||void 0===n?void 0:n.location.hostname)||"";N&&Z&&(o=function(e,n){return"rtmp://".concat(e.replace(/(^\w+:|^)\/\//,""),":").concat(n,"/live")}(N,Z));var S=[{icon:(0,i.jsx)(j.Z,{twoToneColor:"#6f42c1"}),title:"Use your broadcasting software",content:(0,i.jsxs)("div",{children:[(0,i.jsx)("a",{href:"https://owncast.online/docs/broadcasting/?source=admin",target:"_blank",rel:"noopener noreferrer",children:"Learn how to point your existing software to your new server and start streaming your content."}),(0,i.jsxs)("div",{className:"stream-info-container",children:[(0,i.jsx)(z,{strong:!0,className:"stream-info-label",children:"Streaming URL:"}),o&&(0,i.jsx)(I,{className:"stream-info-box",copyable:!0,children:o}),(0,i.jsx)(z,{strong:!0,className:"stream-info-label",children:"Stream Key:"}),(0,i.jsx)(I,{className:"stream-info-box",copyable:{text:h},children:"*********************"})]})]})},{icon:(0,i.jsx)(g.Z,{twoToneColor:"#f9826c"}),title:"Embed your video onto other sites",content:(0,i.jsx)("div",{children:(0,i.jsx)("a",{href:"https://owncast.online/docs/embed?source=admin",target:"_blank",rel:"noopener noreferrer",children:"Learn how you can add your Owncast stream to other sites you control."})})}];return(null===v||void 0===v?void 0:v.chatDisabled)||S.push({icon:(0,i.jsx)(w.Z,{twoToneColor:"#0366d6"}),title:"Chat is disabled",content:(0,i.jsx)("span",{children:"Chat will continue to be disabled until you begin a live stream."})}),(null===v||void 0===v||null===(r=v.yp)||void 0===r?void 0:r.enabled)||S.push({icon:(0,i.jsx)(b.Z,{twoToneColor:"#D18BFE"}),title:"Find an audience on the Owncast Directory",content:(0,i.jsxs)("div",{children:["List yourself in the Owncast Directory and show off your stream. Enable it in"," ",(0,i.jsx)(y.default,{href:"/config-public-details",children:"settings."})]})}),(null===v||void 0===v||null===(s=v.federation)||void 0===s?void 0:s.enabled)||S.push({icon:(0,i.jsx)("img",{alt:"fediverse",width:"20px",src:"fediverse-white.png"}),title:"Add your Owncast instance to the Fediverse",content:(0,i.jsxs)("div",{children:[(0,i.jsx)(y.default,{href:"/config-federation",children:"Enable Owncast social"})," features to have your instance join the Fediverse, allowing people to follow, share and engage with your live stream."]})}),(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(d.Z,{children:(0,i.jsx)(u.Z,{span:12,offset:6,children:(0,i.jsxs)("div",{className:"offline-intro",children:[(0,i.jsx)("span",{className:"logo",children:(0,i.jsx)(k.Z,{})}),(0,i.jsxs)("div",{children:[(0,i.jsx)(L,{level:2,children:"No stream is active"}),(0,i.jsx)("p",{children:"You should start one."})]})]})})}),(0,i.jsxs)(d.Z,{gutter:[16,16],className:"offline-content",children:[(0,i.jsx)(u.Z,{span:12,xs:24,sm:24,md:24,lg:12,className:"list-section",children:S.map((function(e){return(0,i.jsx)(c.Z,{size:"small",bordered:!1,children:(0,i.jsx)(B,{avatar:e.icon,title:e.title,description:e.content})},e.title)}))}),(0,i.jsx)(u.Z,{span:12,xs:24,sm:24,md:24,lg:12,children:(0,i.jsx)(U,{})})]}),(0,i.jsx)(p.Z,{logs:m,pageSize:5})]})}var M=t(2766);function A(e,n,t,r,s,i,a){try{var o=e[i](a),l=o.value}catch(c){return void t(c)}o.done?n(l):Promise.resolve(l).then(r,s)}function Q(e){return(0,i.jsxs)("ul",{className:"statistics-list",children:[(0,i.jsxs)("li",{children:[e.videoCodec||"Unknown"," @ ",e.videoBitrate||"Unknown"," kbps"]}),(0,i.jsxs)("li",{children:[e.framerate||"Unknown"," fps"]}),(0,i.jsxs)("li",{children:[e.width," x ",e.height]})]})}function V(){var e,n,t=(0,a.useContext)(x.aC),r=t||{},j=r.broadcaster,g=r.serverConfig,w=j||{},b=w.remoteAddr,Z=w.streamDetails,y=(null===Z||void 0===Z?void 0:Z.encoder)||"Unknown encoder",k=(0,a.useState)([]),N=k[0],S=k[1],C=function(){var e,n=(e=s().mark((function e(){var n;return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,(0,O.rQ)(O.WQ);case 3:n=e.sent,S(n),e.next=10;break;case 7:e.prev=7,e.t0=e.catch(0),console.log("==== error",e.t0);case 10:case"end":return e.stop()}}),e,null,[[0,7]])})),function(){var n=this,t=arguments;return new Promise((function(r,s){var i=e.apply(n,t);function a(e){A(i,r,s,a,o,"next",e)}function o(e){A(i,r,s,a,o,"throw",e)}a(void 0)}))});return function(){return n.apply(this,arguments)}}(),_=function(){C()};if((0,a.useEffect)((function(){_();var e;return e=setInterval(_,O.NE),function(){clearInterval(e)}}),[]),(0,M.Qr)(g)||(0,M.Qr)(t))return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(o.Z,{active:!0}),(0,i.jsx)(o.Z,{active:!0}),(0,i.jsx)(o.Z,{active:!0})]});if(!j)return(0,i.jsx)(F,{logs:N,config:g});var P=null===t||void 0===t||null===(e=t.currentBroadcast)||void 0===e||null===(n=e.outputSettings)||void 0===n?void 0:n.map((function(e){var n=e.audioPassthrough,t=e.videoPassthrough,r=e.audioBitrate,s=e.videoBitrate,a=e.framerate,o=n?"".concat(Z.audioCodec||"Unknown",", ").concat(Z.audioBitrate," kbps"):"".concat(r||"Unknown"," kbps"),c=t?"".concat(Z.videoBitrate||"Unknown"," kbps, ").concat(Z.framerate," fps ").concat(Z.width," x ").concat(Z.height):"".concat(s||"Unknown"," kbps, ").concat(a," fps");return(0,i.jsxs)("div",{className:"stream-details-item-container",children:[(0,i.jsx)(l.Z,{className:"stream-details-item",title:"Outbound Video Stream",value:c}),(0,i.jsx)(l.Z,{className:"stream-details-item",title:"Outbound Audio Stream",value:o})]})})),E=t.viewerCount,D=t.sessionPeakViewerCount,T="".concat(Z.audioCodec,", ").concat(Z.audioBitrate||"Unknown"," kbps"),I=new Date(j.time);return(0,i.jsxs)("div",{className:"home-container",children:[(0,i.jsxs)("div",{className:"sections-container",children:[(0,i.jsx)("div",{className:"online-status-section",children:(0,i.jsx)(c.Z,{size:"small",type:"inner",className:"online-details-card",children:(0,i.jsxs)(d.Z,{gutter:[16,16],align:"middle",children:[(0,i.jsx)(u.Z,{span:8,sm:24,md:8,children:(0,i.jsx)(l.Z,{title:"Stream started ".concat((0,f.Z)(I,Date.now())),value:(0,h.Z)(I),prefix:(0,i.jsx)(m.Z,{})})}),(0,i.jsx)(u.Z,{span:8,sm:24,md:8,children:(0,i.jsx)(l.Z,{title:"Viewers",value:E,prefix:(0,i.jsx)(v.Z,{})})}),(0,i.jsx)(u.Z,{span:8,sm:24,md:8,children:(0,i.jsx)(l.Z,{title:"Peak viewer count",value:D,prefix:(0,i.jsx)(v.Z,{})})})]})})}),(0,i.jsxs)(d.Z,{gutter:[16,16],className:"section stream-details-section",children:[(0,i.jsxs)(u.Z,{className:"stream-details",span:12,sm:24,md:24,lg:12,children:[(0,i.jsx)(c.Z,{size:"small",title:"Outbound Stream Details",type:"inner",className:"outbound-details",children:P}),(0,i.jsxs)(c.Z,{size:"small",title:"Inbound Stream Details",type:"inner",children:[(0,i.jsx)(l.Z,{className:"stream-details-item",title:"Input",value:"".concat(y," ").concat((0,M.t5)(b))}),(0,i.jsx)(l.Z,{className:"stream-details-item",title:"Inbound Video Stream",value:Z,formatter:Q}),(0,i.jsx)(l.Z,{className:"stream-details-item",title:"Inbound Audio Stream",value:T})]})]}),(0,i.jsx)(u.Z,{span:12,xs:24,sm:24,md:24,lg:12,children:(0,i.jsx)(U,{})})]})]}),(0,i.jsx)("br",{}),(0,i.jsx)(p.Z,{logs:N,pageSize:5})]})}}},function(e){e.O(0,[962,91,961,751,763,533,429,494,774,888,179],(function(){return n=45301,e(e.s=n);var n}));var n=e.O();_N_E=n}]);