').html(
- $('').text(priority[i].url)
- ).append(
- $(' | ').text(priority[i].type)
- ).append(
- $(' | ').addClass('align-center').text(priority[i].priority)
- )
- );
- }
- $('#listprotocols').html($table);
+ if (typeof mistvideo[streamName].error != 'undefined') {
+ $('#preview-container').text(mistvideo[streamName].error);
}
else {
- $('#listprotocols').html('No data in info embed file.');
+ var priority = mistvideo[streamName].source;
+ if (priority.length > 0) {
+ $radio = $('').attr('type','radio').attr('name','forcetype').attr('title','The embed type that is being used.').change(function(){
+ $('#preview-container').attr('data-forcetype',$(this).val()).html('');
+
+ var script = document.createElement('script');
+ script.src = embedbase+'embed_'+streamName+'.js';
+ script.onload = function(){
+
+ };
+ document.getElementById('preview-container').appendChild( script );
+ });
+ priority.sort(function(a,b){
+ return b.priority - a.priority;
+ });
+ var $table = $('').html(
+ $('').html(
+ $('')
+ ).append(
+ $(' | ').text('URL')
+ ).append(
+ $(' | ').text('Type')
+ ).append(
+ $(' | ').text('Priority')
+ )
+ );
+ for (var i in priority) {
+ $table.append(
+ $(' | ').html(
+ $('').html(
+ $radio.clone(true).attr('data-name',priority[i].type).val(i)
+ )
+ ).append(
+ $(' | ').text(priority[i].url)
+ ).append(
+ $(' | ').text(priority[i].type)
+ ).append(
+ $(' | ').addClass('align-center').text(priority[i].priority)
+ )
+ );
+ }
+ $('#listprotocols').html($table);
+ $table.find('[name=forcetype][data-name="'+mistvideo[streamName].embedded_type+'"]').attr('checked','checked');
+ }
+ else {
+ $('#listprotocols').html('No data in info embed file.');
+ }
}
}
document.getElementById('preview-container').appendChild( script );
diff --git a/lsp/pages.js b/lsp/pages.js
index 04b9ca0f..a7ebd313 100755
--- a/lsp/pages.js
+++ b/lsp/pages.js
@@ -294,9 +294,19 @@ function showTab(tabName,streamName) {
},10000);
updateOverview();
- if (!settings.settings.config.capabilities) { saveAndReload(); }
+
+
break;
case 'protocols':
+
+ if (typeof settings.settings.capabilities == 'undefined') {
+ getData(function(data){
+ settings.settings.capabilities = data.capabilities;
+ showTab('protocols');
+ },{capabilities:true});
+ return;
+ }
+
var $tbody = $(' | ').attr('id','protocols-tbody');
$('#page').html(
diff --git a/lsp/test_streamembed.html b/lsp/test_streamembed.html
index 8c3ae4f8..d2387d92 100644
--- a/lsp/test_streamembed.html
+++ b/lsp/test_streamembed.html
@@ -2,22 +2,31 @@
Test the stream embedding
-
+
|