Video should be streamed where possible, although can be embedded into the app if required. We provide example code implementations on GitHub for:
- Streamed .mp4 file
- Embedded .mp4 file
- Youtube API
All of this is publicly available here.
You can use the HTML5 video tag:
<video poster="image.jpg"width="320"height="240" controls>
Your browser does not support the video tag.
The filetypes you include in the src should be relevant for the platforms you are aiming at, for example, .mp4 is good for iPad, so .ogg is irrelevant. You can use the poster image functionality and the controls as usual.
If you want to use an existing video API such as YouTube or Brightcove, you will need to use the relevant embed code for that API.
alert("Please go online to view the video");