Skip to content

Commit ac39d23

Browse files
authored
update example (#4)
1 parent e79357b commit ac39d23

File tree

6 files changed

+295
-101
lines changed

6 files changed

+295
-101
lines changed

dist/snowem.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

example/app.js

Lines changed: 0 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -8,29 +8,6 @@ $('#publishVideoDiv').hide();
88
$('#localStreamId').hide();
99
$('#fileVideoId').hide();
1010

11-
function onElementHeightChange(elm, callback){
12-
var lastHeight = elm.clientHeight, newHeight;
13-
(function run(){
14-
newHeight = elm.clientHeight;
15-
if( lastHeight != newHeight )
16-
callback(newHeight);
17-
lastHeight = newHeight;
18-
19-
if( elm.onElementHeightChangeTimer )
20-
clearTimeout(elm.onElementHeightChangeTimer);
21-
22-
elm.onElementHeightChangeTimer = setTimeout(run, 200);
23-
})();
24-
}
25-
26-
onElementHeightChange(document.body, function(h){
27-
if(h < window.screen.width){
28-
$('#footer').removeClass('fixed-bottom')
29-
} else {
30-
$('#footer').addClass('fixed-bottom')
31-
}
32-
});
33-
3411
function maybeCreateStream() {
3512
if (stream) {
3613
return;
@@ -136,18 +113,12 @@ $('#publishCameraBtn').click(function() {
136113
console.error('failed to play video')
137114
});
138115
}
139-
140116
}
141117
var config = {
142118
'type': type,
143119
'localStream': localStream,
144120
'localNode': document.getElementById('localVideo'),
145121
'remoteNode': document.getElementById('remoteVideo'),
146-
'media': {
147-
'audio': true,
148-
'video': true,
149-
'data': true,
150-
},
151122
'mediaConstraints': {
152123
'audio': true,
153124
'video': {

example/bg_blue.jpg

845 KB
Loading

0 commit comments

Comments
 (0)