0

I am working on project(in Codeigniter) where i need to calculate video duration which is running on my website but saved on You tube server. and how can i know that video is watched completely.

1
  • 1
    Follow this answer and also link to YouTube API posted in same answer. Commented Aug 19, 2017 at 10:28

1 Answer 1

2

use event.target.getDuration() to calculate duration

if (event.data == YT.PlayerState.ENDED) { to know video is watched completely

DEMO

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.