Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 3c86f88

Browse filesBrowse files
committed
Autoplay on addLocalStream
1 parent 9858aad commit 3c86f88
Copy full SHA for 3c86f88

File tree

Expand file treeCollapse file tree

3 files changed

+5
-4
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

3 files changed

+5
-4
lines changed
Open diff view settings
Collapse file

‎js/rtc-controller.js‎

Copy file name to clipboardExpand all lines: js/rtc-controller.js
+1Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ var CONTROLLER = window.CONTROLLER = function(phone, stream){
6767
video.volume = 0.0;
6868
video.play();
6969
//vid.innerHTML=""
70+
vid.setAttribute( 'autoplay', 'autoplay' );
7071
vid.setAttribute( 'data-number', phone.number() );
7172
vid.style.cssText ="-moz-transform: scale(-1, 1); \
7273
-webkit-transform: scale(-1, 1); -o-transform: scale(-1, 1); \
Collapse file

‎js/webrtc.js‎

Copy file name to clipboardExpand all lines: js/webrtc.js
+3-3Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ var PHONE = window.PHONE = function(config) {
1616
var myconnection = false;
1717
var mediaconf = config.media || { audio : true, video : true };
1818
var conversations = {};
19-
var streamWatch = config.streamWatch || false;
19+
var oneway = config.oneway || false;
2020

2121
// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
2222
// RTC Peer Connection Session (one per call)
@@ -403,7 +403,7 @@ var PHONE = window.PHONE = function(config) {
403403
// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
404404
function onready(subscribed) {
405405
if (subscribed) myconnection = true;
406-
if (!((mystream || streamWatch) && myconnection)) return;
406+
if (!((mystream || oneway) && myconnection)) return;
407407

408408
connectcb();
409409
readycb();
@@ -413,7 +413,7 @@ var PHONE = window.PHONE = function(config) {
413413
// Prepare Local Media Camera and Mic
414414
// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
415415
function getusermedia() { //Do something if not requesting any media?
416-
if (streamWatch){
416+
if (oneway){
417417
onready();
418418
subscribe();
419419
return;
Collapse file

‎streams.html‎

Copy file name to clipboardExpand all lines: streams.html
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@
9090
addLog("Streaming to " + streamName);
9191
});
9292
ctrl.receive(function(session){
93-
session.connected(function(session){ session.pc.close(); addLog(session.number + " has joined."); });
93+
session.connected(function(session){ addLog(session.number + " has joined."); });
9494
session.ended(function(session) { addLog(session.number + " has left."); console.log(session)});
9595
});
9696
ctrl.streamPresence(function(m){

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.