<commit_before>function hide_player() {
    $('#vid video').get(0).pause();
    $('#vid').slideUp();
}

function watch_play(gsis_id, play_id) {
    var url = make_vid_url(gsis_id, play_id);
    var $vid = $('#vid video');
    var vid = $vid.get(0);

    $vid.attr('src', url);
    vid.load();
    $('#vid').slideDown('fast', function() {
        window.setTimeout(function() { vid.play(); }, 1000);
    });
}

$(document).ready(function() {
    $('#vid button').click(hide_player);
});<commit_msg>adapt video player size<commit_after>function hide_player() {
    var $vid = $('#vid video');
    $vid.get(0).pause();
    $vid.removeAttr('src');
    $('#vid').slideUp();
}

function watch_play(gsis_id, play_id) {
    var url = make_vid_url(gsis_id, play_id);
    var $vid = $('#vid video');
    var vid = $vid.get(0);
    
    $vid.css({'width': 'auto', 'height': 'auto'});
    $('#vid').css({'width': 'auto', 'height': 'auto'});

    $vid.attr('src', url);
    vid.load();
    $('#vid').slideDown('fast', function() {
        window.setTimeout(function() { vid.play(); }, 1000);
    });
}

$(document).ready(function() {
    var $div = $('#vid');
    var $vid = $('#vid video');
    var spacing = 100;
    var $win = $(window);
    $('#vid button').click(hide_player);

    window.setInterval(function() {
        if ($div.width() >= ($win.innerWidth() - spacing)) {
            $div.width($win.innerWidth() - spacing);
            $vid.width($div.width());
        }
        if ($div.height() >= ($win.innerHeight() - spacing)) {
            $div.height($win.innerHeight() - spacing);
            $vid.height($div.height() - 50);
        }
    }, 500);
});
{'fraction_non_alphanumeric': 0.23898611949305976, 'fraction_numerical': 0.012070006035003017, 'mean_word_length': 2.957040572792363, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4974087', 'n_tokens_mistral': 581, 'n_tokens_neox': 563, 'n_words': 105}