Search code examples
javascripthtmlcssvideoquicktime

Quicktime video: Hide Controls and get current play time


For our organization we need to have users watch a .mov file and not allow them to skip through the video. At the end, I also need to see that they video time they watched is = to the video duration.

My idea to block the controls was to just float a div over the scrubber so that they can't jump through the video. Is this a good way to do it? Is there a way to get the current play time?

Any better ways to implement this?


Solution

  • When you embed the object, set the controller parameter to false:

    <object CLASSID="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B" width="320" height="256" CODEBASE="http://www.apple.com/qtactivex/qtplugin.cab">
    <param name="src" value="sample.mov">
    <param name="qtsrc" value="rtsp://realmedia.uic.edu/itl/ecampb5/demo_broad.mov">
    <param name="autoplay" value="true">
    <param name="loop" value="false">
    <param name="controller" value="false">
    <embed src="sample.mov" qtsrc="rtsp://realmedia.uic.edu/itl/ecampb5/demo_broad.mov" width="320" height="256" autoplay="true" loop="false" controller="true" pluginspage="http://www.apple.com/quicktime/"></embed>
    </object>
    

    In order to do this, you will need to set autoplay to true, because the user will not be able to control the video at all with the controller off.

    You can learn more about QT parameters here.

    As far as keeping track of the time watched, you will need some sort of player to keep track of that kind of information. I suggest FlowPlayer. It is free and easy to use. Also, if you do end up using FlowPlayer, here is a link on how to keep track of the time a user spends watching your video.


    Just a sidenote, if you can control the rendering of said video, you should go with another more web-supported video type like H.264