question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Using file:/// in HTML in packaged apps

See original GitHub issue
  • Version: 19.24.1
  • Target: win32

When I package my app, tags using URL’s referencing file:/// stop working. For example, I have a video tag whose source is an absolute URL to a spot on the hard disk and it reports this when I attempt to play:

Uncaught (in promise) DOMException: The element has no supported sources.

I am assuming this is somehow related to the ASAR packaging. Is there a way to whitelist certain file:/// URL’s? In my particular case, I need to be able to reference files from the user’s Documents directory directly with elements.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:9 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
develarcommented, Aug 25, 2017

Ok, I hope you will find solution. btw — https://github.com/RIAEvangelist/electron-video-player also uses electron-builder but it seems can play video files from disk.

0reactions
ajbdevcommented, Aug 25, 2017

Thank you for the help!

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to package everything into single HTML file? · Issue #1704
I have a fairly simple site, it is a single page React app. When I do a build of the site I end...
Read more >
How to easily build Desktop Apps with HTML, CSS and ...
Electron can be used to build Desktop Apps with HTML, CSS and Javascript. Also these apps work for multiple platforms like Windows, Mac, ......
Read more >
Packaged Web Apps (Widgets) - W3C
Widgets are full-fledged client-side applications that are authored using Web standards such as [HTML] and packaged for distribution. They are ...
Read more >
HTML Service: Create and Serve HTML | Apps Script
The HTML service lets you serve web pages that can interact with server-side Apps Script functions. It is particularly useful for building ...
Read more >
How to launch any .html file on browser in UWP JS
// Path to the file in the app package to launch var imageFile = "index.html"; // Get the image file from the package's...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found