Duplicate Video Feed

Vuyiswa Maseko 351 Reputation points
2022-09-29T23:06:57.967+00:00

Good Day

i am using Webrtc to show live feed via Webview . The Video feed show the feed but the problem is that it shows two Videos like this

246200-index.jpg

and my html is defined like this

           <style>  
                   
            .center-screen {  
                position: fixed;  
                top: 40%;  
                left: 50%;  
                transform: translate(-50%, -50%);  
            }  
               
            .video {  
                height: 100%;   
                border: solid 5px brown;  
                float: left;  
                position: relative;  
                   
            }  
     
             
      
           
        </style>  
    </head>  
    <body bgcolor="#9A4531">  
        <form id="form1" runat="server">   
            <div class="center-screen" id="livewindow"  >   
               <div class="video" id="videos-container"></div>  
               <img src="../images/nosignaltv.jpg" id="imgnosignal"   style="height:100%"/>   
            </div>         
        
       
        <script src="../js/jquery-1.11.3.min.js"></script>  
        <script>  
            $(document).ready(function ()  
            {  
                var connection = new RTCMultiConnection();  
                var channelid = getUrlVars()["channel_token"];   
                connection.socketURL = 'https://mysignalrServer/';  
             
                connection.session = {  
                    video: false,  
                    data: true  
                };  
             
                   
                connection.socketCustomParameters = '&extra=' + JSON.stringify(connection.extra);  
                connection.join(channelid, function (isRoomOpened, roomid, error)  
                {  
                    if (isRoomOpened === true)  
                    {    
                        $("#imgnosignal").hide();  
                        $("#videos-container").show();  
                    }  
                    else  
                    {  
                        if (error === 'Room not available')  
                        {  
                              
                            $("#imgnosignal").show();  
                            $("#videos-container").hide();  
      
                            //alert('Someone already created this room. Please either join or create a separate room.');  
      
                            return;  
                        }  
                        alert(error);  
                    }  
                });  
      
                connection.videosContainer = document.getElementById('videos-container');   
               
        });   
    </script>   
   
    <script src="../js/common.js"></script>   
    
    </form>  
</body>  
</html>  

when i run this on the page itself i only see one video feed, but when its running through webview in Xamarin it shows me tow Video controls

Thanks

Xamarin
Xamarin
A Microsoft open-source app platform for building Android and iOS apps with .NET and C#.
5,294 questions
ASP.NET
ASP.NET
A set of technologies in the .NET Framework for building web applications and XML web services.
3,254 questions
{count} votes