How to run sample Threejs VR project using local server? - javascript

I am trying to run sample threejs project for VR using xampp local server in Samsung NOTE 4 device.In this phone, online threejs VR examples(https://threejs.org/examples/?q=vr#webvr_cubes) working fine,
but same example in our local server link(http://192.168.1.2/three.js-dev/examples/?q=vr#webvr_cubes) always returns "Your browser does not support WebVR".
Can any one give me suggestions or idea how to run that sample project using xampp local server
Thanks in Advance

At this time, WebVR is still an experimental feature (I assume you're using Chrome).
http://192.168.1.2/ is not seen as a trusted entity, hence experimental features are disabled.
However http://127.0.0.1 and https://threejs.org are allowed to use this feature.
To enable WebVR, go to chrome://flags/#enable-webvr and click Enable
If you want your users to be able to use WebVR today, you have to apply for Origin Trials by filling in this form.
Google will give you a token to add on your page. (Note that you will have to set up HTTPS on your server).
Alternatively, you can add a polyfill to make your VR work everywhere (not just in Chrome M59+).
(just include the polyfill before three.js)

Related

Can't print a flash application within electron

My problem
I am currently developing an electron (v4.2.10, I can't upgrade) application with the primary purpose of browsing on a specific homepage (using electron-navigation) and making their flash games playable.
I have included the Pepper Flashplayer (v32.0.0.156) for this purpose and so far it is all working well.
However when trying to print a page including a flash game it will print a blank page. Trying the same in my current versions of Chrome or Firefox (with current flash player) yields the same result, however in Edge it works.
What I've tried so far
I have no access to the actual pages of the site or any of the swf files
The pages with the swf files are http (I tried setting browserWindow web preference disableWebSecurity to true, no change)
I have tried different versions of the flashplayer
Screenshotting the page is sadly not an option
I have looked into the plugin nw-flash-trust but I am accessing an external source
When I downgraded electron to v3.0 it actually managed to print most of the display, which may point to it being related to the underlying chromium version
Does anyone have an idea how I can fix this? I have absolutely no knowledge of flash development itself. I would love to be able to print on v4.10 too. Many thanks for any help!

Source visibility in ionic hybrid apps

I've just started learning ionic framework. It uses web browser capabilities for building apps.
These capabilities namely HTML, javascript and CSS are client side stuff. Which on browsers can be seen with view source.
My questions is how will be the visibility of the source? Will the end user be able to see the source of the app?
If yes, is it normal for any app? Shall one be worried about the security of the source?
The visibility of the source in chrome://inspect#device , is pretty much the whole application. And no, end user cannot see the source of your application once you set and push the project to production mode.
Well, since you are developing a hybrid application, there are of course, pros and cons for each. Security might not be as strong as native apps, but development time is greatly reduced to push the app to different platforms.
If you would to do something would requires high security and non-visibility of your source , then native is the way to go. As for hybrid apps,if you need somewhere to store your data securely, you will need plugins to communicate with native platform's secure storage which might pose a security risk. But then again, even native applications can be de-compiled. The way developers tries to make it harder is via obfuscation methods.
Once u set your application to production mode, you will not be able to inspect your application anymore.
To show your web-app on chrome://inspect/#devices :
1) Make sure your web-app is running and your phone is plugged into your computer via usb with USB debugging on and your PC is trusted by the phone.
2) Under device manager, you should not have missing phone drivers. (it would look something like this)
3) ADB should not be running co-currently. And you should be able to see something like this on ur inspect page:
4) Click on inspect button and you're done! (:
You have a signed apk, when you install it on a device and inspect the device on google chrome the inspect option will not be available. Theres an easy way to do that decompile the signed apk using apktools you will get the AndroidManifest.xml file. simply add android:debuggable="true" to the tag and recompile it resign it and you will be able to inspect it. If you check the main.js file in the inspect section the source code is visible.
Hence you can use Jscrambler to prevent this (Its a paid service i too am new to it)

HTML5 File System Info Bar Not Responding In Kiosk Mode

I am creating an application that runs in chromium portable in full screen with the --kiosk flag. It is written in HTML, JavaScript, and CSS. I am also using the HTML5 File System to store some large sets of data. The application opens up in full screen, and the info bar to request permanent storage pops up.
The problem is that, while running in kiosk mode, you cannot select either "OK" or "Cancel" to the file system's request to store data. You can only close the info bar with the "X". This results in the file system not getting any kind of quota and the application fails.
So is there a way to have unlimited storage for an application running from "file:///"? I have tried using --unlimited-storage but it doesn't seem to work for a webpage.
Is there a way to open up in full screen without using --kiosk? Any other work arounds or suggestions are welcome.
What version of Chromium Portable are you using? I had a similar issue awhile back, but I don't have the same problem in the newer versions. I am using the latest version as of now which is Chromium Portable 30.0.1599.10 (released on 2013-08-21).

Phonegap app working locally, not working on phone

I have written a phonegap application, and it performs a pretty simple task, it gets some JSON from a YQL link, and then displays it nicely to the user. This works excellently when I run it using Google Chrome on a Desktop, but, my client tells me that it does not work on his device which is Android 2.3. What can be going wrong? I'm using phonegap build to build to app, and they tell me that it is given internet permission, but, when my client puts the APK on the phone (its not on the market yet), does he need to do something special for it to access the internet?
Thanks a lot,
Dhaivat
in phonegap, allow external host : Open phonegap.plist -> external host and add your url or * to allow all
within the phonegap app the webapp runs under the file:// protocol - this might affect things.
you should test this at least on an emulator yourself - clients usually screw up anything some might screw up when testing ;) best would be to test on an actual device tho.
I'm not sure if this will help but I had a similar problem testing my app here:
https://stackoverflow.com/questions/17496104/json-wordpress-feed-not-appearing-in-android-studio-emulator-using-phonegap
I needed to change access origin to ="*"/ in my config.xml

Simple application to aggregate information from multiple web services in fullscreen

Whats the easiest way to build a simple 'web' application which is a single page, that just refreshes itself (using AJAX or something) to display continuously changing data hosted on various different servers on the internet?
I want to interface with (for example) Twitter, Facebook, Skype, Google Calendar, and any number of other services that have some type of web API.
The application does not need to allow user interaction other than to configure it with the authentication parameters needed to access those services.
It should be able to run full-screen with no UI elements showing, just the pretty information I am displaying.
I started to write an HTML file using Jquery but I am running into "Same Origin Policy" issues. Is there a way around this?
I'd love to just write this in Html/Javascript and run it in Google Chrome, is that possible somehow? I don't know how to get around SOP without hosting my own web server as a proxy to cross the domains.
Is there another alternative that is still pretty easy and simple? I looked into using the Windows Vista Sidebar but apparently you can't have a full-screen gadget.
I figured out that I can use the command line option for chrome:
--disable-web-security
And it will allow me to workaround the same origin policy, and since I am using this for a local application I can put the app in a virtual machine and let it run without too much worry.

Categories

Resources