multistream/frontend/templates/object.html
File Type: text/html
{% if obj.objtype == "stream" or obj.objtype == "both" %}
<div class="streamcontainer{% if obj.index == 0 %} audio chat{% endif %} player-{{ player_type }}" data-tag="{{ obj.tag }}" data-index="{{ obj.index }}" data-object-type="stream">
{% if use_live_embeds %}
{% if player_type == "twitch" %}
<div class='videowrapper' id="stream-{{ obj.tag }}"></div>
<script type="text/javascript">
player_objs['{{ obj.tag }}'] = new Twitch.Player("stream-{{ obj.tag }}", { channel: "{{ obj.tag }}", parent: {{ allowedhosts_json|safe }} });
player_objs['{{ obj.tag }}'].setVolume(0.75);
player_objs['{{ obj.tag }}'].addEventListener(Twitch.Player.READY, function() {
player_objs['{{ obj.tag }}'].play();
});
player_objs['{{ obj.tag }}'].addEventListener(Twitch.Player.PLAYING, function() {
if(player_objs['{{obj.tag}}'].already_muted === undefined) {
player_objs['{{obj.tag}}'].already_muted = true;
{% if obj.index == 0 %}
player_objs['{{ obj.tag }}'].setMuted(false);
{% else %}
player_objs['{{ obj.tag }}'].setMuted(true);
{% endif %}
}
});
</script>
{% endif %}
{% else %}
<!-- Stream embed would go here -->
{% endif %}
</div>
<div class="streamoverlay{% if obj.index == 0 %} audio chat{% endif %} player-{{ player_type }}" data-tag="{{ obj.tag }}" data-index="{{ obj.index }}" data-object-type="stream">
<div class='audioicon'></div>
<div class='chaticon hidden-when-no-chat'></div>
<div class='overlaypopup'>
<div class='overlaycaption'>
<span class="streamnumber">{{ obj.index|add:1 }}</span> <span class="streamname">{{ obj.tag }}</span>
</div>
<div class='mainbuttons'>
<button class='audiobutton hidden-when-one-stream' data-tag='{{ obj.tag }}' title='Audio'><span class="audioicon"></span> Audio</button>
<button class='bothbutton hidden-when-one-stream hidden-when-no-chat' data-tag='{{ obj.tag }}' title='Both'><span class="bothicon"></span> Both</button>
<button class='chatbutton hidden-when-one-stream hidden-when-no-chat' data-tag='{{ obj.tag }}' title='Chat'><span class="chaticon"></span> Chat</button>
</div>
<div class='auxbuttons'>
<button class='profilebutton' onClick="window.open('//www.twitch.tv/{{ obj.tag }}/profile', '_blank');" title='Profile'><span class="profileicon"></span> Profile »</button>
<button class='reloadstream' data-tag='{{ obj.tag }}' title='Reload'><span class="reloadicon"></span> Reload</button>
<button class='closebutton hidden-when-one-stream' data-tag='{{ obj.tag }}' title='Close'><span class="closeicon"></span> Close</button>
</div>
</div>
</div>
{% endif %}
{% if obj.objtype == "chat" or obj.objtype == "both" %}
<div class="chatcontainer{% if obj.index == 0 %} current{% endif %}" data-tag="{{ obj.tag }}" data-index="{{ obj.index }}" data-object-type="chat">
{% if use_live_embeds %}
<iframe frameborder="0" scrolling="no" id="{{ obj.tag }}" src="https://www.twitch.tv/embed/{{ obj.tag }}/chat?darkpopout&{{ allowedhosts_parameterized|safe }}"></iframe>
<!--iframe frameborder="0" scrolling="no" id="{{ obj.tag }}" src="https://www.twitch.tv/{{ obj.tag }}/chat?popout="></iframe-->
<!--iframe frameborder="0" scrolling="no" id="{{ obj.tag }}" src="https://www.twitch.tv/chat/embed?channel={{ obj.tag }}&popout_chat=true"></iframe-->
{% else %}
<!-- Chat embed would go here -->
{% endif %}
<div class="chatcaption">
<button class="streamname chatmenuopener"><span class='chaticon'></span> {{ obj.tag }} <span class="arrow"></span></button>
<button class="reloadchat" data-tag="{{ obj.tag }}"><span class="reloadicon"></span> Reload</button>
<ol class='chatmenu'>
{% for obj2 in obj.overlapped_chats %}
<li class='chatselector' data-index='{{ obj2.index }}' data-tag='{{ obj2.tag }}'><span class="chaticon"></span> <span class="streamname">{{ obj2.tag }}</span></li>
{% endfor %}
</ol>
</div>
</div>
{% endif %}