Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7993043
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T13:44:16+00:00 2026-06-04T13:44:16+00:00

Background: I am developing a web-based teaching program (using Drupal 7, if that matters)

  • 0

Background:

I am developing a web-based teaching program (using Drupal 7, if that matters) that requires users to view educational videos sequentially. I want to make sure they view each video in its entirety before gaining access to the next one. I’m pretty unfamiliar with the YouTube API but I combed through the PHP developer’s guide and didn’t find any information about how to do this.

I’m open to any reasonable way of accomplishing this. I was thinking that checking whether one or two random timecodes were hit, as well as whether the movie finished playing, would make it reasonably difficult to skip ahead without watching the video.

So to accomplish this I need to figure out two things:

  1. How to let the server know when the video being viewed has hit the selected timecodes, and
  2. How to let the server know when the end of the video has been reached.

If someone could point me in the right direction I’d greatly appreciate.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-04T13:44:17+00:00Added an answer on June 4, 2026 at 1:44 pm

    With the youtube api you can ‘ping the server’

      function onPlayerStateChange(evt) {       
           if (evt.data == 0){
           alert (player.getDuration())
         }
     }
    

    You can then get the duration of the clip. Further use of the api – timing when the user starts and stops should allow you you to work out the time said user spent viewing the clip.
    Compare this to the duration and if it matches ( or is close enough) trigger the reward.

    https://developers.google.com/youtube/js_api_reference

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

First, some background: I'm developing a web application using Python. All of my (text)
Background: We are developing a web application that includes charts. Currently one can left-click
I have a web-based documentation searching/viewing system that I'm developing for a client. Part
I'm using Faraday to communicate between two web apps that I am developing (
my background: i've been developing web applications using php and javascript for the past
The background I'm developing a REST API for a C#.NET web application using WCF.
I'm developing a web based app that checks for updates on the server and
I am developing a registration web app using Struts2 and need some guidance. Background:
Background: I am developing a largish project using at Atmel AVR atmega2560. This project
I'm developing a web based mobile application and I was thinking about the default

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.