<commit_before>jQuery(function($) {
    // Variables
    var errorMessage = $('#message .error');
    
    // Adjust the error message as to prevent confusion
    errorMessage.html('You need to enable video streaming');
    
    // Gather the user's media
    navigator.getUserMedia = navigator.getUserMedia || navigator.webkitGetUserMedia || navigator.mozGetUserMedia;
    
    // Supported?
    if (navigator.getUserMedia)
        navigator.getUserMedia({video:true}, gotStream, error);
    else
        errorMessage.html('Your browser is not supported');
    
    // We've got the user's media stream
    function gotStream(localStream) {
        $('body').addClass('js');
        
        // Variables
        var video = $('video#local');
        
        window.stream = localStream;
        video.attr('src', window.URL.createObjectURL(localStream));
    }
    
    // Error gathering the user's media stream
    function error(error) {
        console.log("navigator.getUserMedia error: ", error);
    }
});<commit_msg>Improved error message<commit_after>jQuery(function($) {
    // Variables
    var errorMessage = $('#message .error');
    
    // Adjust the error message as to prevent confusion
    errorMessage.html('You need to enable video streaming');
    
    // Gather the user's media
    navigator.getUserMedia = navigator.getUserMedia || navigator.webkitGetUserMedia || navigator.mozGetUserMedia;
    
    // Supported?
    if (navigator.getUserMedia)
        navigator.getUserMedia({video:true}, gotStream, error);
    else
        errorMessage.html('Your browser is not supported');
    
    // We've got the user's media stream
    function gotStream(localStream) {
        $('body').addClass('js');
        
        // Variables
        var video = $('video#local');
        
        window.stream = localStream;
        video.attr('src', window.URL.createObjectURL(localStream));
    }
    
    // Error gathering the user's media stream
    function error(error) {
        console.log('Error gathering the user\'s media stream: ', error);
    }
});
{'fraction_non_alphanumeric': 0.11903614457831325, 'fraction_numerical': 0.0, 'mean_word_length': 2.6104347826086958, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '6828768', 'n_tokens_mistral': 576, 'n_tokens_neox': 556, 'n_words': 142}