80 lines
2.8 KiB
HTML
80 lines
2.8 KiB
HTML
{% extends 'base.html' %}
|
|
{% load i18n %}
|
|
{% load bootstrap4 %}
|
|
{% load fontawesome_5 %}
|
|
{% load guardian_tags %}
|
|
{% load core_templatetag %}
|
|
|
|
{% get_obj_perms user for object as "obj_perms" %}
|
|
|
|
{% block 'sidenav' %}
|
|
{% with 'stream' as section %}
|
|
{{ block.super }}
|
|
{% endwith %}
|
|
{% endblock %}
|
|
|
|
{% block 'content' %}
|
|
<div class="row justify-content-between">
|
|
<div class="col">
|
|
<h6>{% trans "stream_configuration_details_header" %}</h6>
|
|
</div>
|
|
{% get_obj_perms user for object as "obj_perms" %}
|
|
<div class="col-auto">
|
|
{% if "change_stream" in obj_perms %}
|
|
<a href="{% url 'config:stream_change' pk=object.pk %}" type="button" class="btn btn-sm btn-outline-primary">{% fa5_icon 'edit' %} {% trans 'change' %}</a>
|
|
{% endif %}
|
|
{% if "delete_stream" in obj_perms %}
|
|
<a href="{% url 'config:stream_delete' pk=object.pk %}" type="button" class="btn btn-sm btn-outline-danger">{% fa5_icon 'trash' %} {% trans 'delete' %}</a>
|
|
{% endif %}
|
|
</div>
|
|
</div>
|
|
<hr class="my-4">
|
|
<div class="row">
|
|
<div class="col-sm border-right">
|
|
<dl class="row">
|
|
<dt class="col-sm-3">{% trans "name" %}</dt>
|
|
<dd class="col-sm-9">{{ object.name }}</dd>
|
|
</dl>
|
|
<h6>{% trans "how_to_configure_your_encoder_header" %}</h6>
|
|
<hr class="my-4">
|
|
<p>{% trans "set_this_stream_server_in_encoder" %}</p>
|
|
<p class="mb-4">
|
|
<ul>
|
|
{% settings_value "ADVERTISED_RTMP_HOSTS" as hosts %}
|
|
{% for host in hosts %}
|
|
<li><code>rtmp://{{ host }}/{% settings_value "GLOBAL_STREAM_NAMESPACE" %}/</code></p>
|
|
{% endfor %}
|
|
</ul>
|
|
<p>{% trans "set_this_stream_id_in_encoder" %}</p>
|
|
<div class="input-group mb-4" id="show_hide_stream_key">
|
|
<input readonly class="form-control" type="password" value="{{ object.stream }}">
|
|
<div class="input-group-append">
|
|
<a href="" class="btn btn-outline-secondary"><i class="fa fa-eye-slash" aria-hidden="true"></i></a>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="col-sm">
|
|
{% trans "stream_configuration_text_html" %}
|
|
</div>
|
|
</div>
|
|
<script>
|
|
$(function () {
|
|
$('[data-toggle="popover"]').popover()
|
|
})
|
|
$(function() {
|
|
$("#show_hide_stream_key a").on('click', function(event) {
|
|
event.preventDefault();
|
|
if ($('#show_hide_stream_key input').attr('type') == 'text') {
|
|
$('#show_hide_stream_key input').attr('type', 'password');
|
|
$('#show_hide_stream_key i').addClass('fa-eye-slash');
|
|
$('#show_hide_stream_key i').removeClass('fa-eye');
|
|
} else if ($('#show_hide_stream_key input').attr('type') == 'password') {
|
|
$('#show_hide_stream_key input').attr('type', 'text');
|
|
$('#show_hide_stream_key i').removeClass('fa-eye-slash');
|
|
$('#show_hide_stream_key i').addClass('fa-eye');
|
|
}
|
|
});
|
|
});
|
|
</script>
|
|
{% endblock %}
|