This file contains hidden or 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
public createAndSendOffer(id: string) { | |
this.peerConnections[id] | |
.createOffer(this.offerOptions) | |
.then(async (offer: RTCSessionDescriptionInit) => { | |
if (this.peerConnections[id].signalingState != "stable") { | |
console.log("-- The connection isn't stable yet; postponing...") | |
return; | |
} | |
this.peerConnections[id].setLocalDescription(offer).then(() => { |
This file contains hidden or 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
// request to access user account details | |
this.ethereum = (window as any).ethereum; | |
this.webby3 = (window as any).web3; | |
if (typeof this.ethereum == 'undefined') { | |
this.dialog.presentToast('Please install MetaMask extension'); | |
return; | |
} | |
try { | |
let x = await this.ethereum.enable(); | |
console.log('ethereum enabled=>', x); |
This file contains hidden or 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
gitlab merge to master example |
NewerOlder