1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Need to write online interactive video script.

Discussion in 'General Programming Chat' started by e13a34d32, Dec 28, 2011.

  1. e13a34d32

    e13a34d32 Registered Member

    Joined:
    Jul 17, 2011
    Messages:
    50
    Likes Received:
    12
    Here is the basic idea. I want to use HTML 5 (video tag) to create an interactive video system. Basically I have a collection of video lectures and I want to put a multiple choice quiz in between those lecture videos. Based on the results of the quiz the next video is selected. I also want to use ajax to prevent the need to constantly refresh.

    I have a little experience in php and html but can't figure out how to get started with this script. Any help?

    Also yes I've looked at adobe captivate but don't want to limit myself to obsolete technologies (flash).
     
    Last edited: Dec 28, 2011
  2. Chris22

    Chris22 Regular Member

    Joined:
    Sep 29, 2010
    Messages:
    400
    Likes Received:
    1,059
    You can subscribe to the "ended()" event on a HTML5 video tag.

    Play a movie and subscribe to the ended event, hide the video using jquery and display a quiz, based on the event of the user finishing that quiz (could be a form submit/button click or something) use jquery and set the video tags "currentSrc" property, and show the video tag. To play that video all you need to do is call "play()".
     
  3. e13a34d32

    e13a34d32 Registered Member

    Joined:
    Jul 17, 2011
    Messages:
    50
    Likes Received:
    12
    I'll give it a shot, thanks.
     
  4. wickedwebmaster

    wickedwebmaster Newbie

    Joined:
    Dec 1, 2008
    Messages:
    26
    Likes Received:
    31
    I would really suggest doing this project with Flash. You can load the movie into your swf with flash video component.

    If you use ActionScript you can make a quiz show after movie is finished playing. You could even add a flash cookie to the user's browser to let the flash file know that they have already seen the movie if they should leave the page and come back later.

    After they successfully answer the quiz have the flash file do a browser redirect and send them to the next video in the series...

    You can even add a php file in the BG that the flash file communicates with to keep score!
     
  5. e13a34d32

    e13a34d32 Registered Member

    Joined:
    Jul 17, 2011
    Messages:
    50
    Likes Received:
    12
    Sorry, can't use flash.

    Flash is kind of a obsolete technology, even adobe admits to it. HTML 5 is the future. I want my website to work on apple products such as the ipad and that can't be accomplished if I use flash. Bummber, i know, but it is what it is.

    Also I've figured out how to make it work. I'm using html 5 video tag, php and javascript with jquery.

    Thanks for the help.