htmlVideoLoader() loads video clips inside of containers that you define. Generally containers are just simple field objects that define a position and occupy space on the page.
TRY THIS:Draw a simple field on your page that defines the size and position of the video you want to play. Then name the field any unique name you want.
When setting up
htmlVideoLoader(), set
tbName to the name of the field you have created. The name is case-sensitive so it must match exactly the name of your field in order for the field to be used as the target container for you video.
As far as
srcMP4, this is the relative path to the video in the exported content. So if the video will be put in a folder called videos, then the
srcMP4 property would be set to
"../videos/[Your video name].mp4". For server compatibility, you should generally name your videos without spaces and it is usually best to use small case characters, though this is not absolutely necessary.
The PowerPac does not add files to your exported content unless you flag the content for inclusion in the export using the
DHTML Export Tree Manager (
PowerPac menu >
Add Folders to Export Tree ).
To add your video to the export of your book:- Create a folder in the same folder as your book directory called videos.
- Copy your mp4 file into that folder.
- Open the DHTML Export Tree Manager
- Click on the Root DHTML Folder Tree element in the folder list.
- Click Add Folder.
- Select the videos folder from your hard drive as the folder to include in the exported content and click OK.
- Click Done to exit the DHTML Export Tree Manager.
Now whenever the book is exported, the
videos folder and all of its contents will be included in the content of your book. When
htmlVideoLoader() is executed it will load the specified video in the field you drew and named previously.
You can monitor playback of your video to ensure that your students have viewed them before being allowed to move to the next page. When a video ends,
htmlVideoLoader() can send a user event to the field that was used as the container to display the video (set the parameter
notifyObject to
true). You can then set up actions that enable next page controls/buttons, etc.