openedx / event-routing-backends

Consume edx tracking events and transform/transmit them to other LRSs.
GNU Affero General Public License v3.0
9 stars 18 forks source link

xAPI video statements do not emit required played-segments extension #234

Open e0d opened 2 years ago

e0d commented 2 years ago

Definition:

Played segments data shows parts of the video the actor watched during current registration in chronological order.

Requirements

The LRP MUST assign played-segments value to statements with "paused", "terminated" and "completed" verbs.The LRP MAY assign played-segments value to other statements.Value is a string. Each part of the video watched is separated with [,]. The 'Time From' and 'Time To' values are separated with [.].The time values must match the values recorded as time, time-to and time-from in played, paused, seeked statements.

Played segments data shows parts of the video the actor watched during current registration in chronological order. LRP Obligations
The LRP MUST assign played-segments value to statements with "paused", "terminated" and "completed" verbs. The LRP MAY assign played-segments value to other statements. Value is a string. Each part of the video watched is separated with [,]. The 'Time From' and 'Time To' values are separated with [.]. The time values must match the values recorded as time, time-to and time-from in played, paused, seeked statements.

The emitted statement should include

  "result": {
        "extensions": {
            "https://w3id.org/xapi/video/extensions/played-segments": "0[.]2.997",
            "https://w3id.org/xapi/video/extensions/progress": 0.06,
            "https://w3id.org/xapi/video/extensions/time": 2.997
        }
    }

Relevant code.

ziafazal commented 1 year ago

@e0d It appears played-segments are not emitted by video player. I think we first need to figure out how we can emit played-segments in original event and then add it in xAPI/caliper events.