<commit_before><?
$this->headScript()
    ->appendFile('https://cdn.socket.io/socket.io-1.2.1.js')
    ->appendFile(\DF\Url::content('jplayer/jquery.jplayer.min.js'))
    ->appendFile(\DF\Url::content('radio.js'));

$this->headLink()
    ->appendStylesheet(\DF\Url::content('vendor/world-flags-sprite/stylesheets/flags16.css'));

// ->appendFile('//cdnjs.cloudflare.com/ajax/libs/qtip2/2.2.0/jquery.qtip.min.js');
// $this->headLink()->appendStylesheet('//cdnjs.cloudflare.com/ajax/libs/qtip2/2.2.0/jquery.qtip.min.css', 'all');
?>
<script type="text/javascript">
    var pvlnode_remote_url = '<?=$this->config->apis->pvlnode_remote_url ?>';
    var pvlnode_remote_path = '<?=$this->config->apis->pvlnode_remote_path ?>';
</script>

<? if ($this->station_id && $this->autoplay): ?>
<script type="text/javascript">
    $(function() {
        setTimeout(function() {
            playStation($('.station[data-id="<?=$this->station_id ?>"]').attr('id'));
        }, 1000);
    });
</script>
<? endif; ?>

<div id="pvl-jplayer-controls-image" style="display: none;">
    <div class="jp-type-single">
        <div class="jp-gui jp-interface clearfix">
            <a href="javascript:;" class="jp-pause" tabindex="1" title="pause"><i class="icon-pause"></i></a>
            <a href="javascript:;" class="jp-play" tabindex="1" title="play"><i class="icon-play"></i></a>

            <a href="javascript:;" class="jp-mute" tabindex="1" title="mute"><i class="icon-volume-off"></i></a>
            <a href="javascript:;" class="jp-unmute" tabindex="1" title="unmute"><i class="icon-volume-down"></i></a>
            
            <div class="jp-volume-bar progress">
                <div class="jp-volume-bar-value bar"></div>
            </div><commit_msg>Actually use the websocket event to trigger autoplay :D<commit_after><?
$this->headScript()
    ->appendFile('https://cdn.socket.io/socket.io-1.2.1.js')
    ->appendFile(\DF\Url::content('jplayer/jquery.jplayer.min.js'))
    ->appendFile(\DF\Url::content('radio.js'));

$this->headLink()
    ->appendStylesheet(\DF\Url::content('vendor/world-flags-sprite/stylesheets/flags16.css'));

// ->appendFile('//cdnjs.cloudflare.com/ajax/libs/qtip2/2.2.0/jquery.qtip.min.js');
// $this->headLink()->appendStylesheet('//cdnjs.cloudflare.com/ajax/libs/qtip2/2.2.0/jquery.qtip.min.css', 'all');
?>
<script type="text/javascript">
    var pvlnode_remote_url = '<?=$this->config->apis->pvlnode_remote_url ?>';
    var pvlnode_remote_path = '<?=$this->config->apis->pvlnode_remote_path ?>';
</script>

<? if ($this->station_id && $this->autoplay): ?>
<script type="text/javascript">
$(function() {
    var autoplay_triggered = false;

    socket.on('nowplaying', function(e) {
        if (!autoplay_triggered) {
            autoplay_triggered = true;
            playStation($('.station[data-id="<?=$this->station_id ?>"]').attr('id'));
        }
    });
});
</script>
<? endif; ?>

<div id="pvl-jplayer-controls-image" style="display: none;">
    <div class="jp-type-single">
        <div class="jp-gui jp-interface clearfix">
            <a href="javascript:;" class="jp-pause" tabindex="1" title="pause"><i class="icon-pause"></i></a>
            <a href="javascript:;" class="jp-play" tabindex="1" title="play"><i class="icon-play"></i></a>

            <a href="javascript:;" class="jp-mute" tabindex="1" title="mute"><i class="icon-volume-off"></i></a>
            <a href="javascript:;" class="jp-unmute" tabindex="1" title="unmute"><i class="icon-volume-down"></i></a>
            
            <div class="jp-volume-bar progress">
                <div class="jp-volume-bar-value bar"></div>
            </div>
{'fraction_non_alphanumeric': 0.23211838859961634, 'fraction_numerical': 0.010413812003288572, 'mean_word_length': 3.5625, 'pattern_counts': {'":': 0, '<': 69, '<?xml version=': 0, '>': 105, 'https://': 2, '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': '4623258', 'n_tokens_mistral': 1298, 'n_tokens_neox': 1257, 'n_words': 158}