Enable transcripts(sub-title) in video player

Introduction

This wiki explains the design and implementation of enabling the transcripts in the video player.

https://project-sunbird.atlassian.net/browse/SB-26905

Key Design Problems:

  1. How the player should enable/render the transcripts files for the selection.

  2. How to handle the transcripts-related changes in configurations.

  3. How to handle the default selection of transcripts.

Design:

Solution:

Language name

Language code

Language name

Language code

Kannada

kn

English

en

Hindi

hi

Tamil

ta

Telugu

te

Punjabi

pa

Odiya

or

Marathi

mr

Bengali

bn

Urdu

ur

Malayalam

ml

Assamese

as

Gujarati

gu

Player events:

  • Player events can be used in parent application by using these events parent application can determine the which transcript has been selected and at what video time stamp its been selected.

  • Using player events parents application can show/hide the transcripts details .

  • Player events can used for telemetry events in parent application for various use cases.

  • When the user selects transcripts the following player event will be triggered.

  • When user unselect transcripts the following player event will be triggered.

Telemetry events:

The telemetry events can be used for determining the various cases scenarios of the users like how often user selecting transcripts and unselecting and at what video time stamp. also covers the which languages are being used more.

  • When the user selects transcripts the CP-VIDEO15 telemetry event will be triggered.

  • When the user unselect transcripts the CP-VIDEO16 telemetry event will be triggered.

  • When required fields missing in metadata.transcripts the CP-VIDEO17 telemetry event will be triggered.