Synchronize flash video on multiple PC's? - asp.net

For an event we need the following setup:
Multiple computers running a kinda of quiz (in asp.net). Every one of them plays a video as background (in the browser), sorta like a screensaver (with advertising). When moving the mouse a div pops up which allows the user to choose a quiz in fill out the forms. The catch is that the video needs to be synchronized on all the PCs.
These are the constraints:
The asp.net code is already there, so writing it completely in flash is no option.
We know .NET, javascript, html, the standard webdev stuff best, so investing time is something new is a last resort.
Any suggestions?

The way I see it, you have a couple options here:
1) Hack together synchronicity using a server-side timestamp passed to the Flash clients. Give the client the current time (server-side) and the time you want playback to begin (server-side, also). Then have the client wait that many milliseconds.
2) Configure your media server to stream the video as though it were a live feed. I am 90% sure this is possible with Flash Media Server, but I've never had the budget to manage my own video server.

Related

Possible to destroy a running game and then rerun it or run a different game

I noticed that the PlayN doc says that you can only call Playn.run once. Here is my scenario and I'm looking for advice on how to tackle it.
Let's say I have a list of games to choose from in a menu on my web page. Upon clicking a game, I call PlayN.run on that game and it runs on my web page inside the playn-root div. Now lets say I want the user to be able to stop and load a new game by selecting a different one in the game list and load that into the div and play that.
How would I go about tackling that? Do I need to re-register the HtmlPlatform all over again and the play the new game? Or is there a way to destroy the current game and then play the new game using the existing platform which is already registered in PlayN?
The easiest route would be to just use normal HTML links and have each PlayN game be on its own web page (which could be in an iframe if you don't want the URL to change at the top of the browser).
Trying to clear out and reinitialize everything internally is just a big waste of effort when the web browser will take care of all of that for you when you reload the web page.

track you tube video

I need to track youtube video status.I need to check the video is played till the end or not.After clicking an play button,user has to see the video till the end. Depending upon this i need to issue a certificate to my user. For this task i need to track the status of youtue video. how can i do this in asp.net?
I doubt you can do it for certain, best I imagine you could do is with some Javascript, start an embedded youtube video playing (set it to autoplay and it will start as soon as the page has loaded), then start a timer in Javascript for the same length of time as the video takes to play.
If the time gets to the end, and the user is still on the page, then they might have watched the whole video. In which case you could make a call back to the server (Ajax or to a ashx handler) saying that is is complete. Then redirect the viewer to the certificate page.
You'll never know for certain as they could start teh video running then walk away to make coffee or something. And I doubt Youtube expose this data themselves (ie, did the end of the video play).
This can be done using Youtube Javascript API. Learn more at YouTube guide for dot net developers. Also see YouTube JavaScript Player API Reference and especially the section on event handlers.

How to take a screenshot of the user's screen when the user places an order?

I don't mind if it is a print screen or export proccess of the page to jpg or even to pdf... how can it be done?
Assuming you literally want to save a screenshot of the user's desktop, this can't be done with server-side technology like ASP, since the user's desktop is not on your server (obviously).
There might be a JavaScript solution (I couldn't find one), or you can use ActiveX (Take a screenshot of a webpage with JavaScript?), which might not be a good idea if this is a public ordering system, since many users won't be able to use (or will turn off) ActiveX--I know I'm personally alarmed to see ActiveX notification these days, and that would likely change my mind about placing an order in the first place.
However, I would very much question the need to take a literal screenshot, instead of just recording the relevant data in a database or log somewhere (and then you could simulate the user's screen).

Capture screenshot of website on the client (Javascript or flash)

Is there some method to issue a screen capture(browser window content only) from the browser with javascript or a embedded flash object etc so that a full quality image of the page content be saved or printed or an alternative approach.
I have a web app (asp.net 3.5) with google maps and other ajax operations client side like a custom tile server. I have been trying to implement a way for the user to print good quality captures of the webpage.
I have used the basic Window.Print() but in both IE and FF there many artifacts within the google maps and some items such as the popped up bubble doesnt print. I have experimented with save pdf thru cutepdf(just to post an example here) and the quality thru window.print() is low too.
For example, A screenshot with FireShot addon is perfect and what I want the client to have. however that is FF only and I cant ask the clients to install addons/activex controls on their browsers.
Have a look at this download example zip file(4mb) with:
Example screen shot using FireShot
(example of what I want to achieve
thru a html/JS button with in the
page)
Firefox Window.Print() result
(cutepdf used to save as pdf)
IE Window.Print() result (cutepdf
used to save as pdf)
note in 2,3 the little bubble is not printed even when open.
For now, I have added the function on my site to go fullscreen and guide the user to take a screenshot or call the window.print() function.
I am still looking for a method to print/capture my page.
are there any flash/activex controls that I can include in my page and thru them provide a quality print mechanism?
Thanks again for all the help but I still need more. :)
Thank you in advance.
http://rapidshare.com/files/311849636/Print_examples.zip.html
You'll go to all that work only to find that a simple app like Snagit will do the job. Building a SnagIt Screen Capture Plugin
The only way to reliably provide a high-quality print version of whats on-screen in a rich web application is to use the client-side, say JavaScript, to send the server precise information about the current state (where bubbles are, etc.) and use that to generate an image that mimics the positioning. Convert that image to a PDF or what-have-you, then send to the client for download.
Google also has a Static Maps API that might give you good results. I looked into it myself once, and only didn't go with it since (at the time) there were limitations on how many points they could support in a polyline.
I don't think this is possible. It would be quite a security risk to be able to capture the user's screen through scripting (imagine bad sites capturing screen information).
No there is not, though it would come in quite handy at times for bug reporting etcetera.
You will probably get the best result by creating a separate version of the page as a PDF have that being generated. It's no quick fix by all means, but you'll get superb print quality and total control over everything. The map part will probably be a bit tricky though as you need to get the map as a bitmap on the server somehow, and if it's not in flash on the client I don't know how you'd do that.

Can I programmatically tell when a new tab is opened in the browser?

I'm addressing a problem with an ASP .NET web application where I want to avoid using query strings to uniquely identify dynamic content. I want to index the content relative to the opened tab/window that is displaying it. Is this programmatically possible? If so, what is the compatibility of the approach across multiple browsers? Thank you for your help.
No. It's not really any different to the user opening a new browser window, or opening the calculator application to work something out, etc. It happens outside the context of your web page and, short of a browser plugin, you can't get notification of this.
No, it's not possible by "tab" (i.e., browser window instance).
The closest you'll get is to drive new page requests off of session data established in previous requests but that's really a far cry from what you're asking asking for.
I'd tell whomever is "tasking" you with this that they are a moron you can't change the fundamental communication protocols of the web.

Resources