This repository was archived by the owner on Jan 19, 2021. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +18
-1
lines changed Expand file tree Collapse file tree 2 files changed +18
-1
lines changed Original file line number Diff line number Diff line change @@ -2,6 +2,10 @@ span.error {
2
2
color : red;
3
3
}
4
4
5
+ # stream-key {
6
+ display : none;
7
+ }
8
+
5
9
a {
6
10
color : # 428bca ;
7
11
}
Original file line number Diff line number Diff line change 1
1
<h3>Edit Metadata</h3>
2
2
3
3
<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>
5
5
6
6
<form class="pure-form pure-form-aligned" id="the_form" method="post" action="<%= url_for('metadata-edit')..stream.id %>" enctype="multipart/form-data">
7
7
54
54
55
55
<script type="text/javascript">
56
56
var copyDownBtn = document.getElementById('copyDownBtn');
57
+ var showBtn = document.getElementById('showBtn');
58
+
57
59
var titleKeys = [];
58
60
var descriptionKeys = [];
59
61
var titleInput = document.getElementById('title');
60
62
var descriptionInput = document.getElementById('description');
63
+ var streamKey = document.getElementById('stream-key');
61
64
<% for _,account in pairs(accounts) do -%>
62
65
<% local metadata_fields, err = account.network.metadata_fields() -%>
63
66
<% if metadata_fields then -%>
@@ -81,5 +84,15 @@ copyDownBtn.onclick = function() {
81
84
});
82
85
}
83
86
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
+ }
84
96
97
+ showBtn.onclick = showStreamKey;
85
98
</script>
You can’t perform that action at this time.
0 commit comments