{"_id":"@cameronelliott/whip-whep","_rev":"1-de8d1c546e43ec470c9b4955f22c9cc6","name":"@cameronelliott/whip-whep","dist-tags":{"latest":"1.100.1"},"versions":{"1.0.3":{"name":"@cameronelliott/whip-whep","version":"1.0.3","description":"WHIP and WHEP clients","module":true,"repository":{"type":"git","url":"git+https://github.com/medooze/whip-whep-js.git"},"keywords":["webrtc","whip","whep"],"author":{"name":"Sergio Garcia Murillo @ medooze"},"license":"MIT","bugs":{"url":"https://github.com/medooze/whip-whep-js/issues"},"homepage":"https://github.com/medooze/whip-whep-js#readme","_id":"@cameronelliott/whip-whep@1.0.3","gitHead":"704f4abaee3cbfd92559c4ac9928e16d747c1ee0","_nodeVersion":"20.6.1","_npmVersion":"9.8.1","dist":{"integrity":"sha512-yU3dQb/1/JsNfObxx9zzCCDmGW1ZwISrRxSJbQXNp9m89cYGH6RExThzGS6c9YIO5guClvIBsyn8sJ+t+EhxcA==","shasum":"6d3e1ffa38bde0b335656905715c5bcf6f1b8a7b","tarball":"https://registry.npmjs.org/@cameronelliott/whip-whep/-/whip-whep-1.0.3.tgz","fileCount":5,"unpackedSize":25112,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDf2DezxFb2H2n0ksRnGa1fa176Sc5nXh909JMUp6tmtAIhALea9nOK0eB7A/Kn0CWZoPNBTaagQKsfhML9pVjRQe6B"}]},"_npmUser":{"name":"cameronelliott","email":"cameron@cameronelliott.com"},"directories":{},"maintainers":[{"name":"cameronelliott","email":"cameron@cameronelliott.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/whip-whep_1.0.3_1695257194933_0.4893381721675385"},"_hasShrinkwrap":false},"1.100.1":{"name":"@cameronelliott/whip-whep","version":"1.100.1","description":"WHIP and WHEP clients","type":"module","repository":{"type":"git","url":"git+https://github.com/medooze/whip-whep-js.git"},"keywords":["webrtc","whip","whep"],"author":{"name":"Sergio Garcia Murillo @ medooze"},"license":"MIT","bugs":{"url":"https://github.com/medooze/whip-whep-js/issues"},"homepage":"https://github.com/medooze/whip-whep-js#readme","_id":"@cameronelliott/whip-whep@1.100.1","gitHead":"e08704683c895a6b67477082fc2f0dd9ef76b4bb","_nodeVersion":"20.6.1","_npmVersion":"9.8.1","dist":{"integrity":"sha512-j7xSEM0ctqfSfsfbeCfjxN1QZ0pzQTOPNzdqNzz9X7M6cU9wXnsKqbYxb15Q/XBSls+vjY2qB5ZHDf7BRtCCKA==","shasum":"14e43ce70b210cc2182e814c0facc8c079530bd9","tarball":"https://registry.npmjs.org/@cameronelliott/whip-whep/-/whip-whep-1.100.1.tgz","fileCount":7,"unpackedSize":25701,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHrloR7Ear3kSj8er4IJX9wKh+ecXqq5NvsgRRsrYCBuAiEAyC0Jb5ryUcMSLAb9OqSFB0bMW9ycfoWSNSG9fRz0D2o="}]},"_npmUser":{"name":"cameronelliott","email":"cameron@cameronelliott.com"},"directories":{},"maintainers":[{"name":"cameronelliott","email":"cameron@cameronelliott.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/whip-whep_1.100.1_1696290666471_0.31465915161455693"},"_hasShrinkwrap":false}},"time":{"created":"2023-09-21T00:46:34.840Z","1.0.3":"2023-09-21T00:46:35.122Z","modified":"2023-10-02T23:51:06.842Z","1.100.1":"2023-10-02T23:51:06.676Z"},"maintainers":[{"name":"cameronelliott","email":"cameron@cameronelliott.com"}],"description":"WHIP and WHEP clients","homepage":"https://github.com/medooze/whip-whep-js#readme","keywords":["webrtc","whip","whep"],"repository":{"type":"git","url":"git+https://github.com/medooze/whip-whep-js.git"},"author":{"name":"Sergio Garcia Murillo @ medooze"},"bugs":{"url":"https://github.com/medooze/whip-whep-js/issues"},"license":"MIT","readme":"# whip.js\nWHIP client javascript module\n\n## Example\n\n```\nimport { WHIPClient } from \"whip.js\"\n\n//Get mic+cam\nconst stream = await navigator.mediaDevices.getUserMedia({audio:true, video:true});\n\n//Create peerconnection\nconst pc = new RTCPeerConnection();\n\n//Send all tracks\nfor (const track of stream.getTracks()) {\n\t//You could add simulcast too here\n\tpc.addTrack(track);\n}\n\n//Create whip client\nconst whip = new WHIPClient();\n\nconst url = \"https://whip.test/whip/endpoint\";\nconst token = \"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IndoaXAgdGVzdCIsImlhdCI6MTUxNjIzOTAyMn0.jpM01xu_vnSXioxQ3I7Z45bRh5eWRBEY2WJPZ6FerR8\";\n\n//Start publishing\nwhip.publish(pc, url, token);\n\n```\n\n# whep.js\nWHEP client javascript module\n\n## Example\n\n```\nimport { WHEPClient } from \"whep.js\"\n\n//Create peerconnection\nconst pc = window.pc = new RTCPeerConnection();\n\n//Add recv only transceivers\npc.addTransceiver(\"audio\");\npc.addTransceiver(\"video\");\n\npc.ontrack = (event) =>\n{\n\tconsole.log(event)\n\tif (event.track.kind == \"video\")\n\t\tdocument.querySelector(\"video\").srcObject = event.streams[0];\n}\n\n//Create whep client\nconst whep = new WHEPClient();\n\nconst url = \"https://whep.test/whep/endpoint\";\nconst token = \"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJtaWxsaWNhc3QiOnsidHlwZSI6IlN1YnNjcmliZSIsInNlcnZlcklkIjoidmlld2VyMSIsInN0cmVhbUFjY291bnRJZCI6InRlc3QiLCJzdHJlYW1OYW1lIjoidGVzdCJ9LCJpYXQiOjE2NzY2NDkxOTd9.ZE8Ftz9qiS04zTKBqP1MHZTOh8dvI73FBraleQM9h1A\"\n\n//Start viewing\nwhep.view(pc, url, token);\n\n```\n","readmeFilename":"README.md"}