mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2025-09-20 11:44:09 +00:00
Allow special characters in video titles to buffer and timeseek without error
This commit is contained in:
@@ -128,10 +128,11 @@ var VideoParser = function (type, text, options) {
|
|||||||
xhr.send();
|
xhr.send();
|
||||||
|
|
||||||
video.addEventListener('loadedmetadata', async () => {
|
video.addEventListener('loadedmetadata', async () => {
|
||||||
// Use requestAnimationFrame instead of direct style changes
|
|
||||||
requestAnimationFrame(async () => {
|
requestAnimationFrame(async () => {
|
||||||
const xhr = new XMLHttpRequest();
|
const xhr = new XMLHttpRequest();
|
||||||
xhr.open('HEAD', video.currentSrc);
|
// Encode the URL to handle spaces and special characters
|
||||||
|
const encodedUrl = encodeURI(video.currentSrc);
|
||||||
|
xhr.open('HEAD', encodedUrl);
|
||||||
|
|
||||||
xhr.onload = () => {
|
xhr.onload = () => {
|
||||||
const observer = new MutationObserver((mutations) => {
|
const observer = new MutationObserver((mutations) => {
|
||||||
|
Reference in New Issue
Block a user