1
0
mirror of https://github.com/dani/vroom.git synced 2024-06-26 17:43:29 +02:00

The main div isn't hidden anymore on XS screens

And since a long time
This commit is contained in:
Daniel Berteaud 2015-03-17 17:33:23 +01:00
parent 56d4d40b10
commit bc544256da

View File

@ -865,21 +865,18 @@ function initVroom(room) {
el.addClass('selected');
mainVid = el.attr('id');
// Cut the volume the corresponding preview
// but only on screen > 768
// On smaller screens, the main video is hidden
if ($(window).width() > 768){
$('#webRTCVideo video').each(function(){
if ($(this).get(0).paused){
$(this).get(0).play();
}
});
if (el.attr('id') !== 'webRTCVideoLocal'){
el.get(0).volume = 0;
$('#mainVideo video').get(0).volume = 1;
}
else {
$('#mainVideo video').get(0).volume = 0;
$('#webRTCVideo video').each(function(){
if ($(this).get(0).paused){
$(this).get(0).play();
}
});
if (el.attr('id') !== 'webRTCVideoLocal'){
el.get(0).volume = 0;
$('#mainVideo video').get(0).volume = 1;
}
else {
// If we put our own video in the main div, we need to mute it
$('#mainVideo video').get(0).volume = 0;
}
$('#mainVideo').show(200);
}