-
-
Notifications
You must be signed in to change notification settings - Fork 235
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into Robin/20201211-prometheus
- Loading branch information
Showing
8 changed files
with
38 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -170,6 +170,7 @@ <h3>Pion</h3> | |
onclick="controlRemoteVideo(this)" | ||
value="high" | ||
name="optremotevideos" | ||
checked | ||
/> | ||
High</label | ||
> | ||
|
@@ -328,7 +329,8 @@ <h3>Pion</h3> | |
integrity="sha384-B4gt1jrGC7Jh4AgTPSdUtOBvfO8shuf57BaghqFfPlYxofvL8/KUEfYiJOMMV+rV" | ||
crossorigin="anonymous" | ||
></script> | ||
<script src="https://unpkg.com/[email protected]/dist/ion-sdk.min.js"></script> | ||
<script src="https://unpkg.com/[email protected]/dist/ion-sdk.min.js"></script> | ||
<script src="https://unpkg.com/[email protected]/dist/json-rpc.min.js"></script> | ||
<script> | ||
const localVideo = document.getElementById("local-video"); | ||
const remoteVideo = document.getElementById("remote-video"); | ||
|
@@ -350,15 +352,18 @@ <h3>Pion</h3> | |
/* eslint-env browser */ | ||
const joinBtns = document.getElementById("start-btns"); | ||
|
||
const signalLocal = new IonSDK.IonSFUJSONRPCSignal( | ||
const signalLocal = new Signal.IonSFUJSONRPCSignal( | ||
"ws://localhost:7000/ws" | ||
); | ||
const signalRemote = new IonSDK.IonSFUJSONRPCSignal( | ||
const signalRemote = new Signal.IonSFUJSONRPCSignal( | ||
"ws://localhost:7000/ws" | ||
); | ||
|
||
const clientLocal = new IonSDK.Client("test session", signalLocal); | ||
const clientRemote = new IonSDK.Client("test session", signalRemote); | ||
const clientLocal = new IonSDK.Client(signalLocal); | ||
const clientRemote = new IonSDK.Client(signalRemote); | ||
|
||
signalLocal.onopen = () => clientLocal.join("test session"); | ||
signalRemote.onopen = () => clientRemote.join("test session"); | ||
|
||
let localStream; | ||
const start = (sc) => { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,7 +22,7 @@ | |
} | ||
</style> | ||
|
||
<title>Pion ion-sfu | Racetest</title> | ||
<title>Pion ion-sfu | Gallery Test</title> | ||
</head> | ||
|
||
<body> | ||
|
@@ -73,7 +73,8 @@ <h3>Pion</h3> | |
integrity="sha384-B4gt1jrGC7Jh4AgTPSdUtOBvfO8shuf57BaghqFfPlYxofvL8/KUEfYiJOMMV+rV" | ||
crossorigin="anonymous" | ||
></script> | ||
<script src="https://unpkg.com/[email protected]/dist/ion-sdk.min.js"></script> | ||
<script src="https://unpkg.com/[email protected]/dist/ion-sdk.min.js"></script> | ||
<script src="https://unpkg.com/[email protected]/dist/json-rpc.min.js"></script> | ||
<script> | ||
const localVideo = document.getElementById("local-video"); | ||
const remotesDiv = document.getElementById("remotes"); | ||
|
@@ -84,15 +85,17 @@ <h3>Pion</h3> | |
|
||
class Peer { | ||
constructor() { | ||
this.signal = new IonSDK.IonSFUJSONRPCSignal( | ||
this.signal = new Signal.IonSFUJSONRPCSignal( | ||
"ws://localhost:7000/ws" | ||
); | ||
|
||
const videosDiv = document.createElement("div"); | ||
videosDiv.style.display = "flex"; | ||
remotesDiv.appendChild(videosDiv); | ||
|
||
this.client = new IonSDK.Client("test session", this.signal); | ||
this.client = new IonSDK.Client(this.signal); | ||
this.signal.onopen = () => this.client.join("test session"); | ||
|
||
this.client.ontrack = (track, stream) => { | ||
if (track.kind === "video") { | ||
const remoteVideo = document.createElement("video"); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -134,7 +134,8 @@ <h3>Pion</h3> | |
integrity="sha384-B4gt1jrGC7Jh4AgTPSdUtOBvfO8shuf57BaghqFfPlYxofvL8/KUEfYiJOMMV+rV" | ||
crossorigin="anonymous" | ||
></script> | ||
<script src="https://unpkg.com/[email protected]/dist/ion-sdk.min.js"></script> | ||
<script src="https://unpkg.com/[email protected]/dist/ion-sdk.min.js"></script> | ||
<script src="https://unpkg.com/[email protected]/dist/json-rpc.min.js"></script> | ||
<script> | ||
const localVideo = document.getElementById("local-video"); | ||
const remotesDiv = document.getElementById("remotes"); | ||
|
@@ -150,11 +151,12 @@ <h3>Pion</h3> | |
], | ||
}; | ||
|
||
const signalLocal = new IonSDK.IonSFUJSONRPCSignal( | ||
const signalLocal = new Signal.IonSFUJSONRPCSignal( | ||
"ws://localhost:7000/ws" | ||
); | ||
|
||
const clientLocal = new IonSDK.Client("test session", signalLocal); | ||
const clientLocal = new IonSDK.Client(signalLocal); | ||
signalLocal.onopen = () => clientLocal.join("test session"); | ||
|
||
let localStream; | ||
const start = () => { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters