21 lines
456 B
JavaScript
21 lines
456 B
JavaScript
import $ from 'jquery'
|
|
|
|
function dashboard () {
|
|
$.get("/dashboard/data", function (res) {
|
|
if (res.error) {
|
|
window.location.href = "/"
|
|
return
|
|
}
|
|
|
|
var fullURL = window.location.origin + "/player/" + res.name
|
|
$('#myStream').attr('src', fullURL)
|
|
$('#stream_url').text(fullURL).attr("href", fullURL)
|
|
})
|
|
|
|
$('#show_key').click(function () {
|
|
$('#show_key').html(window.STREAM_KEY)
|
|
})
|
|
}
|
|
|
|
export default {start: dashboard}
|