简体   繁体   中英

Google chrome - playing a file from local storage is not working

I need to play video file in local Kiosk. Which has Windows 8.1 64-bit, with Google canary/chrome latest version. I have same problem with latest Google Chrome/canary versions its not playing files from local storage. If i play from cloud i have bandwidth issue+ there is no internet access for the kiosk.

Step 1 : allow everything zero restrictions

"C:\Program Files (x86)\Google\Chrome\Application\chrome.exe" --incognito --allow-file-access-from-files --disable-web-security 

Step 2:

Now i open a remote url https://stackoverflow.com/test.html , which is trying to play a video file which is located in the users PC, C:\\loop.webm

example: test.html

<video id="mediaplayer" autoplay="autoplay" poster="/images/vlc.jpg" type="video/webm" loop="" src="file:///C:/loop.webm" style="display: inline;"></video>

Result:

The page at 'https://....mysite.com/test.html' was loaded over HTTPS, but displayed insecure content from 'file:///C:/loop.mp4': this content should also be loaded over HTTPS.

Gives no error, but does not read a file, play the file at all.

How can i play the file in this case?

The error is telling you what's wrong! The C:\\ drive doesn't have a HTTPS certificate - it can't - but the website you are using has one. Chrome is doing this to protect a user's security. If you want to load a video file from the C:\\ drive, you need to do it on a non-https website.

EDIT: This plugin appears to be a work-around: https://chrome.google.com/extensions/detail/jllpkdkcdjndhggodimiphkghogcpida

Google Chrome/Canary do not support it even via command line if its applied. Temporary using Nginx to execute the files locally.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM