Use WebRtc with SimplePeer

This commit is contained in:
gparant 2020-04-25 16:05:33 +02:00
parent a5b5072de1
commit c28108f6c9
9 changed files with 233 additions and 282 deletions

View file

@ -1,7 +1,7 @@
import {GameSceneInterface, GameScene} from "./GameScene";
import {ROOM} from "../../Enum/EnvironmentVariable"
import {Connexion, ConnexionInterface, ListMessageUserPositionInterface} from "../../Connexion";
import {WebRtcEventManager} from "../../WebRtc/WebRtcEventManager";
import {SimplePeer} from "../../WebRtc/SimplePeer";
export enum StatusGameManagerEnum {
IN_PROGRESS = 1,
@ -30,7 +30,7 @@ export class GameManager implements GameManagerInterface {
this.configureGame();
/** TODO add loader in the page **/
//initialise cam
new WebRtcEventManager(ConnexionInstance);
new SimplePeer(ConnexionInstance);
}).catch((err) => {
console.error(err);
throw err;