Project Leads (Product): Brad Brown Jenna Makowski Jeremy Ristau Sarina Canelake

Date Proposed: 14-02-2023

Last Updated: 19-04-2023

Status: Community Review

Improving the Video Editor

Many edX partners feel that the Video Editor experience is lacking and needs improvement. We have outlined a three step process to improve the video editor. These steps are:

Additionally, Phase 2 of the Modular Content Initiative is reliant on the completion of BD-14 work. The video upload enhancement is the final piece of BD-14 (along with the currently ongoing visual problem editor work). Therefore, a new React based video player enables the video uploads enhancement, and the completion of BD-14 enables Phase 2 of modular content. 

Problems

Current Video Player

Platform Map

 The “Platform Map” is a list of all features throughout the platform that 2U maintains. Periodically, 2U surveys their partners to get feedback on how the platform is working, and maps that feedback to Platform Map areas.

Product Requirements

Basic Requirements

Parity with Current Video Player

MFE Compatibility

Enhancements from Current Player Capabilities

Data Compatibility

We have a lot of analytic events that get triggered from the current video player. We MUST keep these requirements as-is, or supply an ADR regarding what would change.

https://github.com/openedx/event-routing-backends/blob/master/docs/event-mapping/Supported_events.rst#video-events

https://github.com/openedx/event-routing-backends/pull/245/files#diff-2974fab80c577a99efe25c1ee2aa50dfbb5496ff46468707dc40e1506652093c

Nice to Haves

Technical Discovery

Background

The current video player cannot be rendered directly inside of an MFE. A new video player is required to include a video preview on the Video Settings page. The current build of the video player has the video player with a custom control bar. The control bar is generated based on the values stored in the Video XBlock. All the features in the custom control bar are part of the regular HTML5 video component except transcripts. It is important to note that transcripts and captions are two different functions. The captions are played in the video view while the transcripts are played next to the video. These two functions do rely on the same file to generate content.

Note: Transcripts are saved as .srt files but in the backend are converted to .sjson

Initial Technical Discovery (edX)

Initial edX Technical Discovery (React video player)

Technical Requirements

Proposed Options

Option 1: https://www.npmjs.com/package/React-player

Option 2: https://www.npmjs.com/package/video-React (based on https://www.npmjs.com/package/video.js )

Option 3: https://www.npmjs.com/package/video.js   (This comes highly recommended by edX’s accessibility specialist. Additionally, it is being used successfully by Prospectus, edX’s package for displaying the course catalog on edx.org )

Option 4: https://www.npmjs.com/package/plyr

Opinions and Further Questions

Frontend Input 

Multiple Components

Is there a reason that we shouldn’t migrate to using .vtt files? 

Compatibility

Recommendation

We recommend video.js be used for this project.

edX engineering has concluded that the four options have many commonalities. edX advocates for option number three, video.js, in that this option is best suited to handle edX’s accessibility requirements (WCAG 2.1). However, we do not feel that those requirements trump all other requirements, or that the customizability of other players could not get us to full WCAG coverage. This means that while edX currently favors option 3, we are interested in hearing other opinions as to which option best suits the needs of the Open edX community. 

Axim’s recommendation is also for option three, video.js.  It is not only the more mature project, but also the more consistently maintained one.  In addition, the fact it is not written in React makes it the more flexible option: it will be possible to write an in-house React component based on video.js, but tailored specifically to the (many) project specifications without second-guessing the underlying project's React assumptions.  There is also ample documentation on how to achieve this.  Finally, video.js' plugin architecture makes it possible to implement virtually any needed feature that is not already exposed by video.js itself or one of the plethora of existing plugins.  As an added bonus, DefinitelyTyped supports video.js as of a few months ago.

Appendix

Video Uploads

The project to improve video uploads is contingent on a React-based player. Video uploads is a separate workstream that can and will be prioritized after the new video player is built. With the newly enhanced video settings, video uploads are easier and faster to implement, and are also done on a new tech stack so we do not incur more tech debt. 

User Problem: The process of uploading videos needs to be improved as can be seen from three comments from edX user interviews in regard to the video block

  1. upload videos via one tab

  2. copy a code

  3. go back

  4. edit that component

  5. paste that bit

  6. delete the YouTube link

  7. Put in a name

  8. And then save it” 

Video Preview Mockup