You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Regardless of whether I use the GUI display mode of cef or edgechromium, I have explicitly forced the use of --allow-file-access-from-files within the code. However, when my code attempts to load local files, it still throws the following error:
GET file:///C:/test.mp4 net::ERR_UNKNOWN_URL_SCHEME
or
Not allowed to load local resource: file:///C:/test.mp4
my test html is as follows:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Auto Play Video</title>
<style>
body {
display: flex;
justify-content: center;
align-items: center;
height: 100vh;
margin: 0;
background-color: #f0f0f0;
}
video {
width: 80%;
max-width: 640px;
border: 2px solid #333;
border-radius: 10px;
}
</style>
</head>
<body>
<video id="myVideo" controls>
<source src="file:///c:/test.mp4" type="video/mp4">
Your browser does not support the video tag.
</video>
<script>
window.onload = function() {
const video = document.getElementById('myVideo');
setTimeout(() => {
video.muted = false;
console.log("start play");
video.play().catch(error => {
console.error('play failed:', error);
});
}, 3000);
};
</script>
</body>
</html>
Code for adding permissions:
edgechromium (modify edgechromium.py):
Specification
Description
Regardless of whether I use the GUI display mode of cef or edgechromium, I have explicitly forced the use of --allow-file-access-from-files within the code. However, when my code attempts to load local files, it still throws the following error:
or
my test html is as follows:
Code for adding permissions:
edgechromium (modify edgechromium.py):
cef (modify cef.py):
Strangely, the following permission I added works as expected:
How can I remove this restriction? Our application needs to be able to play local video files within the program.
Practicalities
YES/NO I am willing to work on this issue myself.
YES/NO I am prepared to support this issue financially.
The text was updated successfully, but these errors were encountered: