Skip to content
This repository was archived by the owner on Jan 19, 2021. It is now read-only.

Commit 969de8a

Browse files
committed
hide stream key
1 parent 016b6e0 commit 969de8a

File tree

2 files changed

+18
-1
lines changed

2 files changed

+18
-1
lines changed

static/css/multistreamer.css

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@ span.error {
22
color: red;
33
}
44

5+
#stream-key {
6+
display:none;
7+
}
8+
59
a {
610
color: #428bca;
711
}

views/metadata.etlua

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<h3>Edit Metadata</h3>
22

33
<p><strong>RTMP URL</strong> <code><%= public_rtmp_url %>/<%= rtmp_prefix %></code></p>
4-
<p><strong>Stream Key</strong> <code><%= stream.uuid %></code></p>
4+
<p><strong>Stream Key</strong> <button id="showBtn" type="button" class="pure-button">Show</button> <code id="stream-key"><%= stream.uuid %></code></p>
55

66
<form class="pure-form pure-form-aligned" id="the_form" method="post" action="<%= url_for('metadata-edit')..stream.id %>" enctype="multipart/form-data">
77

@@ -54,10 +54,13 @@
5454

5555
<script type="text/javascript">
5656
var copyDownBtn = document.getElementById('copyDownBtn');
57+
var showBtn = document.getElementById('showBtn');
58+
5759
var titleKeys = [];
5860
var descriptionKeys = [];
5961
var titleInput = document.getElementById('title');
6062
var descriptionInput = document.getElementById('description');
63+
var streamKey = document.getElementById('stream-key');
6164
<% for _,account in pairs(accounts) do -%>
6265
<% local metadata_fields, err = account.network.metadata_fields() -%>
6366
<% if metadata_fields then -%>
@@ -81,5 +84,15 @@ copyDownBtn.onclick = function() {
8184
});
8285
}
8386

87+
function hideStreamKey() {
88+
streamKey.style.display='none';
89+
showBtn.onclick = showStreamKey;
90+
}
91+
92+
function showStreamKey() {
93+
streamKey.style.display='inline';
94+
showBtn.onclick = hideStreamKey;
95+
}
8496

97+
showBtn.onclick = showStreamKey;
8598
</script>

0 commit comments

Comments
 (0)