How to open chrome and display as texture in game c# / unity - c#

Ok, so my client wants a feature where the person should be able to find an image through google during their game. I'm not sure, the only idea I've had would be to basically screen record the specific application then apply it as a texture to a cube. It is also in VR so the Chrome searching has to be done specifically in application. Any suggestions?

you could do a screen capture kind of thing -
i stumbled upon a video when i was trying to get some embeded browser functionality going:
https://www.youtube.com/watch?v=lMLSACaaOjU
as the above shows you could take a capture based off of a certain click then whatever texture coding would come after that capture
also on the asset store there are assets which are costly that already contain embedded web browser depending on the platform.
https://assetstore.unity.com/packages/tools/gui/embedded-browser-55459
https://assetstore.unity.com/packages/tools/gui/3d-webview-for-android-137030
aside from that you would have to program the results returned from the google web search request made (unitywebrequest) and allow your client to select the image

Related

Capture a screenshot of Google Map Programmatically

I need to take a screenshot of a Google Map without using a static map in asp.net.
The features I need are not in the static map API, including rotation of the map, traffic, and so on.
I've used several libraries, including the C# web browser, CEFSharp, but none of the ability to take screenshots from the Google map.
For example, my problem with the C# web browser is to load the Google map after the DocumentCompleted event.
The resulting image was displayed as gray content.
How can I get a screenshot of Google Map Programmatically?
Selenium works very well for browser automation in C#. Without knowing your use case not sure if launching a full chrome / Firefox instance will suffice however you can definitely use it launch the browser, navigate to the map, and screenshot.
How to screenshot in Selenium / C# has been nicely answered in another question here .

c# directshow multiple windows handling

I have problem with handling multiple video windows in directshow.
I have app in c# that captures video stream of my webcam and sends it through infinite pin tree to 2 separate renderers. When I run the app each of the renderers gets its own VideoWindow. Now when I set VideoWindow Style I can see changes only on one of them (looks like it is 2nd renderer window). Secound window is not effected at all. What should I do to access both of them? There is only one graph to build entire thing. Is there a way to reference videowindow by the renderer not by the graph? I was looking around web but there is nothing thats was able to point me in to good direction.

How to check programmatically if WP8 device has front facing camera

I am creating an app with multiple functionalities one of those needs access to front facing camera. I do not set it as a necessity to install the app in the manifest because I want the user to have access to the other functionalities even if front facing camera is not present. I do need however to notify the user whenever he starts said functionality that front facing camera is needed and it cannot run. How can that be done programmatically?
I have searched around the web and only found ways to exclude devices that do not have a front facing camera. That is not what I need however and I am wondering if it is even possible to do so....
The Microsoft.Devices.Camera class offers information like
Camera.IsCameraTypeSupported(CameraType.FrontFacing)
I've found more info about creating and manipulating cameras here on MSDN.

Best way to render images as a video clip in a mobile device

I have tried to approach this problem several ways.
I have a web application that will load a sprite (which is a large jpeg that 'holds' 100 frames. Using the offset of div properties I am able to 'move' the image along so it looks like a movie clip.
This works well.
I need to produce the same on mobile devices.
I have to support Windows Mobile 6.5.
I was using jQuery/ajax to move the sprite image along to stop any flickering of the image within the browser.
Windows mobile 6.5 does not support this.
So, i decided to do a native app using C# Framework 2.0.
I thought about converting the sprite to a mp4 file and playing within a web browser control. but IE on the device will not support html5.
I have been told there is a CAB file from adobe so that I can play flash videos on the IE. But, apart from using ffmpeg to convert these images to a flv there is not much control as to adding menu like pause,stop,play etc when playing the flv file. I have not started any of this by the way i assume that would be the case.
So.. I thought if I download the sprite to the device i could use the graphics object of a picture box and render the rectangle of interest from large sprite to picture box.
I could not download the Sprite and save it to an image though. I get 'out of memory exception'.
I used the OpenNetCF.Drawing as it is supposed to support large files. I still get the error message. I have reduced the size of the image and it will work on about 20 frames.
I would then have to 'stack' these images containing 20 frames and load them up when necessary.
I am beginning to wonder now whether i am doing the right thing?
Is there a different way of trying to achieve what i am trying to achieve that is quicker and more efficient as I have run out of ideas.
If I am OK doing it this way then what is the best way to render images in a picturebox like a video. Memory efficiency says load the image from the file on the device when needed and dispose of it but that would cause 'flickering'. What IS the best way to handle multitude of images on a device?
i have plenty of code I can upload but I was worried the question would look 'messy' as I have tried so many things. I will of course edit/upload the code as required.
Thanks.

Custom controlls and next and previous buttons for an embedded quicktime movie player

I'm currently working on a website project in asp.net that hosts videos in many different languages. They are in a series of 12 videos so I'd like to be able to embed one video player on the web page and then be able to click a next button and the next video in the list would play. I'd also like to be able to do the save thing with a previous button as well. Also is there a way to play and pause the video with custom controls? I did some research on it and I found some answers in Javascript but then I went to the apple documentation and it said you can no longer use it due to security reasons.
Does anyone have any solutions for any of these? Preferably in asp.net C# but anything will help. Thanks!
This should be doable using the code on apple's website. In fact, I just tried it using ordinary anchor hyperlinks to play and pause a movie. Works fine. Didn't try loading a new url, but it should work too. The security restriction only applies to calling javascript from a QuickTime movie. (Which btw can still be achived using an iframe).

Categories

Resources