open-stage-control/resources/theme/home.html
2019-03-29 09:44:49 +01:00

32 lines
1.1 KiB
HTML

<div id="jumbotron-showcase">
<iframe id="showcase-frame" allowfullscreen></iframe>
<img src="{{ "img/logo.svg"|url }}" class="icon-play"/>
<img src="{{ config.extra.screenshot|url }}" id="jumbotron-img"/>
</div>
<script>
var frame = document.getElementById('showcase-frame'),
play = document.getElementById('jumbotron-img')
play.onclick = function(){
frame.src = "/showcase/client/"
frame.classList.add('show')
function load(){
var ipc = frame.contentWindow.ipc
if (!ipc) return setTimeout(load, 250)
// frame.contentWindow.error = function(){}
var request = new XMLHttpRequest()
request.open('GET', '/showcase/examples/ardour.json', true);
request.onload = function() {
if (this.status >= 200 && this.status < 400) {
var session = JSON.parse(this.response)
session.default = 1
ipc.trigger('connected')
ipc.trigger('sessionOpen', {session: session})
}
}
request.send()
}
load()
}
</script>