Issue Description:
I’m experiencing an issue with audio and video playback in the Anki editor. Here’s what happens:
- I open the Anki editor to add or edit a card.
- In the HTML input area, I insert a video or audio tag with the ‘loop’ attribute.
- As soon as I type or insert the tag, the media starts playing automatically.
- Each time I make any edit or add a new tag, a new instance of the audio/video starts playing, overlapping with the previous ones.
- Even if I try to pause or mute the visible media player in the editor, I can still hear audio playing in the background.
- This continues until I close the editor entirely.
Sample Tag:
Audio tag
<audio autoplay="" controls="">
<source src="038464c4-e7ee-49f6-bb08-2a4e4d28c0f8.mp3" type="audio/mp3">
Your browser does not support the audio element.
</audio>
Video tag
<video style="max-width: 100%; height: auto;" controls="" autoplay="" loop="" playsinline="">
<source src="d1b1bc1d-ddda-4b16-8fa2-204ef8a10c35.mp4" type="video/mp4">
<source src="66160071-61fa-4a48-9cc4-a63826467bf9.webm" type="video/webm">
Your browser does not support the video tag.
</video>
It seems that there might be hidden or background instances of these media elements that continue playing regardless of the visible controls.
This issue is making it difficult to edit cards with audio or video content. Any assistance in resolving this would be greatly appreciated.