Chromium-Browser ignores --allow-file-access-from-files flag - linux

Environment
I am using Chromium 78.0.3904.108 Built on Raspbian running on Raspbian 10 on a Raspberry 3b+.
I am opening up a bundled VueJs app via file:// protocol directly in the browser. The app files are locally available on the machine. Until now everything works as expected. The app displays and works fine !
Problem
The website files contain a html <video> tag to play mp4 video files, which are locally available as well. However, a console error is telling me Not allowed to load local resource: file:///home/path/to/the/video/file/abc.mp4
I am very aware of this issue, it's an inbuilt security feature of the browser. However, the machine will only load content owned by me, so I guess I should be safe ignoring the warning.
Expected behaviour
By passing --allow-file-access-from-files to chromium-browser I expected it would disable this security feature. Doesn't work. I tried --disable-web-security as well. Same result.
I tested the same vue app bundled into an electron executable and having the electron option "webSecurity" set to false, the content is able to play without the warning. However, since the playback performance in electron is notable lower than compared the chromium-browser directly, I was trying to use the browser directly.

Related

Is there a way to locate Google Chrome automatically - NodeJS

Problem
I have an electron + puppeteer application which uses the chrome on users computer (Windows and MacOS).
However the problems arises some users have chrome on different locations than set in my program, this leads to program not working completely.
Objective
Is there any NodeJs module to detect chrome location on a PC automatically like registry or something? Or is there a way for puppeteer to detect chrome?

Where to get a pre-built Chromium to easily do modifications?

Chromium takes too long to get compiled, like 7 hours on a regular powerful desktop. I'm thinking of some where to get a pre-built Chromium, with which I will be able to compile again only some files to re-link to make a new Chromium binary.
Possible to compile just some source code files and re-link (re-link object files)?
It's hard to build Chromium from source but it's every easy to build a new browser based on Chromium.
With GitHub Electron, any app based on it is a real Chromium browser, and developers may create custom UI for their Electron-based browsers.
However, modern browsers would require having servers for storing users' sync data, this might not be easily affordable for 1-man development army to create a new browser for the mass.
Electron app is a pack of Chromium sandbox, and Node.js backend, the 2 communicate thru' IPC as Node.js will be able to access all resources.
GitHub Electron:
https://electronjs.org

Using SoundJS with node webkit and local MP3 files

Has anyone used soundjs within a node webkit application using local mp3 files?
Can it be done? If so I will keep researching.
I have test apps that work through a browser (Chrome) playing my MP3 library with it but I cannot update my local library within javascript in an HTML5 page in my browser. As browsers block that.
So to get persistence I moved to a local app with node webkit and can do everything I want except successfully install soundjs.
Can it be done? If so I will keep researching.
The soundjs I am talking about is the one at http://createjs.com/Docs/SoundJS/modules/CreateJS.html
not the soundjs you install with npm. That is a module to access Soundcloud.
PS this is hobby fun stuff not real world stuff.
PPS I am working on Windows 8.1 just to make it harder!

D3(SVG) browser support

According to caniuse
http://caniuse.com/#search=svg
there is full support for SVG except for IE 7,8, but when I view in Chrome and Firefox, many examples don't work
For example both azimuthal and albers in the examples found here
https://github.com/mbostock/d3/tree/master/examples
Both work fine in Safari
My browser versions
Chrome
Version 21.0.1180.82
Firefox
14.0.1
Anyone care to comment as to why these examples aren't working?
As #Josh commented, the most likely reason is that you are viewing these examples out of your local file system, rather than using a local web server as described on the Wiki.
When running the examples locally, note that your browser may enforce strict permissions for reading files out of the local file system. Some examples use AJAX which works differently via HTTP instead of local files. To view the examples locally, you must have a local web server. Any web server will work; for example you can run Python's built-in server:
python -m SimpleHTTPServer 8888 &
Once this is running, go to http://localhost:8888/examples/.

JPlayer issues with Firefox 3.6.4

I'm having some issues with the JPlayer widget.
I'm using JPlayer 1.1.1 with Firefox 3.6.4 and I'm testing this locally on my laptop. I'm all setup to use local domains i.e. http://mylocaldomain, etc.
I have JPlayer in a folder under htdocs called myfolder that I access by going to http://myfolder. I have a test script setup just like the playlist demo on the JPlayer Web site (http://www.happyworm.com/jquery/jplayer/latest/demo-02.htm).
When I load my test script in Firefox it plays like half a second of the audio track. However, my script works fine using Safari and Chrome, and plays the tracks in sequence.
Is there a way to not use the .swf as I have been seeing in other posts as it's becoming really annoying trying to debug this for Firefox when it works in other browsers. I've tried various swfPath settings but it still doesn't work.
I just completed a JPlayer project using Firefox 3.6.10 as the main dev browser, and JPlayer 1.2.0, and I did not see an issue with it cutting off as you describe. You might try upgrading to JPlayer 1.2.
However there is this in the dev guide:
"Firefox 3.6 (Windows, Mac) †
...
* When using {oggSupport: true}, the browser appears to enable file seeking, which can cause the music to pause briefly when a new play position is selected."
Again, I don't think I saw the problem you mentioned. However, that means I do have working code. Have you tested on multiple machines, and what OS are you running Firefox on?
Try loading my application in your Firefox ( http://alinesoundscape.org/ )and see if it works. If so, I can post the relevant parts of my source and you can compare with what you have.

Resources