Skip to content

Commit

Permalink
Merge pull request #239 from steveseguin/version-10.1
Browse files Browse the repository at this point in the history
Release version 10.1
  • Loading branch information
steveseguin authored Aug 23, 2020
2 parents d1d7365 + 4c4bdeb commit 588e99d
Show file tree
Hide file tree
Showing 9 changed files with 2,532 additions and 692 deletions.
115 changes: 79 additions & 36 deletions animations.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,26 +39,46 @@ $(".column").on('click', function() {
styles += '}';

/* Add keyframe to CSS */
$("#lightbox-animations").empty();
$("#lightbox-animations").get(0).sheet.insertRule(styles, 0);

/* Hide the window scrollbar */
$("body").css('overflow', 'hidden');
});


/* Click on close button when full-screen */
$(".close").on('click', function(e) {
$(this).hide();
$(".container-inner").hide();
/* Window scrollbar normal */
$("body").css('overflow', 'auto');

var bounding_box = $(this).parent().get(0).getBoundingClientRect();
$(this).parent().css({ top: bounding_box.top + 'px', left: bounding_box.left + 'px' });

/* Show animation */
$(this).parent().addClass('out-animation');

e.stopPropagation();
$(this).hide();
$(".container-inner").hide();

$("body").css('overflow', 'auto');

var bounding_box = $(this).parent().get(0).getBoundingClientRect();
$(this).parent().css({ top: bounding_box.top + 'px', left: bounding_box.left + 'px' });

/* Show animation */
$(this).parent().addClass('out-animation');


try{

var oldstream = getById('previewWebcam').srcObject;

if (oldstream){
log("old stream found");
oldstream.getTracks().forEach(function(track) {
track.stop();
oldstream.removeTrack(track);
log("stopping old track");
});
}
activatedPreview=false;
} catch (e){
errorlog(e);
}
log("Cleaned up Video");
e.stopPropagation();
});

/* On animationend : from normal to full screen & full screen to normal */
Expand All @@ -70,34 +90,65 @@ if(e.originalEvent.animationName == 'inlightbox') {
}
/* On animation end from full-screen to normal */
else if(e.originalEvent.animationName == 'outlightbox') {
/* Remove fixed positioning, remove animation rules */
$(this).removeClass('in-animation').removeClass('out-animation').removeClass('columnfade');
/* Remove fixed positioning, remove animation rules */
$(this).removeClass('in-animation').removeClass('out-animation').removeClass('columnfade');

/* Remove the empty container that was earlier added */
$("#empty-container").remove();
/* Remove the empty container that was earlier added */
$("#empty-container").remove();

/* Delete the dynamic keyframe rule that was earlier created */
$("#lightbox-animations").get(0).sheet.deleteRule(0);
/* Delete the dynamic keyframe rule that was earlier created */
$("#lightbox-animations").get(0).sheet.deleteRule(0);
}
});


// multiselect dropdowns
$('#audioSource').on('mousedown touchend focusin focusout', function(e) {
var state = $('.multiselect-trigger').data('state') || 0;
var state = $('#multiselect-trigger').data('state') || 0;
if( state == 0 ) {
////open the dropdown
$('#multiselect-trigger').data('state', '1').addClass('open').removeClass('closed');
$('#multiselect-trigger').find('.chevron').removeClass('bottom');
$('#multiselect-trigger').parent().find('.multiselect-contents').show();
$('#multiselect-trigger').parent().find('.multiselect-contents').find('input[type="checkbox"]').parent().show();;
$('#multiselect-trigger').parent().find('.multiselect-contents').find('input[type="checkbox"]').show();;
}
// e.preventDefault();
});

$('#audioSource3').on('mousedown touchend focusin focusout', function(e) {
var state = $('#multiselect-trigger3').data('state') || 0;
if( state == 0 ) {
////open the dropdown
$('#multiselect-trigger3').data('state', '1').addClass('open').removeClass('closed');
$('#multiselect-trigger3').find('.chevron').removeClass('bottom');
$('#multiselect-trigger3').parent().find('.multiselect-contents').show();
$('#multiselect-trigger3').parent().find('.multiselect-contents').find('input[type="checkbox"]').parent().show();;
$('#multiselect-trigger3').parent().find('.multiselect-contents').find('input[type="checkbox"]').show();;
}
// e.preventDefault();
});

// multiselect dropdowns
$('#multiselect-trigger').on('mousedown touchend focusin focusout', function(e) {
var state = $(this).data('state') || 0;
if( state == 0 ) {
// open the dropdown
$('.multiselect-trigger').data('state', '1').addClass('open').removeClass('closed');
$('.multiselect-trigger').find('.chevron').removeClass('bottom');
$('.multiselect-trigger').parent().find('.multiselect-contents').show();
$('.multiselect-trigger').parent().find('.multiselect-contents').find('input[type="checkbox"]').parent().show();;
$('.multiselect-trigger').parent().find('.multiselect-contents').find('input[type="checkbox"]').show();;
$(this).data('state', '1').addClass('open').removeClass('closed');
$(this).find('.chevron').removeClass('bottom');
$(this).parent().find('.multiselect-contents').show();
$(this).parent().find('.multiselect-contents').find('input[type="checkbox"]').parent().show();;
$(this).parent().find('.multiselect-contents').find('input[type="checkbox"]').show();;
} else {
// close the dropdown
$(this).data('state', '0').addClass('closed').removeClass('open');
$(this).find('.chevron').addClass('bottom');
$(this).parent().find('.multiselect-contents').find('input[type="checkbox"]').not(":checked").parent().hide();;
$(this).parent().find('.multiselect-contents').find('input[type="checkbox"]').hide();;
}
e.preventDefault();
});

// multiselect dropdowns
$('.multiselect-trigger').on('mousedown touchend focusin focusout', function(e) {
$('#multiselect-trigger3').on('mousedown touchend focusin focusout', function(e) {
var state = $(this).data('state') || 0;
if( state == 0 ) {
// open the dropdown
Expand All @@ -110,20 +161,12 @@ $('.multiselect-trigger').on('mousedown touchend focusin focusout', function(e)
// close the dropdown
$(this).data('state', '0').addClass('closed').removeClass('open');
$(this).find('.chevron').addClass('bottom');
//$(this).parent().find('.multiselect-contents').hide();
//$(this).parent().find('.multiselect-contents').find('input[type="checkbox"]').hide();
$(this).parent().find('.multiselect-contents').find('input[type="checkbox"]').not(":checked").parent().hide();;
$(this).parent().find('.multiselect-contents').find('input[type="checkbox"]').hide();;
}
e.preventDefault();
});


// when no preference is checked, uncheck the others
$('#multiselect1').on('change', function(e) {
if( $(this).is(':checked') ) {
$(this).parent().parent().find('input[type="checkbox"]').not('#multiselect1').prop('checked', false);
}
e.preventDefault();
});


11 changes: 7 additions & 4 deletions dock.html
Original file line number Diff line number Diff line change
Expand Up @@ -138,9 +138,12 @@
sendstr+="&quality=2";
}
}

sendstr = 'https://obs.ninja/?push=' + sid + sendstr;
viewstr = 'https://obs.ninja/?view=' + sid + viewstr + title;

var href = window.location.href;
var dir = href.substring(0, href.lastIndexOf('/')) + "/";

sendstr = dir+'?push=' + sid + sendstr;
viewstr = dir+'?view=' + sid + viewstr + title;
getById("container-setup").style.display="none";
getById("container-links").style.display="block";

Expand All @@ -162,7 +165,7 @@
var streamId = url.split('view=');
var label = url.split('label=');

url += '&layer-name=OBS.Ninja';
url += '&layer-name=OBSN';
if (streamId.length>1) url += ': ' + streamId[1].split('&')[0];
if (label.length>1) url += ' - ' + decodeURI(label[1].split('&')[0]);

Expand Down
Loading

0 comments on commit 588e99d

Please sign in to comment.