Skip to content

Instantly share code, notes, and snippets.

@antila
Last active October 17, 2016 20:08
Show Gist options
  • Save antila/a71460731e38b9a526a1753186227dde to your computer and use it in GitHub Desktop.
Save antila/a71460731e38b9a526a1753186227dde to your computer and use it in GitHub Desktop.
Makes roll20 video boxes take up all avaliable screen size.
$('#hax').off('.hax').remove();
var $videoSettings = $('<input id="hax" type="range" min="200" max="1000"/>');
$videoSettings.appendTo($('#mysettings .content'));
var inputChange = function() {
var windowSize = $(this).val();
$('.video').css('min-width', windowSize);
$('.video').css('min-height', windowSize * (3/4));
$('#playerzone.largevideo object, #playerzone.largevideo .OT_root, .OT_widget-container').attr('style', 'width: ' + windowSize + 'px !important; height: ' + windowSize * (3/4) + 'px !important;');
$('.playername').css('max-width', '100%');
};
$videoSettings.off('.hax').on('change.hax', inputChange);
$videoSettings.off('.hax').on('input.hax', inputChange);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment