new embed framework - WIP
This commit is contained in:
parent
5d702abdc5
commit
f82e75e891
2 changed files with 430 additions and 0 deletions
49
lsp/test_newembed.html
Normal file
49
lsp/test_newembed.html
Normal file
|
@ -0,0 +1,49 @@
|
|||
<html>
|
||||
<head>
|
||||
<title>Test the stream embedding</title>
|
||||
<style></style>
|
||||
<script src=plugins/jquery.js></script>
|
||||
<!--<script src='../src/embed.js'></script>-->
|
||||
<script src='newembed.js'></script>
|
||||
<script>
|
||||
var embed_settings = {};
|
||||
$(function(){
|
||||
$('button#embed').click(function(){
|
||||
$('#embedcontainer, #button_container').html('');
|
||||
|
||||
var streamName = $('input[name=streamName]').val();
|
||||
var embedtype = $('input[name=force]').val();
|
||||
|
||||
var info = document.createElement('script');
|
||||
info.src = 'http://localhost:8080/info_'+streamName+'.js';
|
||||
document.getElementById('embedcontainer').appendChild(info);
|
||||
info.onload = function(){
|
||||
if (embedtype == '') {
|
||||
$('#embedcontainer').removeAttr('data-forcetype');
|
||||
}
|
||||
else {
|
||||
$('#embedcontainer').attr('data-forcetype',embedtype);
|
||||
}
|
||||
$('#embedcontainer').append(
|
||||
$('<div>').text('Embedded: '+mistembed(streamName))
|
||||
);
|
||||
console.log(mistvideo[streamName]);
|
||||
};
|
||||
});
|
||||
});
|
||||
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<label>
|
||||
Enter the streamname: <input type=text value=bunny name=streamName>
|
||||
</label><br>
|
||||
<label>
|
||||
Force embed type: <input type=text name=force> (blank for auto)
|
||||
</label><br>
|
||||
<button id=embed>Embed</button>
|
||||
<div id=button_container></div>
|
||||
<div id=embedcontainer style="width: 100%; height: 35em;" data-forcesupportcheck data-autoplay>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
Loading…
Add table
Add a link
Reference in a new issue