Skip to content
This repository has been archived by the owner on Nov 3, 2021. It is now read-only.

Bug 955901 - Video Player doesn't shows subtitles #19183

Closed
wants to merge 1 commit into from

Conversation

fbukevin
Copy link
Contributor

The files I modified in this commit:
gaia/apps/video/manifest.webapp
gaia/apps/video/js/metadata.js
gaia/apps/video/js/db.js
gaia/apps/video/js/video.js

I created gaia/apps/video/js/subtitle.js to implement subtitle display feature.

var url = URL.createObjectURL(blob);
dom.player.innerHTML = '<track kind="subtitles" src=' + url + '>';
}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be cleaner if this block was within the 'if ('metadata' in currentVideo)' block above. Actually, it would be even cleaner for SubtitleHandler to expose a function to enable subtitles for the video. All functionality related to subtitles would ideally be owned by SubtitleHandler. It could expose a function that is passed the currentVideo object and the player object and all the logic that is here could be moved to the new function. One other thing, the new function would need to test if the currentVideo has metadata, or you could call the new function from within the 'if ('metadata' in currentVideo)' block (not all videos will have metadata).
Two of the video_test.js unit tests are failing because there are two tests where the currentVideo does not have metadata:

  • "showPlayer: selected video has no metadata, no title"
  • "showPlayer: selected video has no metadata, has title"

@mozilla-autolander-deprecated
Copy link
Contributor

This pull request has been closed due to tree stability issues. Please rebase and re-open the pull request if you still need to land this. Ensure the gaia-try run is green before landing. Sorry for any inconvenience.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
3 participants