Captions with Shaka Player

See original GitHub issue

using shaka player I couldn’t add a track to player nor manually neither programmatically.

Manually

placing <track src="src" kind="subtitles" > inside <video>

Programatically

using shaka player addTextTrack(uri, language, kind, mime, opt_codecopt, opt_labelopt) method

In both ways, the vtt file is fetched from the server but it doesn’t show anything. using first method cause a cc icon appear next to the volume control but it doesn’t do anything.

Issue Analytics

  • State:open
  • Created 6 years ago
  • Comments:5

github_iconTop GitHub Comments

2reactions
samanmohamadicommented, Jun 4, 2018

I managed this issue by overriding textDisplayFactory of shaka-player:

shakaPlayer.configure({
   textDisplayFactory: () => {
      return {
         setTextVisibility: () => {},
         isTextVisible: () => true,
         destroy: () => { }
      }
   }
 });
0reactions
fridaycommented, Jun 4, 2018

Thanks! I’ll leave this open until there’s a full example of how to use Plyr with Shaka Player and captions, or if I write one myself. I prefer not to have to dig into the Shaka Player api again.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Closed Captions default (ON, English) utilizing shaka.player.ui ...
I believe you should be using player.setTextTrackVisibility(true); instead. That will work in all cases. Since you are using the UI, the ...
Read more >
Tutorial: Plugins and Customizing the Build - JSDoc
The plugin interfaces are here to allow you extend or customize Shaka Player in one of these areas: manifest parsing, subtitle and caption...
Read more >
Use Shaka player to display WebVTT captions or subtitles
Show activity on this post. I am using Shaka player to play HLS/DASH videos which works well. I also have captions/subtitles as WebVTT...
Read more >
How to get the webvtt file url? - Google Groups
In our player we want to allow the user to customise the captions (font size color etc.), ... Shaka only parses the cues...
Read more >
moovie.js - Shaka-Player integration example - CodePen
<track kind="captions" label="Portuguese" srclang="pt" ... Shaka-Player integration example. Your browser does not support the video tag.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found