Don't automatically close external video player

I was trying to figure out a way to have inline videos (not YouTube), but after searching around it seems like it isn’t really possible on Windows (If anyone has done it, please let me know!)

This is the closest thing I could think of to inline videos: Is there a way for the external video player to not automatically close after the video is done?

1 Like

HTML Video

1 Like

I don’t think that works. I looked at other posts on Anki forum and that seems to only work on Ubuntu and not Windows or Mac.

Have you tried it?

As far as I know windows has problems with mp4. webm works.

Yea I tried it.

Here are some of the posts that I looked at:

Have you tried webm?

I did not encounter any problem.
Imgur

1 Like

I haven’t tried it. I heard it was incompatible with mobile. So, that’s why I didn’t use it. How did you do it anyway? Maybe there is a way for Anki to hide certain fields depending on what platform you are on (iOS, Android, PC OS). And, I can have the video show up in webm form on certain platforms and mpv on others.

<video width="320" height="240" controls>
  <source src="movie.mp4" type="video/mp4">
  <source src="movie.ogg" type="video/ogg">
Your browser does not support the video tag.
</video>

The only thing that didn’t work was that it would work with the full path to the file. Then it would be possible to embed the video without syncing with ankiweb.

Just don’t use videos from [sound:…] as a source.
https://docs.ankiweb.net/templates/fields.html#field-references
It is convenient to have a separate field for the name of the video file.

1 Like

Old news, they have a coverage of 97%

Off-topic: WebP, a great format for images, has 96% coverage

3 Likes

It works on android. I’ve heard that it doesn’t work on iOS.

What OS are you using? And could you send me the exact code you wrote? I tried this and it didn’t work.

<video width="320" height="240" controls>
  <source src="2024-05-07_15-00-10.mp4" type="video/mp4">
</video>

Do I need to manually convert it to webM?

Wait, yea I do need to convert it lol. I’ll change it to something like this in a bit.

<video width="320" height="240" controls>
  <source src="2024-05-07_15-00-10.webm" type="video/webm">
</video>

Platform: Windows-10-10.0.19045

Try to convert or offer me a file sharing service where I can send you a video for testing. Your code works for me.

1 Like

Thanks for the help! The code worked!

Perfect. I can confirm that it worked on my Apple devices and Window devices.

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.