{% load i18n static %}

{% if content_id %}
    {% trans "Watch online" as watch_online_translated %}
    <a href="#" id="torrent_stream_button_{{ content_id }}">
        <img src="{% static "torrent_stream/play_icon_small.png" %}"
             alt="{{ watch_online_translated }}" title="{{ watch_online_translated }}"
             style="float:left" />
        <span style="padding-left:2px">{{ watch_online_translated }}</span>
    </a>
    <div style="clear:both"></div>
    <script type="text/javascript">
        var torrent_stream_config = {
            'content_id': '{{ content_id }}',
            'box_width': parseInt('{{ TORRENT_STREAM_PLAYER.width }}'),
            'box_height': parseInt('{{ TORRENT_STREAM_PLAYER.height }}'),
            'ajax_loader': '{% static "torrent_stream/ajax-loader.gif" %}'
        }
    </script>
    <script type="text/javascript" src="{% static "torrent_stream/button.js" %}"></script>
{% endif %}
