zsviczian / obsidian-excalidraw-plugin

A plugin to edit and view Excalidraw drawings in Obsidian
4.2k stars 230 forks source link

BUG: embeddable video autoplay disable #1657

Open tonypuglieso opened 7 months ago

tonypuglieso commented 7 months ago

Your environment Obsidian Excalidraw Plugin.

Describe the bug When I'm embed a vídeo (not from youtube or vimeo) this work very well, but, each time I'm open the note, all vídeos autoplay at same time with audio. WHen I have 3 or more this not grateful 😢, This can be disabled. Very thanks.

To Reproduce Steps to reproduce the behavior:

  1. Go to Excalidraw note in obsidian use a video not from youtube https://fiverr-res.cloudinary.com/video/upload/t_fiverr_hd/btfwszc0n5k71jeb5lvj or vídeo attachment
  2. Click on 'embed this'
  3. Close and open the note, to autoplay all.

Expected behavior Can activate or deactivate play

Additional context

https://github.com/zsviczian/obsidian-excalidraw-plugin/assets/52177646/a1cd1e45-582d-4a50-8f9c-2e32ef67c4b0

tonypuglieso commented 7 months ago

This happens on videos outside the library. But if you import the video in the vault, and use "insert ANY file" the vídeos start paused.

zsviczian commented 7 months ago

I need help with this one... If anyone knows the solution. I insert a webview element. React webview does not seem to have an autoplay property.

    return (
      <webview
        ref={(ref) => view.updateEmbeddableRef(id, ref)}
        className="excalidraw__embeddable"
        title="Excalidraw Embedded Content"
        allowFullScreen={true}
        src={src}
        style={{
          overflow: "hidden",
          borderRadius: "var(--embeddable-radius)",
        }}
      />
    );