SinchPSTNsample Using javascript Shows Warning After running index.html file - sinch

i saw below warnning when running the sample html in chrome
Warning! Protocol "file" used to load page in Chrome.
Please avoid loading files directly from disk when developing WebRTC applications using Chrome.
Chrome disables access to microphone which prevents proper functionality.
You can allow working with "file:", if you start Chrome with the flag --allow-file-access-from-files
Please help me to get out of this
thank you

It depends on which Operating System.
In OS X you can start Chrome by using:
open -a Google\ Chrome --args --allow-file-access-from-files
While in Windows you'd start Chrome in the command prompt using:
chrome.exe --allow-file-access-from-files
Please note that the warning does not disappear in the sample app, this is the expected behaviour but now calls will work. In a production environment you should not even include this warning, since it's only meant as a friendly reminder for developers using local file storage (directly opening the .html file from disk).

Related

Bash script to set Chrome as default for projects only?

Anyone know a way to set up Google Chrome so we can open development servers on? Instead of setting it as the general default browser?
In other words, I don't want my development servers to open up on Safari (that's what I have at the moment) each time I run my local development server, but I don't know how not to do that unless I switch Chrome to be my default browser (which I don't want it to be my default). Is there a way I can write in my .bash_profile to do this (automate the process of only opening Chrome for development purposes)?

Starting Chrome on macOS from the Finder with extra command line parameters

I want to stuff remote debugging and other esoteric dev-only only parameters to the Chrome application when it starts but I want it to be always there, including when I click on the app icon.
E.g.:
/Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome --remote-debugging-port=9222
How do I pass these command line parameters to the app directly?
I ended up creating an automator application with as shell task. Customized the icon and replaced Chrome.app with the new app in the dock.
I am still looking for a way to change the settings in Chrome so it can connect with remote debugger "on-demand" for specific tasks (not everything as it is set now) but that doesn't seem to be possible at this time. The VSCode folks have apparently solicited the Chrome team to provide this functionality. Stay tuned...

WebStorm and Firefox - sync

I am working on WebStorm and Chrome. It allows me to live coding.
I would like to change Chrome to Firefox, because it has not got problems with set mobile view.
So, how can I set live coding with WebStorm and Firefox?
I want to write code and see changes on screen without saving. Any tips?
Live Edit in FireFox is not currently supported, please vote for WEB-1805.
WebStorm doesn't provide integration with available third-party solutions, but you can still use Browsersync, etc. - start it in terminal or using Gulp/Grunt file, open your application URL in FireFox, hit Save All in WebStorm to get edited files saved - page will be updated

Full privileged console for firefox

I'd like to play around with developing firefox addons, and I'm going to be accessing stuff like Components.utils and other objects, which are not accessible from the client code.
I've tried native web console and firebug console, and both give me an error when I'm trying to access utils object.
Is there firefox javascript console, which would give me full access to all firefox objects?
Use devtools:Scratchpad (shift F4; it's built into Firefox and is accessible under the web development menu). You'll need to set the pref devtools.chrome.enabled to true in about:config, and set scratchpad environment to browser from Scratchpad's menu. Once you've done that, whatever code you run in scratchpad can access chrome objects and operates with chrome privileges.
No addons or separate applications are necessary.
Try MozRepl.
I'm using it with rlwrap telnet localhost ....

Open Chrome from terminal with developer console open

I can run Google Chrome from the command line using $ google-chrome, but what flag can I pass to open it with developer console already open, preferably open to the console tab?
I checked the man page for google-chrome but it states that
Google Chrome has hundreds of undocumented command-line flags that are added and removed at the whim of the developers.
I'm hoping one of those undocumented flags does what I want.
The flag you're looking for is --auto-open-devtools-for-tabs. Please note, that you should quit Chrome before this setting will take effect.
This has worked at least since Chrome 55.0.2883.87 m (the latest version as of initial post)
A Google employee maintains this list of automatically updated Chromium flags. There doesn't seem to be a flag for opening Chrome with developer console open.
Seems there is no such option. I added a feature request in Chrome product forum
https://productforums.google.com/forum/#!category-topic/chrome/give-feature-feedback-and-suggestions/mac/Stable/3HYIAl8_ndc
What exactly are you trying to achieve by that? If you are trying to run some kind of automated tests, you should try out PhantomJS.

Resources