Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add xapi video verbs #17

Open
wants to merge 149 commits into
base: master
Choose a base branch
from
Open

Conversation

KirkJohnson
Copy link

@KirkJohnson KirkJohnson commented Nov 23, 2017

This pull request implements xAPI statements for the following video events: initialized, played, paused, seeked, finished, and interacted.

Context: h5p/h5p-interactive-video#40 (comment)

Here is the implementation chart of the new verbs in the different players (note that we did not implement in the Flash player, but can do so as future work):

xAPI Verb Youtube HTML5 Flash
seeked Youtube ✅ HTML5 ✅ Flash ❌
interacted (volume changed) Youtube ✅ HTML5 ✅ Flash ❌
completed Youtube ✅ HTML5 ✅ Flash ❌
interacted (fullscreen) Youtube ❌ HTML5 ❌ Flash ❌
played Youtube ✅ HTML5 ✅ Flash ❌
initialized Youtube ✅ HTML5 ✅ Flash ❌
paused Youtube ✅ HTML5 ✅ Flash ❌

KirkJohnson and others added 30 commits November 22, 2017 10:40
Added code to handle seeked event and trigger an xAPI statement
added code for sending following events
-seek
-volume change
-fullscreen
-play
-pause
-Initiated

I haven’t actually been able to get the fullscreen event to trigger
Used Youtube Video API to implement:
-Seek
-Play
-Pause
-Initiated
This is all that was possible via their API
Play wasn’t firing with play button was hit all the time so I added functionality in the state change event to evaluate if play event needed to be triggered.
Moved completion params into a function
Haven’t been able to get this code to call for testing in any video upload with Wordpress so I am not adding functionality for this.
Fine tuned seek event more.  It is working very well on HTML5 still need some work on Youtube for the events when a user is scrubbing.
Made sure all floats in played segments were formatted to correct precision
maintainer uses 2 spaces for indentation, make sure to follow this style.
Use template getArgsXAPI{verb} instead of getxAPI{verb}Object
xAPI verbs are past tense, so make the function names match.
html5 video object has a property called currentTime, not current_time
Added code to handle seeked event and trigger an xAPI statement
added code for sending following events
-seek
-volume change
-fullscreen
-play
-pause
-Initiated

I haven’t actually been able to get the fullscreen event to trigger
Used Youtube Video API to implement:
-Seek
-Play
-Pause
-Initiated
This is all that was possible via their API
KirkJohnson and others added 7 commits April 23, 2018 13:32
Was asked by Jon to add video length to the extensions sent by the intialized verb.
…-video into add-xapi-video-verbs

# Conflicts:
#	scripts/html5.js
#	scripts/youtube.js
Youtube was passing 0 in for video duration so I changed this to use the api’s method to get video length.
@otacke
Copy link
Contributor

otacke commented Apr 28, 2018

A quick update: There are some free days in May that I'll try to use to come up with the "final implementation".

Updating the currently playing segment start time when the video starts playing is required in certain scenarios. For example, If a user revisits a page with a youtube video that they had previously partially watched, the video will resume from where they left off. If we don’t set `playingSegmentStart` on the play event, the first playing segment recorded will start at 0 (the beginning of the video) rather than the timecode the video resumed from.
@figureone
Copy link

Aloha @otacke, just checking in. Today I fixed some regressions caused by a botched merge last month (94ff7b3), everything looks good now.

I also reverted your commit 6dd68ac in 26b8f94 because I found an edge case where a newly initialized video resumed from where the user had previously left off, requiring that playingSegmentStart be set in the play event (otherwise a segment from 0 to the resumed timecode would be inserted).

@jmkevan has reviewed and tested video statements sent to an LRS and hasn't found any issues.

Let us know if you have any questions or comments! Cheers, -p

@otacke
Copy link
Contributor

otacke commented May 28, 2018

@figureone @jmkevan Thanks for the update, fixing the bug, and testing everything! I'm really sorry for not having worked on this issue, but I simply couldn't find the time so far.

@jmkevan
Copy link

jmkevan commented Jun 6, 2018

@otacke - Checking in on this. I hate to be pushy, but we have several projects that are running out of time to use this functionality. We are really hoping you can get this finalized in the next several weeks!

We appreciate all your time and effort!

  • Jon

@H5P-Helper
Copy link

H5P-Helper commented Jun 11, 2018 via email

@jmkevan
Copy link

jmkevan commented Oct 5, 2018

Aloha @otacke - Just thought I would check-in and see if there are any updates

@otacke
Copy link
Contributor

otacke commented Oct 5, 2018

@jmkevan Actually: Yes! As you can see in our issue tracker, the ticket has been updated shortly and now lists Baduhenna as the "Fix Version". That means we want to invest some of our time to finish this task for the Baduhenna Release (that's just an internal name).

@jmkevan
Copy link

jmkevan commented Oct 5, 2018

That's fantastic. Thank Oliver!

@mrik974
Copy link

mrik974 commented May 17, 2019

Hi there! any updates regarding this pull request ?

dima7a14 added a commit to dima7a14/h5p-video that referenced this pull request Jul 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

10 participants