mirror of
https://github.com/MercuryWorkshop/adrift.git
synced 2025-05-12 22:00:02 -04:00
enable testing from frontend
This commit is contained in:
parent
5132ad5eda
commit
4e739d6396
1 changed files with 5 additions and 0 deletions
|
@ -1,4 +1,5 @@
|
|||
import {
|
||||
BareClient,
|
||||
registerRemoteListener,
|
||||
setBareClientImplementation,
|
||||
} from "bare-client-custom";
|
||||
|
@ -46,6 +47,8 @@ let bare = new AdriftBareClient(connection);
|
|||
setBareClientImplementation(bare);
|
||||
registerRemoteListener();
|
||||
|
||||
window["bare"] = new BareClient();
|
||||
|
||||
export default class App extends Component {
|
||||
rtc = rtc;
|
||||
|
||||
|
@ -79,6 +82,8 @@ export default class App extends Component {
|
|||
const { answer, candidates } = await r.json();
|
||||
await this.rtc.answer(answer, candidates);
|
||||
alert("connected");
|
||||
} else {
|
||||
window["bare"].fetch("https://httpbin.org/get");
|
||||
}
|
||||
|
||||
// setOffer(JSON.stringify(offer));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue