I need a way to show a grid of videos, where if you hover over one, it will show a 3 second preview. This is all written in ASP.Net using C# and SQL Server 2008.
Questions I have to ask myself -
Would these be stored in a database or on the file system?
How to show these videos? - this is the easy part, just looking for opinions.
Any help would be greatly appreciated.
Storage: there are so many aspects to that decision. Many will say to put the files on the file system but then again that depends on whether you want easy disaster recovery, how you scale, whether your file system or DB supports better caching, etc.
How to show the videos: If your UI is in Flash, that's probably the easiest. If not, you'd probably need to generate a GIF with 3 seconds of video as a preview for each video, which you then load dynamically when the cursor hovers over the still thumbnail.
Related
I am currently developing an app that will browse(and more things, but this is not relevant) youtube lists. Now whenever I get a video, I display it's corresponding image and show it in a listview (or gridview, again not relevant). Now here is the dilemma: is it better to store the images locally after they are downloaded, or do we download them every time we want them showed, i.e:
this._image = new BitmapImage(new Uri("http://domain.com/content/someImage.jpg"));
You're probably going to want to see what YouTube has to say on the matter; I'm sure it's got something regarding this in its developer API documentation to note their preferred approach to it.
That said, take this as general advice; when you're constantly querying another system, you generally want to limit how annoying you are. Now, YouTube's not going to notice the load of one app, of course, but it's still a good habit to keep. Generally speaking, I'd prefer to split the difference: cache the image based on video ID and hold it for X hours, so if the user pulls up the same video in a search 20 times you didn't request a thumbnail 20 times as well.
That way you keep the result relevant by updating the image every day or two (assuming they searched for the video again).
Edit: Right, app. Mobile. Bandwidth. Godawful data caps. My advice is more important then and you probably want to make it cache for a couple of days to be safe, but have a hard cap of how many video thumbnails you keep at a time so you're not the app taking up 100MB of space on some guy's 8GB phone.
If you want to be super user friendly, throw something in the settings somewhere to let people change the approach to query every time, or cache for a specific time.
It really depends on your usage model. The correct term would be 'cache' image locally 'or' fetch from servers each time you want to show image. If user experience is of higher priority than showing the latest image snapshot of youtube videos (which very likely isn't going to change for same video) - then cache the images locally, with an expiry time. This would be helpful in having a faster user experience and also save some network bandwidth. Caching with expiry would ensure you are not filling up memory on device with too many unnecessary images and also as images get old, they will be less relevant and removed and you can fetch new ones.
Caching policy (the way you determine when an image is not of high importance and how long it should remain) will be an interesting problem and can have significant impact on the user experience
I am currently designing a portfolio website with wordpress. The idea is that it's going to be all in one page, and use js to scroll up and down.
After coding the whole thing in fixed width, I thought of the responsive design. I started reading and I think I got the idea. Before doing anything else I am going back to photoshop and re-editing the design for mobile - to quickly see what I want for mobile (almost mobile first, at least on photoshop, kind of ignoring what I already have)
In my current design I display my work examples in slideshow. I am using this plugin http://css-tricks.com/3412-anythingslider-jquery-plugin/. my first instinct is to remove these slideshows when for mobile and use only one image for one each work. is that good idea?
Also I seen some responsive design tutorials which use the same images for all resolutions and then scale them down with css. Should I have different (sized) images for mobile? for example
#media screen and (max-device-width: 480px) {
.img {
background:url(site-small.jpg)
}
}
#media screen and (max-device-width: 600px) {
.img {
background:url(site-large.jpg)
}
}
As I said my portfolio site is all in one page, and I use the jquery ScrollTo() feature to get this effect on navigation http://two24studios.com/. For mobile version, should I remove that or not?
I have some decorative images which simply look impressive and adds very little more to the interaction, would it be better if I remove them when screen gets smaller. And on this note (though I didn't look into it yet) if I what to remove some content when on small screen, do I only use display:none or is there a way to prevent the content from loading for no reason.
I am using one embedded font for the design, is it ok to keep that for the mobile version or is there any restriction on that, such as do mobile browsers support #font-face embedding.
And the very final thing, I am planing to create a new page within wordpress, and call it something like "playground" which would have a list of demos on html5, CSS3 and the like just to show off my skills. should I include that in the mobile version or not. As I think a mobile user can't really take advantage of that?
I hope you can help me with any of these uncertainties that I have
Mobile users have more limited bandwidth and slower connection speeds. That's something you want to keep in mind when considering how quickly the page will load as that can greatly impact user experience.
I would avoid using the slideshow for mobile -- or at least doing a slideshow that uses smaller images appropriate to the screen size. You don't need to download an image that's 720px wide when you're on a 360px wide screen, for example.
Scroll to will probably work fine. One consideration you may want to take is to use touch events rather than click events if you're using JavaScript for the "scrollTo" functionality. (A presentation on touch events.)
As for your playground page, that will depend entirely which demos you're planning to put there. I'd test out your examples on mobile to see if they make sense and function properly there; if they do, then display them. If not, either improve them to work on mobile or don't show them on mobile.
I don't want to use flash because it won't allow me to dynamically modify (add, remove) the pictures through my application so I thought about javascript (JQuery Plugins). but the problem is visitors can save the pictures and I don't want that to happen! .. so any ideas ?
Edit
I really appreciate your help and honesty but is JavaScript to have a dynamic modifiable SlideShow for my websites ? .. I don't care about screenshots, what's important is the original picture that I think will be downloaded to the visitor temp files!
The best you can do is a mild deterrent. I've written an HTML5 slideshow used by many. It offers right-click warning to those using it, but it is best referred to as a warning rather than a protection.
First off, if a browser can display an image, any viewer can get them too - no matter what you do - that's just the way the web works. If you really need them protected, then you need to use a significant semi-transparent watermark that touches important parts of the image or limit the viewing only to people who you trust.
If you're interested in a mild deterrent that can still be bypassed quickly by anyone who understands how a browser works, but might slow down non-sophisticated users, then you can implement a couple forms of click protection that make it harder to right-click save your images. Right click protection works best when the actual image you are displaying is not the top level image. This can be done by displaying a transparent image over the top of your slides. This will not be seen, but if a viewer succeeds in getting to a right-click-save menu, all they will succeed in saving is the empty transparent image on top. You can literally use a 1x1 transparent gif image which is tiny and then scale it up to the size of your image to cover it. It will not be seen, but it will defeat right-click save.
It is also common to also put in some javascript that attempts to intercept the right-click operation to prevent that, though this protection is blocked by more and more browsers now (like Firefox 4+) and is far from foolproof. It should not be relied upon.
In the end, these extra steps are only a mild deterrent and will only work with non-sophisticated viewers who aren't very determined. Because, even with the maximum protection in place, one can still look at the media list in the browser and see all the image URLs in the web page or look at the source or DOM or network trace of the web page to see what the URL is of the images that are being displayed. Once the URLs are known, the images can be saved easily. The danger of this kind of protection is that content owners believe it's real protection and they put images at risk that they shouldn't (without good watermarks on them). But, if you fully understand what you're getting (and not getting), you can do it.
It is impossible to Really protect them. If the user can see the image, then the user's browser has downloaded it. So the user has the image on their computer and can do anything they want with it.
There are lots of ways of making it harder for the user though. Disabling right clicking is one way.
If you really need to hide them badly you could use the data uri scheme too, but it really won't stop someone who really wants to get it:
http://en.wikipedia.org/wiki/Data_URI_scheme
You will not be able to protect your images unless you use a watermark which not what you're looking for as I understand you.
You need to remember that the user will always have his printscreen button and many tools that can do the job and that you can't control anyway
Break up your images into pieces, or possibly even embed them in larger junk images. Then use CSS to display the multiple overlapping divs with appropriate background styles to position the pieces where they need to be so to the user they look like one image, kinda like how google maps looks like one large image but is actually made up of many small ones. The user won't know the difference, but if they try to save them locally they'll just get one piece at a time.
Of course, that only works until they realize they can do a print-screen, but it's something. :-)
It is impossible to completely protect your images.
Seriously, if the user can see it in their browser they can save it to their computer.
You are fighting a losing battle here.
Even if you watermark your images, a good graphics program can countact that.
The best thing to do is only display small, low quality images that people wouldn't want to keep anyway.
I'm going to develop a small windows application using C# .NET in VS 2010. The app should read the personnel's data and fill a card layout's fields and then user can click the print button in order to print the card. What is the best solution for printing the card and displaying it to the user?
Like all thing in programming it depends on how much work you want to do. In our app (not sure if I am allowed to post a link, so better not) we take the data from user in a fairly standard form and then use standard graphical style calls to draw the card. This same code can then either draw into an image control for showing to the user OR to a printer device to produce the final output. We have (several) abstraction layers so that the calls for drawing into either type of output are the same.
In general we have found it much more productive to develop our own custom solutions rather than rely on a reporting component. The custom solution is easier to change and in most cases the functionality actually required takes only a day or so of work.
ReportViewerControl http://msdn.microsoft.com/en-us/library/ms251671.aspx is a possible candidate. it is free of charge if you have Visual Studio and it can export the report in PDF too. You can bind to a custom DataSource ( it does not need a Database behind ) and when it's done customizing takes minutes.
I am a student and my final project in graduate study of Computer engineering is design and development a map viewer web application that must be used for an AVL tracking system.
I am trying with applet in java.
First, map images format are GIF/JPG with big/large amount size(100MB).
Now, I want to find, how I break map images into smaller size and is true if I tiling images in order to showing on viewer, and how?
I program a coordinating application to convert lat/lng to pixels and vice versa,
Now I must to find what to doing with maps and find a method that is recommended to showing images of map in viewer.
If you have any idea to tiling or know about it.. or you recommend another method please help me
thanks
I would suggest you have a look at JAI for Java which has a class that implements tile based images. I have not used it much so i cannot get into specifics but what i know is that if you are looking for tile based images in Java JAI is the way to go.
So Google JAI and take it from there.
i may be completly off-track, but since you got long/lat, why don't you use a google map ? with a simple javascript timer, you could have quiclky a near real-time display.
the only problem would be the license and/or daily limit (this may not be a problem if this is not a live/productive system).
regards,
Guillaume