kolibri icon indicating copy to clipboard operation
kolibri copied to clipboard

Play Khan Academy `video` widgets offline from the exercise's files

Open rtibbles opened this issue 2 weeks ago • 2 comments

Overview

A Perseus video widget with a Khan Academy slug embeds the video from khanacademy.org, so it fails offline, and #15651 renders it as the "no longer available" standin. Kolibri should play these videos offline from the exercise's files.

Complexity: Medium Target branch: develop

The Change

  • A video widget whose location starts with ${☣ LOCALPATH}/ should play that file inline, through the embedded ContentViewer that SafeHTML uses for <video> (SafeHTML/index.js#L254).
  • The renderer should look the file up in the .perseus archive first, then among the exercise's files.

Out of Scope

  • Importing the referenced video into the exercise's files. learningequality/kolibri-library#33 covers that.

Acceptance Criteria

General

  • [ ] A video widget whose location is ${☣ LOCALPATH}/<checksum>.<ext> plays inline from the .perseus archive when the file is there.
  • [ ] When the archive doesn't contain the file, the widget plays it from the exercise's files.
  • [ ] Playing the video makes no request to khanacademy.org.
  • [ ] video widgets play in questions, hints and group widgets.
  • [ ] A video widget with a KA slug and no matching file shows the standin.

Accessibility

  • [ ] The embedded player can be operated by keyboard, as it can in SafeHTML.

Testing

  • [ ] Tests cover a file in the archive, a file on the exercise, a missing file, and a widget inside a hint and inside a group.

References

AI usage

I decided the video ships as a separate file on the exercise, not inside the .perseus archive, and that the renderer checks the archive first, then the exercise's files. Claude Code drafted the sections with me.

rtibbles avatar Nov 18 '26 19:11 rtibbles

@rtibbles

I would love to work on this issue can you assign this for me

/assign

ArpitaSamanta10 avatar Nov 19 '26 11:11 ArpitaSamanta10

Hi! 👋

Thanks so much for your interest! This issue is not open for contribution. Visit Contributing guidelines to learn about the contributing process and how to find suitable issues. If there are no unassigned 'help wanted' issues available, please wait until new ones are added.

We really appreciate your willingness to help. 😊

Are you preparing for Google Summer of Code? See our GSoC guidelines.

learning-equality-bot avatar Nov 19 '26 11:11 learning-equality-bot