Next, we need to actually make
the changes to our code so that we can display the video thumbnails. Open up the documentsView.html
file under www/views
so that you can follow along.
The theory behind displaying the thumbnails is much the same as displaying the thumbnails in our last project; that is, we're still using the canvas
tag to speed up the feel of our app, and we're still generating thumbnails from JPEG files. The difference is that we have to generate those JPEG files from the video file.
Let's start by taking a look at the documentIterator()
method in the following code snippet:
documentsView.documentIterator = function(o)
{
var theHTML = "";
var theNumberOfDocuments = 0;
documentsView.documentToIndex = {};
for (var i = 0; i < o.getDocumentCount(); i++)
{
var theDocumentEntry = o.getDocumentAtIndex(i);
theHTML += PKUTIL.instanceOfTemplate($ge("documentsView_documentTemplate...