Hi,
I tried to use the SimpleWebRTC to make the simple demo in angular2.
import {Component,OnInit} from '@angular/core';
import * as SimpleWebRTC from '../shared/js/simple-wrtc.js';
@Component({
selector: 'demo',
template: `
<video height="300" id="localVideo"></video>
<div id="remotesVideos"></div>
`
})
export class DemoComponent {
webrtc = new SimpleWebRTC({
// the id/element dom element that will hold "our" video
localVideoEl: 'localVideo',
// the id/element dom element that will hold remote videos
remoteVideosEl: 'remotesVideos',
// immediately ask for camera access
autoRequestMedia: true
});
ngOnInit():void {
this.webrtc.on('readyToCall', function () {
// you can name it anything
this.webrtc.joinRoom('your awesome room name');
});
}
}
When I run the app, the function joinRoom not work, can you help me?
Hi, I tried to use the SimpleWebRTC to make the simple demo in angular2.
When I run the app, the function joinRoom not work, can you help me?