pull/43/merge
Kirk Johnson 2018-02-21 21:15:50 +00:00 committed by GitHub
commit 8f9b4e16e5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 20 additions and 0 deletions

View File

@ -77,6 +77,14 @@ H5P.XAPIEvent.prototype.setVerb = function (verb) {
}
};
}
else if (H5P.jQuery.inArray(verb, H5P.XAPIEvent.allowedXAPIVideoVerbs) !== -1) {
this.data.statement.verb = {
'id': 'https://w3id.org/xapi/video/verbs/' + verb,
'display': {
'en-US': verb
}
};
}
else if (verb.id !== undefined) {
this.data.statement.verb = verb;
}
@ -315,3 +323,15 @@ H5P.XAPIEvent.allowedXAPIVerbs = [
'accessed-embed',
'accessed-copyright'
];
/**
* List of video verbs defined at {@link https://w3id.org/xapi/video/|xAPI Video Profile}
*
* @type Array
*/
H5P.XAPIEvent.allowedXAPIVideoVerbs = [
'played',
'paused',
'seeked',
'finished',
];