Skip to content

Instantly share code, notes, and snippets.

View EricDavies's full-sized avatar

Eric Davies EricDavies

View GitHub Profile
@EricDavies
EricDavies / index.html
Created November 27, 2017 22:50
getusermediaTest
<!DOCTYPE html>
<html>
<head>
<title>Test getusermedia</title>
</head>
<body>
<div id="result"></div>
<script>
navigator.mediaDevices.getUserMedia({audio:true,video:true}).then(
@EricDavies
EricDavies / TextureToJava.
Created June 27, 2017 17:26
Android code for getting a snapshot from a RTCMediaStream.
package com.priologic.easyrtcMedia;
import android.opengl.GLES11Ext;
import android.opengl.GLES20;
import java.nio.ByteBuffer;
import java.nio.FloatBuffer;
import org.webrtc.*;
/**
* Class for converting OES textures RGBA. It should be constructed on a thread with
* an active EGL context, and only be used from that thread. It is used by the EasyrtcSingleFrameCapturer.
#
# Note: lines beginning with # are comments I typed in at the command line at the time.
#
Script started on Fri 10 Mar 2017 04:17:29 PM PST
[ESC]]0;root@eric-linux: ~root@eric-linux:~# /opt/janus/bin/janus
/opt/janus/bin/janus: /usr/local/lib/libldap_r-2.4.so.2: no version information available (required by /usr/lib/x86_64-linux-gnu/libcurl.so.4)
/opt/janus/bin/janus: /usr/local/lib/liblber-2.4.so.2: no version information available (required by /usr/lib/x86_64-linux-gnu/libcurl.so.4)
---------------------------------------------------
Starting Meetecho Janus (WebRTC Gateway) v0.2.3
@EricDavies
EricDavies / easyrtc.js
Created November 7, 2016 15:49
easyrtc with call failure in acceptCheck helper, try 2
/* global define, module, require */
/*!
Script: easyrtc_lang.js
Provides lang file.
About: License
Copyright (c) 2016, Priologic Software Inc.
All rights reserved.
@EricDavies
EricDavies / easyrtc.js
Created November 4, 2016 18:39
easyrtc.js with callFailureCB in acceptChecker help routine. For desnoexa to try.
/* global define, module, require */
/*!
Script: easyrtc_lang.js
Provides lang file.
About: License
Copyright (c) 2016, Priologic Software Inc.
All rights reserved.
/**
* Event listeners used by EasyRTC. Many of these can be overridden using server options.
*
* @module easyrtc_default_event_listeners
* @author Priologic Software, info@easyrtc.com
* @copyright Copyright 2015 Priologic Software. All rights reserved.
* @license BSD v2, see LICENSE file in module root folder.
*/
var util = require("util"); // General utility functions core module
@EricDavies
EricDavies / gist:c2c9fbfc61a659ea1e53
Created August 24, 2015 22:20
adding a label to a select option.
<!DOCTYPE html>
<html>
<body>
<select id="xx">
<option value="volvo">Volvo</option>
<option value="saab">Saab</option>
<option value="opel">Opel</option>
<option value="audi">Audi</option>
</select>
@EricDavies
EricDavies / demo_audio_video_simple.js
Created July 30, 2015 14:52
This demonstrates using api fields in place of user names.
var selfEasyrtcid = "";
function connect() {
easyrtc.setVideoDims(640,480);
easyrtc.setRoomOccupantListener(convertListToButtons);
easyrtc.easyApp("easyrtc.audioVideoSimple", "selfVideo", ["callerVideo"], loginSuccess, loginFailure);
}
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <!--skip-->
<title>EasyRTC Demo: Data Channel File-sharing</title>
<link rel="stylesheet" type="text/css" href="css/landing.css" />
<link rel="stylesheet" type="text/css" href="/easyrtc/easyrtc.css" />
<!--hide-->
<!-- Prettify Code -->
@EricDavies
EricDavies / child.html
Created May 13, 2015 17:29
getting parent url
<html>
<head>
<title> child</title>
</head>
<script type="text/javascript">
function dumpit() {
var div = document.getElementById("dumpzone");
var parentUrl;
if (parent !== window){