Skip to content
Discussion options

You must be logged in to vote

Hi @gabschettino,

The simplest way would be to display video in a marker via the marker's HTMLElement property.

I've put together a very quick example with 2d markers to help you get started: https://www.itwinjs.org/sandboxes/BenPolinsky/quickvideomarkers2d

Take a look at MPDecorator.ts:

   // setup video
    const videlem = document.createElement("video");
    let sourceMP4 = document.createElement("source");
    sourceMP4.type = "video/mp4";
    sourceMP4.src = "https://storage.googleapis.com/gtv-videos-bucket/sample/TearsOfSteel.mp4";
    videlem.appendChild(sourceMP4);
    
    const ratio = 16/9
    videlem.height = 100
    videlem.width = videlem.height*ratio
    
    this.htmlElement 

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by gabschettino
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants