LSP - fix for folder streams in preview selection and keep protocol force table on embed error
This commit is contained in:
		
							parent
							
								
									4586289c83
								
							
						
					
					
						commit
						7535ab135d
					
				
					 1 changed files with 5 additions and 7 deletions
				
			
		
							
								
								
									
										12
									
								
								lsp/mist.js
									
										
									
									
									
								
							
							
						
						
									
										12
									
								
								lsp/mist.js
									
										
									
									
									
								
							| 
						 | 
					@ -2664,7 +2664,8 @@ var UI = {
 | 
				
			||||||
            for (var s in mist.data.streams) {
 | 
					            for (var s in mist.data.streams) {
 | 
				
			||||||
              if (mist.inputMatch(mist.data.capabilities.inputs.Folder.source_match,mist.data.streams[s].source)) {
 | 
					              if (mist.inputMatch(mist.data.capabilities.inputs.Folder.source_match,mist.data.streams[s].source)) {
 | 
				
			||||||
                //this is a folder stream
 | 
					                //this is a folder stream
 | 
				
			||||||
                mist.send(function(){
 | 
					                mist.send(function(d,opts){
 | 
				
			||||||
 | 
					                  var s = opts.stream;
 | 
				
			||||||
                  for (var i in mist.data.browse.files) {
 | 
					                  for (var i in mist.data.browse.files) {
 | 
				
			||||||
                    for (var j in mist.data.capabilities.inputs) {
 | 
					                    for (var j in mist.data.capabilities.inputs) {
 | 
				
			||||||
                      if ((j == 'Buffer') || (j == 'Folder')) { continue; }
 | 
					                      if ((j == 'Buffer') || (j == 'Folder')) { continue; }
 | 
				
			||||||
| 
						 | 
					@ -2688,7 +2689,7 @@ var UI = {
 | 
				
			||||||
                      selectastream(select);
 | 
					                      selectastream(select);
 | 
				
			||||||
                    },{active_streams: true});
 | 
					                    },{active_streams: true});
 | 
				
			||||||
                  }
 | 
					                  }
 | 
				
			||||||
                },{browse:mist.data.streams[s].source});
 | 
					                },{browse:mist.data.streams[s].source},{stream: s});
 | 
				
			||||||
                browserequests++;
 | 
					                browserequests++;
 | 
				
			||||||
              }
 | 
					              }
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
| 
						 | 
					@ -2921,7 +2922,7 @@ var UI = {
 | 
				
			||||||
        var $preview = $('<span>').hide();
 | 
					        var $preview = $('<span>').hide();
 | 
				
			||||||
        tabs['Preview'] = $preview;
 | 
					        tabs['Preview'] = $preview;
 | 
				
			||||||
        $main.append($preview);
 | 
					        $main.append($preview);
 | 
				
			||||||
        var $video = $('<div>').css('float','left').attr('data-forcesupportcheck','');
 | 
					        var $video = $('<div>').css('float','left').css('margin-right','1em').attr('data-forcesupportcheck','');
 | 
				
			||||||
        var $protocols = $('<div>').css('float','left');
 | 
					        var $protocols = $('<div>').css('float','left');
 | 
				
			||||||
        $preview.append($video).append($protocols);
 | 
					        $preview.append($video).append($protocols);
 | 
				
			||||||
        
 | 
					        
 | 
				
			||||||
| 
						 | 
					@ -2931,7 +2932,6 @@ var UI = {
 | 
				
			||||||
        
 | 
					        
 | 
				
			||||||
        function loadVideo() {
 | 
					        function loadVideo() {
 | 
				
			||||||
          $video.text('Loading..');
 | 
					          $video.text('Loading..');
 | 
				
			||||||
          $protocols.text('Loading..');
 | 
					 | 
				
			||||||
          
 | 
					          
 | 
				
			||||||
          // jQuery doesn't work -> use DOM magic
 | 
					          // jQuery doesn't work -> use DOM magic
 | 
				
			||||||
          var script = document.createElement('script');
 | 
					          var script = document.createElement('script');
 | 
				
			||||||
| 
						 | 
					@ -2942,7 +2942,6 @@ var UI = {
 | 
				
			||||||
                loadVideo();
 | 
					                loadVideo();
 | 
				
			||||||
              })
 | 
					              })
 | 
				
			||||||
            );
 | 
					            );
 | 
				
			||||||
            $protocols.text('');
 | 
					 | 
				
			||||||
          };
 | 
					          };
 | 
				
			||||||
          script.onload = function(){
 | 
					          script.onload = function(){
 | 
				
			||||||
            if (typeof mistvideo[other].error != 'undefined') {
 | 
					            if (typeof mistvideo[other].error != 'undefined') {
 | 
				
			||||||
| 
						 | 
					@ -2951,7 +2950,6 @@ var UI = {
 | 
				
			||||||
                  loadVideo();
 | 
					                  loadVideo();
 | 
				
			||||||
                })
 | 
					                })
 | 
				
			||||||
              );
 | 
					              );
 | 
				
			||||||
              $protocols.text('');
 | 
					 | 
				
			||||||
              return;
 | 
					              return;
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
            
 | 
					            
 | 
				
			||||||
| 
						 | 
					@ -3063,7 +3061,7 @@ var UI = {
 | 
				
			||||||
              $tbody.append($tr);
 | 
					              $tbody.append($tr);
 | 
				
			||||||
              $tr.html(
 | 
					              $tr.html(
 | 
				
			||||||
                $('<td>').html(
 | 
					                $('<td>').html(
 | 
				
			||||||
                  $('<input>').attr('type','radio').change(function(){
 | 
					                  $('<input>').attr('type','radio').attr('name','protocolforce').change(function(){
 | 
				
			||||||
                    $video.attr('data-forcetype',$(this).val()).html('Loading embed..');
 | 
					                    $video.attr('data-forcetype',$(this).val()).html('Loading embed..');
 | 
				
			||||||
                    loadVideo();
 | 
					                    loadVideo();
 | 
				
			||||||
                  }).val(source.type)
 | 
					                  }).val(source.type)
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue