![Create React App Officially Deprecated Amid React 19 Compatibility Issues](https://cdn.sanity.io/images/cgdhsj6q/production/04fa08cf844d798abc0e1a6391c129363cc7e2ab-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Create React App Officially Deprecated Amid React 19 Compatibility Issues
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
webrtc-myip
Advanced tools
A library for WebRTC media streaming
Presenter's flow | Viewer's flow |
---|---|
1. Create webRTC client instance | |
const rtc = new RTC(WS_SERVER_URL, RTC_CONFIG); | |
2. Set media source | 2. Set media destination |
rtc.setSourceVideo('userMedia', userMedia); | rtc.connectDestinationVideo('userMedia', userMedia); |
3. Join a room as a streamer | 3. Join a room as a viewer |
rtc.join(room, true); | rtc.join(room, false); |
npm install webrtc-myip
import { RTC_CONFIG, WS_SERVER_URL } from "./config";
import RTC, { STREAM_EVENTS } from "webrtc-myip";
const webcamEl = <HTMLVideoElement>document.getElementById('webcam');
const screenEl = <HTMLVideoElement>document.getElementById('screen');
const queryString = require('query-string');
const { room, isStreamer } = queryString.parse(location.search);
const rtc = new RTC(WS_SERVER_URL, RTC_CONFIG);
console.log(room, isStreamer);
async function streamerFlow(room: string) {
webcamEl.srcObject = await rtc.setupMedia('userMedia');
const connection = await rtc.join(room, isStreamer);
}
async function viewerFlow(room: string) {
const connection = await rtc.join(room, isStreamer);
connection.on(STREAM_EVENTS.REMOTE_USER_MEDIA, (stream: MediaStream) => {
webcamEl.srcObject = stream;
});
connection.on(STREAM_EVENTS.REMOTE_DISPLAY, (stream: MediaStream) => {
screenEl.srcObject = stream;
});
}
if (isStreamer) {
streamerFlow(room).catch(console.error);
} else {
viewerFlow(room).catch(console.error);
}
See working example code in the example folder
Read full documentation here
To exchange peer negotiation messages (offer & answer) WebRTC-myip uses web socket.
Pass WS URL in RTC
instance constructor to connect to your socket.
new RTC(WS_SERVER_URL, RTC_CONFIG)
Your socket has to implement following types of events:
'me'
- passes just connected user id to the connected user'other'
- passes connected user id to Presenter'message'
- translate user's message to other participantsSee sample socket code in the example folder
FAQs
WebRTC client
We found that webrtc-myip demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.