Playing videos is a very important feature, especially if we're recording it, right? But even for apps that don't support video recording, video playback can be essential. Consider an e-learning type of application; reading about the subject can work well for a lot of people, but actually seeing the subject in action can help even more. Video would make an excellent platform for this type of learning.
We'll be working in documentsView.html
and movieView.html
in the www/views
directory if you want to follow along.
First off, there's a catch. Playing video happens to be really easy on iOS devices. Playing video on other devices, well, not so much.
For iOS, we'll use the movie view, which is akin to the image view in our previous project. Most of the code is duplicated, so we'll just talk about the changes here.
The template portion of the movie view looks like the following:
<div id="movieView_documentTemplate" class="hidden"> ...