forked from hibas123/ScreenSharingThing
Merge branch 'main' of https://git.hibas.dev/hibas123/ScreenSharingThing
This commit is contained in:
commit
7ffb691922
@ -26,14 +26,14 @@
|
|||||||
<h2>Your ID: <span id="streamId"></span></h2>
|
<h2>Your ID: <span id="streamId"></span></h2>
|
||||||
<div id="streamURLCont">
|
<div id="streamURLCont">
|
||||||
<h2>Connect URL: <a id="streamURL"></a></h2>
|
<h2>Connect URL: <a id="streamURL"></a></h2>
|
||||||
|
<button id="startStramBTN">Start Stream</button>
|
||||||
</div>
|
</div>
|
||||||
<div id="connectToCont">
|
<div id="connectToCont">
|
||||||
<h2>Connecting to: <span id="connectToID"></span></h2>
|
<h2>Connecting to: <span id="connectToID"></span></h2>
|
||||||
<button id="startStramBTN">Start Stream</button>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<video id="localVideo" style="width: 100%" controls></video>
|
<video id="localVideo" style="width: 100%" controls muted></video>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
@ -96,7 +96,6 @@ function bitrateTransform(sdp) {
|
|||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
let currentStream = undefined;
|
let currentStream = undefined;
|
||||||
peer.on("open", (id) => {
|
peer.on("open", (id) => {
|
||||||
console.log("ID", id);
|
console.log("ID", id);
|
||||||
@ -117,8 +116,8 @@ peer.on("open", (id) => {
|
|||||||
video: true,
|
video: true,
|
||||||
})
|
})
|
||||||
.then((stream) => {
|
.then((stream) => {
|
||||||
if(currentStream) {
|
if (currentStream) {
|
||||||
currentStream.getTracks().forEach(track => track.stop())
|
currentStream.getTracks().forEach((track) => track.stop());
|
||||||
}
|
}
|
||||||
currentStream = stream;
|
currentStream = stream;
|
||||||
let v = sf.localVideo;
|
let v = sf.localVideo;
|
||||||
|
@ -1,4 +1,6 @@
|
|||||||
{
|
{
|
||||||
|
"name": "ScreenSharingThing",
|
||||||
|
"packageManager": "yarn@3.1.1",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build:api": "jrpc compile API/main.jrpc -o=ts-node:_API/src && yarn workspace @hibas123/screen-api build",
|
"build:api": "jrpc compile API/main.jrpc -o=ts-node:_API/src && yarn workspace @hibas123/screen-api build",
|
||||||
"build:client": "yarn workspace @hibas123/screen-client build",
|
"build:client": "yarn workspace @hibas123/screen-client build",
|
||||||
|
Loading…
Reference in New Issue
Block a user