I'm very new to programming and I'm using WebVR on glitch.com. With my program, I will have users choose options on the screen. I'm wondering how I can log all of the user's options automatically? As in, once the user has finished, I can look into a folder or somewhere and see the options that the user chose. I hope this makes sense. Any help would be appreciated!
In general, if you don't need to save the options permanently, save them in a JavaScript variable.
If you need to save them permanently, save them using localStorage
Files and folders are problematic to access from JavaScript.
if using localStorage is an option, there is an official motion capture component. You can record
the HMD, and the controllers, and then replay all the user's activities.
It's quite simple, You just add
<a-scene avatar-recorder>
</a-scene>
You can use a couple properties:
avatar-recorder="autoRecord: true; recordingName: rec.json"
to make the component record the player when the page loads.
Then You can spectate and watch the user with another scene:
<a-scene avatar-replayer="src: rec.json">
</a-scene>
I think I've seen a a-frame's Kevin Ngo posting about testing VR websites this way.
Related
for one of my website I would like that when a user clicks on a button in a page, a progress bar advances in another page.
This is to allow users to follow their progress.
I can do it in JS but in the same page, I don't know how to transfer the data to another page.
I have searched with many plugins but I can't find anything.
If someone has had this problem, I'm interested in a solution.
Thank you very much
If you can do this with JavaScript, the only thing you need is a way to store the progress information locally on the visitors browser, maybe in some sort of a local storage.
See here on how this can be done (using local storage): https://developer.mozilla.org/en-US/docs/Web/API/Window/localStorage
Store Info:
localStorage.setItem('myProgress', 1);
Retrieve Info on any page:
const myProgress = localStorage.getItem('myProgress');
Can you suggest a very very simple issue tracking widget. UserVoice, is a little too involved for us with their forums and what not. What we want is something that just allows people to send us an issue or note and grabs a URL.
If by widget you mean something that you can embed on your page that will allow visitors to leave feedback/issues, there are javascript plugins, like feedback_me that will allow posting feedback to a backend provided by you.
If your are not comfortable with supplying a backend of your own, there are of course countless products that will do basic stuff for you and more. This is list by no means complete, but it's a start:
Usersnap
Trackduck
Marker
Userback
Bugmuncher
Doorbell
Hava a look at userrules.com
It allows you to integrate to your internal Issue Tracking system (JIRA, BugZilla, Redmine, Basecamp etc.). Any feedback from your customers come, you can directly export it to ur external system. And it will keep track of its progress for you.
Liked, what they have done with their UI, plus you can add your own customizable fields to ask some specific info from your customers in the feedback widget.
Getsatisfaction? BitBucket? Github? Google Code? All have issue trackers and, except for that last one, allow you to keep your code private, but your issues public.
My web-app records users via webcam and microphone. I want to use HTML/JS for the controls and content, so I created two separate Flex modules:
* A "Webcam Setup" module that lets you choose your camera and mic input devices
* A "record" module that lets the user record and submit the recording
When I embed either of these on the page, since they access the user's Camera/Mic object, Flash shows the Privacy dialog that says "[mysite] is requesting access to your camera and microphone. If you click Allow, you may be recorded."
The problem is, if I answer Yes in the Setup module, and later add the Record module to the page using Javascript, it again shows the Privacy dialog.
Is there a way to avoid the second privacy popup?
I would think that saying "Yes" for [mysite] would store that permission for at least that session, but apparently not.
What I've tried
I tried combining them into one SWF, adding it to the page once and moving the DOM element with jQuery's append() function when needed. When I move it, however, it reloads and asks me again.
Imagine if [mysite] was, say, blogger.com or livejournal.com (or, if it were still around, geocities.com). Would you want a "yes" response on that site to be good for every page under that domain?
Rememeber, just because you promise (cross your heart & hope to die) not to abuse the security hole you request, doesn't mean they can allow you to have that security hole.
Eventually, I found a usable workaround, similar to what I originally tried (above).
I combined the setup and record modules into one SWF. I first show the setup screen. When the user hits the Continue button on my page, Javascript calls a function in the SWF to swap to the Record screen.
I then move the <div> containing the Flash object to another location on page using absolute positioning, and resize the object.
Previously, I was trying to use jQuery's append() function to move the div within the DOM, and that was causing the SWF to reload. Just changing position and size does actually work.
You could build the "record" component to simply send and receive signals using an API you've created for your "setup" component (which has already been authorized, meaning one auth & two swfs) by using the LocalConnection class:
http://livedocs.adobe.com/flex/3/langref/flash/net/LocalConnection.html
This seems far closer to best practice than the other implementations mentioned, which smell a bit hacky and would probably confuse anyone who may inherit the codebase in the future.
I am working on a Flex AS3 application and wanted to add the Facebook Like button inside the app. I am unable to find any API or anything apart from the http://developers.facebook.com/docs/reference/plugins/like code generator.
Any ideas on how this might be accomplished? I am quite new to the recent changes in the Facebook Platform, so any info would be appreciated.
A direct "like" button should not be possible, since Facebook needs to sandbox the whole thing. Both like button formats (iframe and xfbml) use a sandboxed iframe, so nobody but facebook can set "likes" or know anything about the user.
For that to work with Flash, I think facebook would have to provide the button itself as a SWF file so you can load it in Flash. Then it can create a sandbox within itself and thus load the user information safely. Very much like the Chromeless Youtube Player, where it's almost impossible for Flash to access the actual FLV URL (even through introspection).
But even so, I don't think this would provide enough security... realize that you are dealing with very private user information and credentials here.
The only way I know you can "like" stuff through Flash is first doing the whole Facebook Connect thing (several popup windows asking the user for permissions) and then using the API of your choice to do the actual "liking", for instance, with the Graph API:
http://developers.facebook.com/docs/api#publishing
The closest information I could find are these 2 items so far. Hope it helps you in your journey.
Facebook Developer Site: Source
Facebook like button in flash
I hate answering "no" to a question because what I really mean is "I don't know and I can't find a way". I'm sure your Google-fu is as good as mine. All I can see are Facebook forum posts like this where people are asking the same question and no one is answering.
The examples they give of the like button are either embedded in iFrames or using XFBML <fb:like ../> tag. There are no examples of how to like something using their new graph api or either of their old APIs (FQL and REST API).
I had to get a Facebook like button in a html page (looked like a header on the top) and get the swf embedded below. As its a complete flex app in my case, this work around was possible and plausible
I have an ASP.Net application which as desired feature, users would like to be able to take a screenshot. While I know this can be simulated, it would be really great to have a way to take a URL (or the current rendered page), and turn it into an image which can be stored on the server.
Is this crazy? Is there a way to do it? If so, any references?
I can tell you right now that there is no way to do it from inside the browser, nor should there be. Imagine that your page embeds GMail in an iframe. You could then steal a screenshot of the person's GMail inbox!
This could be made safe by having the browser "black out" all iframes and embeds that would violate cross-domain restrictions.
You could certainly write an extension to do this, but be aware of the security considerations outlined above.
Update: You can use a canvas utility function to get a screenshot of a page on the same origin as your code. There's even a lib to allow you to do this: http://experiments.hertzen.com/jsfeedback/
You can find other possible answers here: Using HTML5/Canvas/JavaScript to take screenshots
Browsershots has an XML-RPC interface and available source code (in Python).
I used the free assembly UrlScreenshot.dll which you can download here.
Works nicely!
There is also WebSiteScreenShot but it's not free.
You could try a browser plugin like IE7 Pro for Internet Explorer which allows you to save a screenshot of the current site to a file on disk. I'm sure there is a comparable plugin for FireFox out there as well.
If you want to do something like you described. You need to call an external process that prints the IE output as described here.
Why don't you take another approach?
If you have the need that users can view the same content over again, then it sounds like that is a business requirement for your application, and so you should be building it into your application.
Structure the URL so that when the same user (assuming you have sessions and the application shows different things to different users) visits the same URL, they always see same thing. They can then bookmark the URL locally, or you can even have an application feature that saves it in a user profile.
Part of this would mean making "clean urls", eg, site.com/view/whatever-information-needed-here.
If you are doing time-based data, where it changes as it gets older, there are probably a couple possible approaches.
If your data is not changing on a regular basis, then you could make the "current" page always, eg, site.com/view/2008-10-20 (add hour/minute/second as appropriate).
If it is refreshing, and/or updating more regularly, have the "current" page as site.com/view .. but allow specifying the exact time afterwards. In this case, you'd have to have a "link to this page" type function, which would link to the permanent URL with the full date/time. Look to google maps for inspiration here-- if you scroll across a map, you can always click "link to here" and it will provide a link that includes the GPS coordinates, objects on the map, etc. In that case it's not a very friendly url but it does work quite well. :)