@impleotv/stanag-player 0.1.12 → 0.1.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/index.js +1 -1
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/esm/index.js.map +1 -1
- package/package.json +1 -1
package/dist/cjs/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react");function t(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var n=t(e),o=function(t){var o=e.useRef(null),r=e.useRef(!0),c=e.useState(16/9),a=c[0],i=c[1],s=e.useState({width:t.width,height:t.width/a}),d=s[0],u=s[1],l=e.useState({width:1920,height:1080}),h=l[0],g=l[1],f=e.useRef(),v={iceServers:[{urls:t.iceServers}]};e.useEffect((function(){try{var e=f.current;e.ontrack=function(e){null!=o.current&&(o.current.srcObject=e.streams[0],o.current.muted=!0,o.current.autoplay=t.autoplay,o.current.controls=t.controls,o.current.addEventListener("pause",(function(e){r.current=!0})),o.current.addEventListener("play",(function(e){r.current=!1})),o.current.addEventListener("loadedmetadata",(function(e){var n;g({width:o.current.videoWidth,height:o.current.videoHeight}),null===(n=t.onStreamInfo)||void 0===n||n.call(t,{videoWidth:o.current.videoWidth,videoHeight:o.current.videoHeight})})))},e.onconnectionstatechange=function(t){return console.log(e.iceConnectionState)},e.oniceconnectionstatechange=function(t){return console.log(e.iceConnectionState)},e.onicegatheringstatechange=function(t){return console.log(e.iceGatheringState)},e.addTransceiver("video",{direction:"sendrecv"});var n=e.createDataChannel("klv");n.binaryType="arraybuffer",n.onclose=function(){return console.log("dataChannel has closed")},n.onopen=function(){return console.log("dataChannel has opened")},n.onmessage=function(e){var n=new DataView(e.data),o=new TextDecoder("utf8"),c=JSON.parse(o.decode(n));switch(c.type){case"klv":r.current||t.onDataReceive&&t.onDataReceive(new Date(c.klvs[2]/1e3).toISOString(),c.klvs);break;case"msg":t.onMessageReceive&&t.onMessageReceive(c.msg);break;case"state":t.onStateChange&&t.onStateChange(c.state)}};var c=t.serverUrl?t.serverUrl:window.location.origin,a=new URL(c),i="ws";"http:"!=a.protocol&&(i+="s");var s=new WebSocket(i+"://".concat(a.host,"/ws"));s.onmessage=function(
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react");function t(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var n=t(e),o=function(t){var o=e.useRef(null),r=e.useRef(!0),c=e.useState(16/9),a=c[0],i=c[1],s=e.useState({width:t.width,height:t.width/a}),d=s[0],u=s[1],l=e.useState({width:1920,height:1080}),h=l[0],g=l[1],f=e.useRef(),v={iceServers:[{urls:t.iceServers}]};e.useEffect((function(){try{var e=f.current;e.ontrack=function(e){null!=o.current&&(o.current.srcObject=e.streams[0],o.current.muted=!0,o.current.autoplay=t.autoplay,o.current.controls=t.controls,o.current.addEventListener("pause",(function(e){r.current=!0})),o.current.addEventListener("play",(function(e){r.current=!1})),o.current.addEventListener("loadedmetadata",(function(e){var n;g({width:o.current.videoWidth,height:o.current.videoHeight}),null===(n=t.onStreamInfo)||void 0===n||n.call(t,{videoWidth:o.current.videoWidth,videoHeight:o.current.videoHeight})})))},e.onconnectionstatechange=function(t){return console.log(e.iceConnectionState)},e.oniceconnectionstatechange=function(t){return console.log(e.iceConnectionState)},e.onicegatheringstatechange=function(t){return console.log(e.iceGatheringState)},e.addTransceiver("video",{direction:"sendrecv"});var n=e.createDataChannel("klv");n.binaryType="arraybuffer",n.onclose=function(){return console.log("dataChannel has closed")},n.onopen=function(){return console.log("dataChannel has opened")},n.onmessage=function(e){var n=new DataView(e.data),o=new TextDecoder("utf8"),c=JSON.parse(o.decode(n));switch(c.type){case"klv":r.current||t.onDataReceive&&t.onDataReceive(new Date(c.klvs[2]/1e3).toISOString(),c.klvs);break;case"msg":t.onMessageReceive&&t.onMessageReceive(c.msg);break;case"state":t.onStateChange&&t.onStateChange(c.state)}};var c=t.serverUrl?t.serverUrl:window.location.origin,a=new URL(c),i="ws";"http:"!=a.protocol&&(i+="s");var s=new WebSocket(i+"://".concat(a.host,"/ws"));s.onmessage=function(n){var o=JSON.parse(n.data);if(!o)return console.log("failed to parse msg");o.error?(console.log(o.error),t.onError&&t.onError(o.error)):o.candidate?e.addIceCandidate(o):e.setRemoteDescription(o)},s.onerror=function(e){console.log("Websocket Error.")},s.onclose=function(e){t.onConnected&&t.onConnected(!1),1e3!=e.code&&(console.log("Websocket closed: ".concat(e.code)),t.onError&&t.onError("Websocket error: ".concat(e.code)))},e.onicecandidate=function(e){e.candidate&&""!==e.candidate.candidate&&s.send(JSON.stringify(e.candidate))},s.onopen=function(){t.onConnected&&t.onConnected(!0),e.createOffer().then((function(t){e.setLocalDescription(t),s.send(JSON.stringify(t))}))}}catch(e){console.log("Error: ".concat(e.message))}return function(){console.log("Player close")}}),[]),e.useEffect((function(){try{var e=h.width/h.height;i(e),u({width:t.width,height:t.width/e})}catch(e){console.log("Error: ".concat(e.message))}}),[h.width,h.height,t.width]);try{void 0===f.current&&(f.current=new RTCPeerConnection(v))}catch(e){console.log("Error: ".concat(e.message))}var w={width:d.width,height:d.height};return n.default.createElement("video",{style:w,ref:o})};o.defaultProps={width:360,controls:!0,autoplay:!0,iceServers:"stun:stun.l.google.com:19302"};var r=function(e){return n.default.createElement(r,null,e.label)};exports.KlvView=r,exports.StanagPlayer=o;
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
package/dist/cjs/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../src/components/StanagPlayer/StanagPlayer.tsx","../../src/components/KlvView/KlvView.tsx"],"sourcesContent":[null,null],"names":["StanagPlayer","props","videoPlayer","useRef","isPaused","_a","useState","aspectRatio","setAspectRatio","_b","width","height","playerSize","setPlayerSize","_c","videoDimension","setVideoDimension","peerConnection","configuration","iceServers","urls","useEffect","pc_1","current","ontrack","event","srcObject","streams","muted","autoplay","controls","addEventListener","videoWidth","videoHeight","onStreamInfo","call","onconnectionstatechange","e","console","log","iceConnectionState","oniceconnectionstatechange","onicegatheringstatechange","iceGatheringState","addTransceiver","direction","dataChannel","createDataChannel","binaryType","onclose","onopen","onmessage","dataView","DataView","data","decoder","TextDecoder","msg","JSON","parse","decode","type","onDataReceive","Date","klvs","toISOString","onMessageReceive","onStateChange","state","location_1","serverUrl","window","location","origin","uri","URL","wsProto","protocol","socket_1","WebSocket","concat","host","candidate","addIceCandidate","setRemoteDescription","onerror","onConnected","code","
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../src/components/StanagPlayer/StanagPlayer.tsx","../../src/components/KlvView/KlvView.tsx"],"sourcesContent":[null,null],"names":["StanagPlayer","props","videoPlayer","useRef","isPaused","_a","useState","aspectRatio","setAspectRatio","_b","width","height","playerSize","setPlayerSize","_c","videoDimension","setVideoDimension","peerConnection","configuration","iceServers","urls","useEffect","pc_1","current","ontrack","event","srcObject","streams","muted","autoplay","controls","addEventListener","videoWidth","videoHeight","onStreamInfo","call","onconnectionstatechange","e","console","log","iceConnectionState","oniceconnectionstatechange","onicegatheringstatechange","iceGatheringState","addTransceiver","direction","dataChannel","createDataChannel","binaryType","onclose","onopen","onmessage","dataView","DataView","data","decoder","TextDecoder","msg","JSON","parse","decode","type","onDataReceive","Date","klvs","toISOString","onMessageReceive","onStateChange","state","location_1","serverUrl","window","location","origin","uri","URL","wsProto","protocol","socket_1","WebSocket","concat","host","error","onError","candidate","addIceCandidate","setRemoteDescription","onerror","onConnected","code","onicecandidate","send","stringify","createOffer","then","offer","setLocalDescription","message","curAspectRatio","undefined","RTCPeerConnection","playerStyle","React","createElement","style","ref","defaultProps","KlvView","label"],"mappings":"8KA0BMA,EAAe,SAACC,GAEpB,IAAMC,EAAcC,SAAO,MACrBC,EAAWD,UAAO,GAClBE,EAAgCC,EAAAA,SAAS,GAAK,GAA7CC,EAAWF,EAAA,GAAEG,OACdC,EAA8BH,E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AM2G,MACzB"}
|
package/dist/esm/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import e,{useRef as n,useState as t,useEffect as o}from"react";var r=function(r){var c=n(null),a=n(!0),i=t(16/9),s=i[0],d=i[1],l=t({width:r.width,height:r.width/s}),u=l[0],h=l[1],g=t({width:1920,height:1080}),v=g[0],f=g[1],w=n(),p={iceServers:[{urls:r.iceServers}]};o((function(){try{var e=w.current;e.ontrack=function(e){null!=c.current&&(c.current.srcObject=e.streams[0],c.current.muted=!0,c.current.autoplay=r.autoplay,c.current.controls=r.controls,c.current.addEventListener("pause",(function(e){a.current=!0})),c.current.addEventListener("play",(function(e){a.current=!1})),c.current.addEventListener("loadedmetadata",(function(e){var n;f({width:c.current.videoWidth,height:c.current.videoHeight}),null===(n=r.onStreamInfo)||void 0===n||n.call(r,{videoWidth:c.current.videoWidth,videoHeight:c.current.videoHeight})})))},e.onconnectionstatechange=function(n){return console.log(e.iceConnectionState)},e.oniceconnectionstatechange=function(n){return console.log(e.iceConnectionState)},e.onicegatheringstatechange=function(n){return console.log(e.iceGatheringState)},e.addTransceiver("video",{direction:"sendrecv"});var n=e.createDataChannel("klv");n.binaryType="arraybuffer",n.onclose=function(){return console.log("dataChannel has closed")},n.onopen=function(){return console.log("dataChannel has opened")},n.onmessage=function(e){var n=new DataView(e.data),t=new TextDecoder("utf8"),o=JSON.parse(t.decode(n));switch(o.type){case"klv":a.current||r.onDataReceive&&r.onDataReceive(new Date(o.klvs[2]/1e3).toISOString(),o.klvs);break;case"msg":r.onMessageReceive&&r.onMessageReceive(o.msg);break;case"state":r.onStateChange&&r.onStateChange(o.state)}};var t=r.serverUrl?r.serverUrl:window.location.origin,o=new URL(t),i="ws";"http:"!=o.protocol&&(i+="s");var s=new WebSocket(i+"://".concat(o.host,"/ws"));s.onmessage=function(n){var t=JSON.parse(n.data);if(!t)return console.log("failed to parse msg");t.candidate?e.addIceCandidate(t):e.setRemoteDescription(t)},s.onerror=function(e){console.log("Websocket Error.")},s.onclose=function(e){r.onConnected&&r.onConnected(!1),1e3!=e.code&&(console.log("Websocket closed: ".concat(e.code)),r.onError&&r.onError("Websocket error: ".concat(e.code)))},e.onicecandidate=function(e){e.candidate&&""!==e.candidate.candidate&&s.send(JSON.stringify(e.candidate))},s.onopen=function(){r.onConnected&&r.onConnected(!0),e.createOffer().then((function(n){e.setLocalDescription(n),s.send(JSON.stringify(n))}))}}catch(e){console.log("Error: ".concat(e.message))}return function(){console.log("Player close")}}),[]),o((function(){try{var e=v.width/v.height;d(e),h({width:r.width,height:r.width/e})}catch(e){console.log("Error: ".concat(e.message))}}),[v.width,v.height,r.width]);try{void 0===w.current&&(w.current=new RTCPeerConnection(p))}catch(e){console.log("Error: ".concat(e.message))}var m={width:u.width,height:u.height};return e.createElement("video",{style:m,ref:c})};r.defaultProps={width:360,controls:!0,autoplay:!0,iceServers:"stun:stun.l.google.com:19302"};var c=function(n){return e.createElement(c,null,n.label)};export{c as KlvView,r as StanagPlayer};
|
|
1
|
+
import e,{useRef as n,useState as t,useEffect as o}from"react";var r=function(r){var c=n(null),a=n(!0),i=t(16/9),s=i[0],d=i[1],l=t({width:r.width,height:r.width/s}),u=l[0],h=l[1],g=t({width:1920,height:1080}),v=g[0],f=g[1],w=n(),p={iceServers:[{urls:r.iceServers}]};o((function(){try{var e=w.current;e.ontrack=function(e){null!=c.current&&(c.current.srcObject=e.streams[0],c.current.muted=!0,c.current.autoplay=r.autoplay,c.current.controls=r.controls,c.current.addEventListener("pause",(function(e){a.current=!0})),c.current.addEventListener("play",(function(e){a.current=!1})),c.current.addEventListener("loadedmetadata",(function(e){var n;f({width:c.current.videoWidth,height:c.current.videoHeight}),null===(n=r.onStreamInfo)||void 0===n||n.call(r,{videoWidth:c.current.videoWidth,videoHeight:c.current.videoHeight})})))},e.onconnectionstatechange=function(n){return console.log(e.iceConnectionState)},e.oniceconnectionstatechange=function(n){return console.log(e.iceConnectionState)},e.onicegatheringstatechange=function(n){return console.log(e.iceGatheringState)},e.addTransceiver("video",{direction:"sendrecv"});var n=e.createDataChannel("klv");n.binaryType="arraybuffer",n.onclose=function(){return console.log("dataChannel has closed")},n.onopen=function(){return console.log("dataChannel has opened")},n.onmessage=function(e){var n=new DataView(e.data),t=new TextDecoder("utf8"),o=JSON.parse(t.decode(n));switch(o.type){case"klv":a.current||r.onDataReceive&&r.onDataReceive(new Date(o.klvs[2]/1e3).toISOString(),o.klvs);break;case"msg":r.onMessageReceive&&r.onMessageReceive(o.msg);break;case"state":r.onStateChange&&r.onStateChange(o.state)}};var t=r.serverUrl?r.serverUrl:window.location.origin,o=new URL(t),i="ws";"http:"!=o.protocol&&(i+="s");var s=new WebSocket(i+"://".concat(o.host,"/ws"));s.onmessage=function(n){var t=JSON.parse(n.data);if(!t)return console.log("failed to parse msg");t.error?(console.log(t.error),r.onError&&r.onError(t.error)):t.candidate?e.addIceCandidate(t):e.setRemoteDescription(t)},s.onerror=function(e){console.log("Websocket Error.")},s.onclose=function(e){r.onConnected&&r.onConnected(!1),1e3!=e.code&&(console.log("Websocket closed: ".concat(e.code)),r.onError&&r.onError("Websocket error: ".concat(e.code)))},e.onicecandidate=function(e){e.candidate&&""!==e.candidate.candidate&&s.send(JSON.stringify(e.candidate))},s.onopen=function(){r.onConnected&&r.onConnected(!0),e.createOffer().then((function(n){e.setLocalDescription(n),s.send(JSON.stringify(n))}))}}catch(e){console.log("Error: ".concat(e.message))}return function(){console.log("Player close")}}),[]),o((function(){try{var e=v.width/v.height;d(e),h({width:r.width,height:r.width/e})}catch(e){console.log("Error: ".concat(e.message))}}),[v.width,v.height,r.width]);try{void 0===w.current&&(w.current=new RTCPeerConnection(p))}catch(e){console.log("Error: ".concat(e.message))}var m={width:u.width,height:u.height};return e.createElement("video",{style:m,ref:c})};r.defaultProps={width:360,controls:!0,autoplay:!0,iceServers:"stun:stun.l.google.com:19302"};var c=function(n){return e.createElement(c,null,n.label)};export{c as KlvView,r as StanagPlayer};
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
package/dist/esm/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../src/components/StanagPlayer/StanagPlayer.tsx","../../src/components/KlvView/KlvView.tsx"],"sourcesContent":[null,null],"names":["StanagPlayer","props","videoPlayer","useRef","isPaused","_a","useState","aspectRatio","setAspectRatio","_b","width","height","playerSize","setPlayerSize","_c","videoDimension","setVideoDimension","peerConnection","configuration","iceServers","urls","useEffect","pc_1","current","ontrack","event","srcObject","streams","muted","autoplay","controls","addEventListener","videoWidth","videoHeight","onStreamInfo","call","onconnectionstatechange","e","console","log","iceConnectionState","oniceconnectionstatechange","onicegatheringstatechange","iceGatheringState","addTransceiver","direction","dataChannel","createDataChannel","binaryType","onclose","onopen","onmessage","dataView","DataView","data","decoder","TextDecoder","msg","JSON","parse","decode","type","onDataReceive","Date","klvs","toISOString","onMessageReceive","onStateChange","state","location_1","serverUrl","window","location","origin","uri","URL","wsProto","protocol","socket_1","WebSocket","concat","host","candidate","addIceCandidate","setRemoteDescription","onerror","onConnected","code","
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../src/components/StanagPlayer/StanagPlayer.tsx","../../src/components/KlvView/KlvView.tsx"],"sourcesContent":[null,null],"names":["StanagPlayer","props","videoPlayer","useRef","isPaused","_a","useState","aspectRatio","setAspectRatio","_b","width","height","playerSize","setPlayerSize","_c","videoDimension","setVideoDimension","peerConnection","configuration","iceServers","urls","useEffect","pc_1","current","ontrack","event","srcObject","streams","muted","autoplay","controls","addEventListener","videoWidth","videoHeight","onStreamInfo","call","onconnectionstatechange","e","console","log","iceConnectionState","oniceconnectionstatechange","onicegatheringstatechange","iceGatheringState","addTransceiver","direction","dataChannel","createDataChannel","binaryType","onclose","onopen","onmessage","dataView","DataView","data","decoder","TextDecoder","msg","JSON","parse","decode","type","onDataReceive","Date","klvs","toISOString","onMessageReceive","onStateChange","state","location_1","serverUrl","window","location","origin","uri","URL","wsProto","protocol","socket_1","WebSocket","concat","host","error","onError","candidate","addIceCandidate","setRemoteDescription","onerror","onConnected","code","onicecandidate","send","stringify","createOffer","then","offer","setLocalDescription","message","curAspectRatio","undefined","RTCPeerConnection","playerStyle","React","createElement","style","ref","defaultProps","KlvView","label"],"mappings":"+DA0BM,IAAAA,EAAe,SAACC,GAEpB,IAAMC,EAAcC,EAAO,MACrBC,EAAWD,GAAO,GAClBE,EAAgCC,EAAS,GAAK,GAA7CC,EAAWF,EAAA,GAAEG,OACdC,EAA8BH,EAAS,CAAEI,MAAOT,EAAMS,MAAOC,OAAQV,EAAMS,MAAQH,IAAlFK,EAAUH,EAAA,GAAEI,EAAaJ,EAAA,GAC1BK,EAAsCR,EAAS,CAAEI,MAAO,KAAMC,OAAQ,OAArEI,OAAgBC,OAEjBC,EAAiBd,IAEjBe,EAAgB,CACpBC,WAAY,CAAC,CAAEC,KAAMnB,EAAMkB,cAG7BE,GAAU,WAER,IAEE,IAAMC,EAAKL,EAAeM,QAE1BD,EAAGE,QAAU,SAAUC,GAEM,MAAvBvB,EAAYqB,UACdrB,EAAYqB,QAAQG,UAAYD,EAAME,QAAQ,GAC9CzB,EAAYqB,QAAQK,OAAQ,EAC5B1B,EAAYqB,QAAQM,SAAW5B,EAAM4B,SACrC3B,EAAYqB,QAAQO,SAAW7B,EAAM6B,SACrC5B,EAAYqB,QAAQQ,iBAAiB,SAAS,SAACN,GAC7CrB,EAASmB,SAAU,CACrB,IACArB,EAAYqB,QAAQQ,iBAAiB,QAAQ,SAACN,GAC5CrB,EAASmB,SAAU,CACrB,IAEArB,EAAYqB,QAAQQ,iBAAiB,kBAAkB,SAACN,SACtDT,EAAkB,CAAEN,MAAOR,EAAYqB,QAAQS,WAAYrB,OAAQT,EAAYqB,QAAQU,cACrE,QAAlB5B,EAAAJ,EAAMiC,oBAAY,IAAA7B,GAAAA,EAAA8B,KAAAlC,EAAG,CAAE+B,WAAY9B,EAAYqB,QAAQS,WAAYC,YAAa/B,EAAYqB,QAAQU,aACtG,IAEJ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