{"id":19568354,"url":"https://github.com/medooze/whip-whep-js","last_synced_at":"2025-04-04T12:05:56.623Z","repository":{"id":46965585,"uuid":"405030229","full_name":"medooze/whip-whep-js","owner":"medooze","description":"WHIP and WHEP clients javascript module","archived":false,"fork":false,"pushed_at":"2024-12-20T10:32:13.000Z","size":68,"stargazers_count":77,"open_issues_count":8,"forks_count":15,"subscribers_count":8,"default_branch":"main","last_synced_at":"2025-03-29T17:05:47.622Z","etag":null,"topics":["webrtc","whep","whip"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/medooze.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-09-10T09:42:50.000Z","updated_at":"2025-03-25T19:50:16.000Z","dependencies_parsed_at":"2024-02-09T10:47:05.187Z","dependency_job_id":"0f00b26b-bfd1-4f65-96b2-79de286163dc","html_url":"https://github.com/medooze/whip-whep-js","commit_stats":{"total_commits":47,"total_committers":8,"mean_commits":5.875,"dds":"0.25531914893617025","last_synced_commit":"171f45125e5be0b9dfdbb014b74e5740218dffd8"},"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/medooze%2Fwhip-whep-js","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/medooze%2Fwhip-whep-js/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/medooze%2Fwhip-whep-js/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/medooze%2Fwhip-whep-js/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/medooze","download_url":"https://codeload.github.com/medooze/whip-whep-js/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247174407,"owners_count":20896076,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["webrtc","whep","whip"],"created_at":"2024-11-11T06:03:49.284Z","updated_at":"2025-04-04T12:05:56.598Z","avatar_url":"https://github.com/medooze.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Build status](https://github.com/medooze/whip-whep-js/workflows/build/badge.svg)](https://github.com/medooze/whip-whep-js/actions?query=workflow%3Abuild) [![npm package](https://img.shields.io/npm/v/whip-whep.svg?label=npm:whip-whep)](https://www.npmjs.com/package/whip-whep)\n\n# 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({ bundlePolicy: \"max-bundle\" });\n\n//Send all tracks\nfor (const track of stream.getTracks()) {\n\t//You could add simulcast too here\n\tpc.addTransceiver(track, { 'direction': 'sendonly' });\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({ bundlePolicy: \"max-bundle\" });\n\n//Add recv only transceivers\npc.addTransceiver(\"audio\");\npc.addTransceiver(\"video\");\n\npc.ontrack = (event) =\u003e\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","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmedooze%2Fwhip-whep-js","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmedooze%2Fwhip-whep-js","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmedooze%2Fwhip-whep-js/lists"}