You still haven't said what the issue you're seeing is. On Mon, Jun 13, 2016 at 10:50 AM, Do Giang <[email protected]> wrote:
> Oh I post wrong code and try to delete it. This one is my code: > I try the demo from this site: https://simplewebrtc.com > > import {Component,OnInit} from '@angular/core'; > > import * as SimpleWebRTC from '../demo/simplewebrtc.js'; > @Component({ > selector: 'demo', > template: ` > <video height="300" id="localVideo"></video> > <div id="remotesVideos"></div> > `, > styleUrls: ['client/dev/demo/easyrtc.css'], > }) > 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 { > // we have to wait until it's ready > this.webrtc.on('readyToCall', function () { > // you can name it anything > this.webrtc.joinRoom('your awesome room name'); > }); > } > } > > > > > On Monday, June 13, 2016 at 9:46:58 PM UTC+7, Lucas Lacroix wrote: >> >> Could you give some details on the issue you're seeing? >> >> On Mon, Jun 13, 2016 at 10:44 AM, Do Giang <[email protected]> wrote: >> >>> I and my team decide to build our capstone project using NodeJS, Angular >>> 2 and WebRTC. Now we have a problem that we can't use WebRTC Libraries in >>> the Angular 2 App. I tried the simple demo from simpleWebRTC: >>> >>> import { Component } from '@angular/core'; >>> import { ROUTER_DIRECTIVES, Routes, Router} from '@angular/router'; >>> import { RouteConfig, RouterLink} from '@angular/router-deprecated'; >>> >>> import { AuthService } from '../../../dashboard/services/auth-services'; >>> >>> @Component({ >>> selector: 'header', >>> templateUrl: 'client/dev/kshare/templates/shared/header.html', >>> styleUrls: ['client/dev/kshare/styles/header.css'], >>> directives: [ROUTER_DIRECTIVES] >>> }) >>> >>> export class HeaderComponent { >>> loginToken:boolean = false; >>> userToken:string; >>> roleToken:string; >>> >>> constructor(private _auth: AuthService, public router: Router){ >>> this.userToken = localStorage.getItem('username'); >>> this.roleToken = localStorage.getItem('role'); >>> } >>> >>> ngOnInit(): void { >>> if(this.userToken){ >>> this.loginToken = true; >>> } >>> } >>> logout(): void { >>> this._auth.logout(); >>> this._auth.logoutClient(); >>> window.location.reload(); >>> } >>> } >>> >>> Can anyone help us? We are so appreciate :) >>> >>> >>> -- >>> You received this message because you are subscribed to the Google >>> Groups "AngularJS" group. >>> To unsubscribe from this group and stop receiving emails from it, send >>> an email to [email protected]. >>> To post to this group, send email to [email protected]. >>> Visit this group at https://groups.google.com/group/angular. >>> For more options, visit https://groups.google.com/d/optout. >>> >> >> >> >> -- >> Lucas Lacroix >> Computer Scientist >> System Technology Division, MEDITECH <http://ehr.meditech.com> >> 781-774-2293 >> > -- > You received this message because you are subscribed to the Google Groups > "AngularJS" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To post to this group, send email to [email protected]. > Visit this group at https://groups.google.com/group/angular. > For more options, visit https://groups.google.com/d/optout. > -- Lucas Lacroix Computer Scientist System Technology Division, MEDITECH <http://ehr.meditech.com> 781-774-2293 -- You received this message because you are subscribed to the Google Groups "AngularJS" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/angular. For more options, visit https://groups.google.com/d/optout.
