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
[{"state":{"name":"Abia State","id":1,"locals":[{"name":"Aba South","id":1},{"name":"Arochukwu","id":2},{"name":"Bende","id":3},{"name":"Ikwuano","id":4},{"name":"Isiala Ngwa North","id":5},{"name":"Isiala Ngwa South","id":6},{"name":"Isuikwuato","id":7},{"name":"Obi Ngwa","id":8},{"name":"Ohafia","id":9},{"name":"Osisioma","id":10},{"name":"Ugwunagbo","id":11},{"name":"Ukwa East","id":12},{"name":"Ukwa West","id":13},{"name":"Umuahia North","id":14},{"name":"Umuahia South","id":15},{"name":"Umu Nneochi","id":16}]}},{"state":{"name":"Adamawa State","id":2,"locals":[{"name":"Fufure","id":1},{"name":"Ganye","id":2},{"name":"Gayuk","id":3},{"name":"Gombi","id":4},{"name":"Grie","id":5},{"name":"Hong","id":6},{"name":"Jada","id":7},{"name":"Lamurde","id":8},{"name":"Madagali","id":9},{"name":"Maiha","id":10},{"name":"Mayo Belwa","id":11},{"name":"Michika","id":12},{"name":"Mubi North","id":13},{"name":"Mubi South","id":14},{"name":"Numan","id":15},{"name":"Shelleng","id":16},{"name":"Song","id":17},{"name":"Toung |
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
[{"state":{"name":"Abia State","id":1,"locals":[{"name":"Aba South","id":1},{"name":"Arochukwu","id":2},{"name":"Bende","id":3},{"name":"Ikwuano","id":4},{"name":"Isiala Ngwa North","id":5},{"name":"Isiala Ngwa South","id":6},{"name":"Isuikwuato","id":7},{"name":"Obi Ngwa","id":8},{"name":"Ohafia","id":9},{"name":"Osisioma","id":10},{"name":"Ugwunagbo","id":11},{"name":"Ukwa East","id":12},{"name":"Ukwa West","id":13},{"name":"Umuahia North","id":14},{"name":"Umuahia South","id":15},{"name":"Umu Nneochi","id":16}]}},{"state":{"name":"Adamawa State","id":2,"locals":[{"name":"Fufure","id":1},{"name":"Ganye","id":2},{"name":"Gayuk","id":3},{"name":"Gombi","id":4},{"name":"Grie","id":5},{"name":"Hong","id":6},{"name":"Jada","id":7},{"name":"Lamurde","id":8},{"name":"Madagali","id":9},{"name":"Maiha","id":10},{"name":"Mayo Belwa","id":11},{"name":"Michika","id":12},{"name":"Mubi North","id":13},{"name":"Mubi South","id":14},{"name":"Numan","id":15},{"name":"Shelleng","id":16},{"name":"Song","id":17},{"name":"Toung |
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
import { Injectable, Injector } from '@angular/core'; | |
import { HttpEvent, HttpInterceptor, HttpHandler, HttpRequest } from '@angular/common/http'; | |
import { Observable } from 'rxjs/Rx'; | |
import 'rxjs/add/observable/throw' | |
import 'rxjs/add/operator/catch'; | |
@Injectable() | |
export class MyHttpInterceptor implements HttpInterceptor { | |
constructor() { } |
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
function streamSuccess(stream) { | |
window.AudioContext = window.AudioContext || window.webkitAudioContext; | |
var audioContext = new AudioContext(); | |
// Create an AudioNode from the stream | |
var mediaStreamSource = audioContext.createMediaStreamSource(stream); | |
// Hear thyself! | |
mediaStreamSource.connect(audioContext.destination); | |
} |
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
var constraints = { video: 1, audio: 1 }, | |
localvid = document.querySelector("#localvid"); // A HTML5 video element with an 'autoplay' property. | |
// Success call | |
function success(stream){ | |
localvid.src = URL.createObjectURL(stream); | |
} | |
// Failure call | |
function failure(e){ |
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
var iceserver = {...}, | |
alice = new RTCPeerConnection(iceserver); |
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
alice.createOffer({ offerToRecieveAudio: 1, offerToReceiveVideo: 1 }) | |
.then(function(description){ | |
// Alice adds the description as her local description. | |
alice.setLocalDescription(new RTCSessionDescription(description)); | |
// Alice then sends this description to Bob. This action is seen as the 'call' | |
}); |
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
// Create Bobs WebRTC Peer. (same as Alice) | |
// ... | |
//Set Alice's description as the remote | |
bob.setRemoteDescription(new RTCSessionDescription(data)) // 'data' is the session description from Alice | |
.then(function(){ | |
//Create answer | |
bob.createAnswer({ offerToRecieveAudio: 1, offerToReceiveVideo: 1 }) | |
.then(function(description){ | |
// Bob saves his description locally |
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
alice.setRemoteDescription(new RTCSessionDescription(data)) // 'data' is the session sent from Bob. |
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
// Flag for enabling cache in production | |
var doCache = false; | |
var CACHE_NAME = 'pwa-app-cache'; | |
// Delete old caches | |
self.addEventListener('activate', event => { | |
const currentCachelist = [CACHE_NAME]; | |
event.waitUntil( | |
caches.keys() |
OlderNewer