{"id":13908749,"url":"https://github.com/koala-interactive/wowza-webrtc-player","last_synced_at":"2025-10-27T12:31:10.825Z","repository":{"id":41951672,"uuid":"268788812","full_name":"koala-interactive/wowza-webrtc-player","owner":"koala-interactive","description":"WebRTC player for Wowza live video streaming platform","archived":false,"fork":false,"pushed_at":"2024-08-13T15:58:00.000Z","size":295,"stargazers_count":39,"open_issues_count":11,"forks_count":15,"subscribers_count":16,"default_branch":"master","last_synced_at":"2025-02-05T14:06:50.466Z","etag":null,"topics":["typescript","webrtc","wowza","wowzawebbrtc"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/koala-interactive.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","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":"2020-06-02T12:00:23.000Z","updated_at":"2025-01-21T10:52:08.000Z","dependencies_parsed_at":"2024-12-16T12:28:05.433Z","dependency_job_id":"93d8a07f-a9ce-4afc-a2b4-c842d9778c0f","html_url":"https://github.com/koala-interactive/wowza-webrtc-player","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/koala-interactive%2Fwowza-webrtc-player","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/koala-interactive%2Fwowza-webrtc-player/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/koala-interactive%2Fwowza-webrtc-player/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/koala-interactive%2Fwowza-webrtc-player/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/koala-interactive","download_url":"https://codeload.github.com/koala-interactive/wowza-webrtc-player/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":238495707,"owners_count":19481913,"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":["typescript","webrtc","wowza","wowzawebbrtc"],"created_at":"2024-08-06T23:02:57.553Z","updated_at":"2025-10-27T12:31:10.408Z","avatar_url":"https://github.com/koala-interactive.png","language":"TypeScript","funding_links":[],"categories":["HarmonyOS"],"sub_categories":["Windows Manager"],"readme":"# Wowza WebRTC Player\n\nEasy to use **WebRTC** Player library to connect to **Wowza Media Server**.\n\n[![license: MIT](https://img.shields.io/badge/license-MIT-brightgreen.svg)](https://opensource.org/licenses/MIT)\n![lint](https://github.com/koala-interactive/wowza-webrtc-player/workflows/lint/badge.svg?branch=master)\n\n---\n\n## 🚀 Installation\n\nInstall with [yarn](https://yarnpkg.com):\n\n    $ yarn add wowza-webrtc-player\n\nOr install using [npm](https://npmjs.org):\n\n    $ npm i wowza-webrtc-player\n\n---\n\n## Base code\n\nTo works, we need to create a **WowzaWebRTCPlayer** instance bound to a HTML5 video element.\nThe second parameters allows you to set different [options](#Options). You can change it later using `player.setConfigurations(options)`.\n\n```ts\nimport { WowzaWebRTCPlayer } from 'wowza-webrtc-player';\n\nconst videoElement = document.querySelector('video');\nconst player = new WowzaWebRTCPlayer(videoElement, {\n  sdpUrl: 'wss://zeezzrezrezr.streamlock.net/webrtc-session.json',\n  applicationName: 'webrtc',\n  streamName: 'myStream',\n});\n```\n\n## As a publisher\n\n#### 1. Play the camera locally.\n\nIt will ask for browser permission, and connect your camera to the video element.\n\n```ts\nawait player.playLocal();\n```\n\n#### 2. Publish video to Wowza\n\n```ts\nawait player.publish();\n```\n\n#### 3. Stop publishing the flux (but camera still active)\n\n```ts\nawait player.stop();\n```\n\n#### 4. Stop the camera (and also stop publishing the flux)\n\n```ts\nawait player.stopLocal();\n```\n\n---\n\n## As a Viewer\n\n#### 1. Read the remote flux\n\n```ts\nawait player.playRemote();\n```\n\n#### 2. Stop it\n\n```ts\nawait player.stop();\n```\n\n---\n\n---\n\n## Access/Update mediaStream\n\n```ts\nconst stream = player.getMediaStream();\n\nplayer.attachStream(newStream);\n```\n\n---\n\n## Extends/Replace SDP Mungle\n\n```ts\nplayer.setConfigurations({\n  sdpHandler(sdp, originalHandler, type) {\n    if (type === 'play') {\n      // update sdp\n      return originalHandler(sdp);\n    } else if (type === 'publish') {\n      // update sdp\n      return originalHandler(sdp);\n    }\n  },\n});\n```\n\n---\n\n## Get Wowza running streams\n\n_It need to be enabled in your Wowza server._\n\n```ts\nconst streams = await player.getAvailableStreams();\n\nstreams.forEach((stream) =\u003e {\n  console.log(\n    stream.streamName,\n    stream.codecAudio,\n    stream.codecVideo,\n    stream.readyAudio,\n    stream.readyVideo\n  );\n});\n```\n\n---\n\n## Options\n\n| Key             | Type                                                                                                |                                                                                                                |\n| --------------- | --------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- |\n| applicationName | _`string`_                                                                                          | Your wowza app name (`\"live\"` or `\"webrtc\"` in Wowza documentation).                                           |\n| streamName      | _`string`_                                                                                          | Your Wowza stream name (`\"myStream\"` in Wowza documentation)                                                   |\n| sdpUrl          | _`string`_                                                                                          | Your Wowza websocket secured url (should looks like `\"wss://zeezzrezrezr.streamlock.net/webrtc-session.json\"`) | \n| constraints      | _[MediaStreamConstraints](https://developer.mozilla.org/en-US/docs/Web/API/MediaStreamConstraints)_ | `{ video: true, audio: true }`                                                                                 |\n| iceServers      | _[RTCIceServer](https://developer.mozilla.org/en-US/docs/Web/API/RTCIceServer)_                     | List of your ICE server to connect to                                                                          |\n| videoConfigs    | _`Object`_                                                                                          | `{ bitRate:360, codec:'VP8', frameRate: 29.97 }`                                                               |\n| audioConfigs    | _`Object`_                                                                                          | `{ bitRate:64, codec:'opus' }`                                                                                 |                                |\n| secureToken        | _`Object / null`_                                                                                   | `{\"hash\":\"YOURHASHEDSECRET\",\"starttime\":0,\"endtime\":0}`                                 |\n| userData        | _`Object / null`_                                                                                   | Can be used to send data to Wowza \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkoala-interactive%2Fwowza-webrtc-player","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkoala-interactive%2Fwowza-webrtc-player","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkoala-interactive%2Fwowza-webrtc-player/lists"}