Issue handling of some special characters (like #)
dege13 opened this issue · 3 comments
Proposed solution:
"#" should be converted to %23
Browser error text:
Error loading: file:///X:/Video%20Projects/Uploaded/2022-11-26%2021-38-26%20-%20Maxell%20#1%20-%20Huntington.mp4
Console error:
obs-random-videos.html:240 Error loading: file:///X:/Video%20Projects/Uploaded/2022-11-26%2021-38-26%20-%20Maxell%20#1%20-%20Huntington.mp4 errorFunction @ obs-random-videos.html:240 error (async) (anonymous) @ obs-random-videos.html:219
Acter further testing, I actually think this is an issue in the video player in Chrome (and Firefox). I did a quick test and found without your code at all, the video player fails with files with a "#" character in the file name.
<source src="X:\Video Projects\Uploaded\2022-11-26 21-38-26 - Maxell #1 - Fresh Step.mp4" type="video/mp4">
results in a failure.
<source src="X:\Video Projects\Uploaded\2022-11-26 21-38-26 - Maxell 1 - Discover.mp4" type="video/mp4">
plays fine
However, if I manually convert the "#" in the file name to a %23, it plays, like this.
<source src="X:\Video Projects\Uploaded\2022-11-26 21-38-26 - Maxell %231 - Fresh Step.mp4" type="video/mp4">
But this only fixes Chrome, and not Firefox.
For now, I will rename my hundreds of videos using this naming format.
@dege13 can you test out https://github.com/UpDownLeftDie/obs-random-videos/releases/tag/v3.4.4 and let me know if you see any improvement?
As for it not working in FireFox, that's interesting but not real relevant as OBS uses chromium for browser sources. So as long as it works for that specific version of chrome that's all we need.
@jaredkotoff Works great! Thank you!