Skip to content

How to add video stream (WebRTC) overlay? I tried to use addSource for videoSource, but it still did not work #5422

Answered by syauqisabili
syauqisabili asked this question in Q&A
Discussion options

You must be logged in to vote

Hi Harel, I fixed this issue based on your advice on adjusting the marker size by adding a callback function for load, zoom, and move events.

  addRadar (lng: number, lat: number, range: number, htmlContent: string) {
    // Create element for the radar (video)
    const el = document.createElement('div');
    el.style.position = 'absolute'; 
    el.style.borderRadius = '50%';

    // Create the iframe for the video
    const iframe = document.createElement('iframe');
    iframe.src = `${htmlContent}?controls=0&noscroll=1`;  // URL of the video stream
    iframe.style.display = 'block';
    iframe.width = '100%'; 
    iframe.height = '100%';  
    iframe.style.border = 'none';  
    iframe.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@syauqisabili
Comment options

Answer selected by syauqisabili
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants