How to Capture Node Screenshot programmatically in an Electron app - dom

Chrome has a feature to capture a screenshot of a DOM element, this feature is called Capture Node Screenshot:
And unlike the browser's Print function, it produces a WYSIWYG png image. How can I trigger this function from an Electron app?
I know for sure that my Electron app is capable to taking such screenshots since I can manually do so, but I need to do the same programmatically.

Related

Switch to fullscreen

I started programming with the Google Cardboard v0.6 about a year ago. I really nailed what I was trying to do with this software. The problem is, my software requires a toggle between full screen and stereo screen modes which I have applied a canvas button for. It is also supposed to start in full screen with an option of stereo mode.
I have three questions:
With the new SDK, is it possible to script a stereo to full screen toggle routine?
I noticed they make the GoogleVR as a fixed SDK mount within the build settings. I read something along the lines of widget controls within the Android SDK but I'm not to savvy with the way Android Studio reads the APK and how to modify it. Honestly, I'm running Visual Studio with a Source Control library in TFS so I want to keep it out of Android Studio as much as possible.
I also read there is supposed to be a full screen toggle button programmed directly into the SDK but it just doesn't pop up on my screen. Perhaps there's a method of making this button pop up that will save the day?
Even if the button exists, if there is a toggle button I'd love to have the script reference so I can apply it On Start in order to start in full screen mode.
Will toggling full screen reactivate screen canvases?
I know the new GoogleVR does not allow canvases because they have a RenderTexture problem. I'm not too concerned because I'm going to make the Toggle button freeze if no control device is registered to the bluetooth, and if there is I have a button on the control device that returns to full screen (or hopefully with that magical screen button that should exist). Whether I can toggle between the two settings is not going to make a difference if it still doesn't allow for Canvases in full screen.
My greatest frustration right now is with the discontinuation of the scripts on build. I've been using the GVRViewer and such which work just like the V0.6 software, but it appears to completely negate these scripts on build and force the build to use the SDK. I've read in the release notes that at the moment they have no intention of returning to the v0.6 platform and even recommend rolling it back to v0.6 if this is the case, but honestly - if we are forced to use an antiquated version of the software, how long will it be before it gets phased out? In my opinion based on my current observations, this feels a lot like a "one step forward, two steps back" situation.

Videojs Poster Image Does not Display - Need Poster Image to Display when Device Doesn't allow Auto Play

I have a website with a video in the header that is set to auto play when the page loads. It works great on all web browsers except for iPhone and iPad. I recently discovered that the iPhone won't allow auto play, which explains why when I open it up on the iPhone there is a black box with a line through the play button where the video should be. I can't even get it to load on the iPad. I haven't been able to test on Android or the other mobile devices since I don't own any of them. Btw: I am using Video.js.
Here's what I'm trying to do and need some help: Since my video has to auto play, I want to have the poster image display rather than the video if a particular device like the iPhone won't allow auto play. Is this possible?? I tried, but I can't get the poster image to show though. Instead, it just shows that ugly black box with play button with a line through it. I need help getting the poster image to display instead. I thought this would happen automatically but it isn't. Does anyone know how to do this? I even wondered if there's a way to write a fallback statement that says something like this: "If no auto play then display image." I've seen fallback statements for Flash, so why not have one for a device that doesn't allow auto play. I'm trying to get the code right, but I'm not a php expert so I need some help. Your help is appreciated thank you.

Samsung Smart TV App Picture in Picture

Have developed an app and deployed to the TV. Now I want to have the Single-Wide behavior (partially covering the screen over an underlying input, channel), but am unable to do so. Here's what I've done:
a) Put
body, html {background-color:transparent;} in the CSS file
b) config.xml - tag changes:
<fullwidget>n</fullwidget>
<dcont>y</dcont>
<movie>y</movie> (since my app could contain some html 5 video feed)
When I deployed, the background just showed black. However, there is a HDMI input from my laptop to the TV which shows fine. The ESPN app works fine with that input, just my app doesn't. Pretty sure I'm missing something regarding how to initialize the background program, screen.
PS:Using 2012 Emulator and 7500 Series 60" device for testing
Make sure you have in config.xml
<srcctl>n</srcctl>

Can Vuforia AR button open another view or app?

I'm making an app using unity and vuforia extension. When app will recognize an image it should show a button above it and, when the user presses it, I want to display a photo gallery. Is there a way to make this button trigger showing another UIView? Or show another app?
Yes, you can definitely do this. There are resources out there that will teach you how to create a plugin where you can launch an external UIView. For example: http://forum.unity3d.com/threads/56755-Unity-plugin-to-handle-loading-native-Cocoa-UI-s-with-ease
Also, you can open another app using Apple's URL scheme, described here:
https://developer.apple.com/library/ios/featuredarticles/iPhoneURLScheme_Reference/Introduction/Introduction.html

How to mirror Photoshop window to iPhone/iPad screen for mockup/development?

Is it possible to live preview a photoshop document on an iPhone or iPad? I tried it with VNC, but it only transfers a limited range of colors which is suboptimal. Is this possible with Apple's Developer Tools?
Easier, free way that works both on windows and mac : https://itunes.apple.com/lv/app/ps-play-for-photoshop/id651937919?mt=8
PS Play - works with Photoshop's Remote Connections (Edit->Remote Connections). Just add your computer's IP address and the password configured in Photoshop and you're done.
I came to this page with the same question. looked at the answer --> the app --> reviews and decided I'd use what I had to get it done. The results are awesome!
Requirements:
Iphone /Ipad App: Air Display ($9.99)
Photoshop CS4+
1.) Download Air Display.
Air display is by far the best app out there for mirroring or creating an extra screen with your iOS device. I looked at all flavors of VNC/DNS. VNC is for screen sharing and the results don't exactly make you cheerful. Air Display uses your iOS device as an extra screen like your desktop setup. $9.99 is premium pricing but well worth it. There are many uses for the app after you buy it. Check out their site here:
http://avatron.com/apps/air-display
2.) Setup Air Display
These instructions are covered in the app. You'll end up with this sort of setup:
Take into account your hot corners.
3.) Create a mirrored window for your document
Create a new window for your document.
Menu Bar --> Window --> Arrange --> New Window For [Your Document]
4.) Setup your window
A new document tab will pop up with the same name as the original. Drag this tab to your extra screen and there you go. Mirrored photoshop on your iOS device!
Now this new window will mirror the document on your main screen. The great part is this new photoshop window can be set up with its own View attributes (guides, rulers, etc). Here's some more tips:
You'll know your working with the right window when your in Photoshop and the main windows actions are greyed out. Now the menu bar will affect the mirrored window
Use These Settings:
Full screen
Fit on screen
Actual Pixels
Turn Off Guides (CMD ;)
Turn Off Rulers (CMD R)
There you go. An awesome mock up interface for Photoshop --> iPad
For anyone coming across this question now, check out Skala Preview (link below). If you have CS5 or higher, it even allows for live previews. Only problem for me is it requires iOS 5 and OSX 10.7, and I'm quite happy on 10.6.
http://itunes.apple.com/us/app/skala-preview/id498875079?mt=12
The only way that this would work built in (that I am aware of) is if a UIWebView managed to open it. Otherwise I think you're out of luck.
You could try manipulating a photo that is synced to the device then syncing the device with iTunes.
I'm more inclined to think that you would be better off writing an app specific to this task and just have it open the file over wifi or something like that.
I came up with using a Photoshop action which saves a PNG to a web server. Atomic Web Browser supports a full screen mode which then shows this PNG embedded in a HTML file which reloads once per second. It works good enough.
You've tried the rest, now try the best!
Xscope is an app for mac & iphone. Install it, and not only will it give you a bunch of useful tools, but one of those tools is called 'mirror'.
You simply:
Jump into Photoshop and go to Edit / Remote Connections... to set a password
Open Xscope on mac and put that same password in your preferences
Then in Xscope, click the 'Mirror' button, then the 'Photoshop' button (see http://d.pr/i/ziaC)
Open the Xscope Mirror iPhone app and press the button to connect to your mac
And that's it. You should then be able to see your canvas. The app also lets you scale the image larger or smaller based on ratios, and even take snapshots for later reference.
It's a pretty cool app. Promise to God I don't work for them!
http://xscopeapp.com/