TikTok Embed Autoplay Off

Initially, I wrote this as a help post. But in writing out the question, I found my answer in the TikTok developer docs.

Original post

I reviewed this forum and stumbled upon an iframe solution that works to embed TikTok videos in Obsidian’s editing/live preview and reading mode.

<iframe src="https://www.tiktok.com/embed/7382225350710824222" allow="fullscreen" style="width:19vw;height: 72vh;" frameborder="0" scrolling="no" autoplay="0" muted />

where 7382225350710824222 is the video id you get from TikTok from this example link: https://www.tiktok.com/@_jen_hamilton_/video/7382225350710824222.

However, the result is the video autoplays. I’ve looked in other forums using an iFrame, but maybe the control isn’t there. In the example above, I tried autoplay="0" and previously tried data-autoplay="false" but to no avail.

Has anyone else tried to embed TikTok videos and disabled autoplay? Thanks!

Reference forum posts

Solution

Turns out, the TikTok for Developers documentation solved it. I was using an embed link where I should’ve been using the v1 player.

<iframe src="https://www.tiktok.com/player/v1/7382225350710824222?autoplay=0" allow="fullscreen" style="width:100%;height:50vh;" />

There’s still some wonky height issues, and I suspect this is the default height Obsidian has on the container around the editor. I gave it a good enough viewable height of 50vh, which should be enough. Hopefully this helps those looking for a TikTok embed.

Ciao

To turn off autoplay for a TikTok embed in Obsidian, you can modify the embed URL by adding ?autoplay=0 to the end of the TikTok video link.
This prevents the video from playing automatically when the embed is loaded.
You can try this, may be that will helpful to you.

Closing the thread because the information seems complete enough and the mention of TikTok attracts spammers.