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
### Keybase proof | |
I hereby claim: | |
* I am ejferg on github. | |
* I am ejferg (https://keybase.io/ejferg) on keybase. | |
* I have a public key ASDOmmskfxnlks-HeGbiBiUDr037Km4Vly34pS4fa6LAQgo |
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
/* globals localStorage */ | |
import { AUTH_LOGIN, AUTH_LOGOUT, AUTH_CHECK } from 'admin-on-rest' | |
import * as firebase from 'firebase' | |
const authListener = null; | |
function handleAuthStateChange (authUser, resolve, reject) { | |
if(authUser) { | |
authUser.getIdToken().then((firebaseToken) => { | |
const db = firebase.firestore(); |
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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
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
[self.signal joinRoom:kRoomNerdTalk success:^{ | |
self.localVideoRenderer = [[RTCVideoRenderer alloc] initWithView:self.localVideoView]; | |
self.localVideoView.layer.transform = CATransform3DMakeScale(1, -1, 1); | |
[self.signal.localMediaStream.videoTracks[0] addRenderer:self.localVideoRenderer]; | |
[self.localVideoRenderer 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
self.signal = [[TLKSocketIOSignaling alloc] initAllowingVideo:YES]; | |
self.signal.delegate = self; | |
[self.signal connectToServer:kUrlSignalMaster port:kServerPort secure:NO success:^{ | |
[self join]; | |
NSLog(@"Connection: Successful"); | |
} failure:^(NSError *error) { |
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.webrtc.joinRoom(NTApp.ROOM_NERD_TALK, function() { | |
console.info('Join: Successful'); | |
}); |
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.webrtc.on(NTApp.EVENT_READY_TO_CALL, readyToCallHandler); |
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
root.NTApp = function(configurations) { | |
this.webrtc = new SimpleWebRTC({ | |
localVideoEl: configurations.localVideo, | |
remoteVideosEl: configurations.removeVideoContainer, | |
autoRequestMedia: true, | |
url: configurations.url || NTApp.URL_SIGNAL_MASTER | |
}); | |
this.addEventListeners(); |
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
<body> | |
<div id="localVideoView"> | |
<video id="localVideo"></video> | |
</div> | |
<div id="remoteVideoView"></div> |