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
| const base64_arraybuffer = async (data) => { | |
| // Use a FileReader to generate a base64 data URI | |
| const base64url = await new Promise((r) => { | |
| const reader = new FileReader() | |
| reader.onload = () => r(reader.result) | |
| reader.readAsDataURL(new Blob([data])) | |
| }) | |
| /* | |
| The result looks like |
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 MapboxGL, {LngLatLike, MercatorCoordinate} from 'mapbox-gl'; | |
| import React, {useEffect, useState} from 'react'; | |
| import {withMap} from 'react-mapbox-gl/lib-esm/context'; | |
| import {FeatureCollection} from 'geojson'; | |
| import * as THREE from 'three'; | |
| import {GLTFLoader} from 'three/examples/jsm/loaders/GLTFLoader'; | |
| export interface SpritePaint { | |
| gltfPath: string; |
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
| // Fix Vendor Prefixes | |
| var IS_CHROME = !!window.webkitRTCPeerConnection, | |
| RTCPeerConnection, | |
| RTCIceCandidate, | |
| RTCSessionDescription; | |
| if (IS_CHROME) { | |
| RTCPeerConnection = webkitRTCPeerConnection; | |
| RTCIceCandidate = window.RTCIceCandidate; | |
| RTCSessionDescription = window.RTCSessionDescription; |
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
| # source : http://code.google.com/p/natvpn/source/browse/trunk/stun_server_list | |
| # A list of available STUN server. | |
| stun.l.google.com:19302 | |
| stun1.l.google.com:19302 | |
| stun2.l.google.com:19302 | |
| stun3.l.google.com:19302 | |
| stun4.l.google.com:19302 | |
| stun01.sipphone.com | |
| stun.ekiga.net |