-
Notifications
You must be signed in to change notification settings - Fork 7.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Subtitles not working after uglifying the code by Angular CLI #5131
Subtitles not working after uglifying the code by Angular CLI #5131
Comments
Looking at the cli, not really sure what's wrong. Would you be able to make a simple page with Video.js and upload it somewhere? |
If we get a reduced test case, we'll be able to take a look. |
@gkatsev We have the same bug. It's because of video.js/src/js/tracks/text-track.js Line 181 in 4d3331e
|
@Chocobozzz interesting, do you know which rule removes that? |
@gkatsev Yes, it's the Unfortunately we cannot change this rule in angular-cli... An easy fix would be to change the line to |
@Chocobozzz seems like that should work, would you be interested in making a PR for that? |
Angular CLI, and potentially other projects, may use the "pure_getters" compression option of uglify which will end up removing the getter line we use for side-effects to update the active cues. This update makes sure that the line doesn't get removed. Fixes #5131
Thanks @Chocobozzz! I plan on doing a release of Video.js today, so, it should go out then. |
Angular CLI, and potentially other projects, may use the "pure_getters" compression option of uglify which will end up removing the getter line we use for side-effects to update the active cues. This update makes sure that the line doesn't get removed. Fixes #5131
Yeah! Thanks @gkatsev, it's really a pleasure to have a module with a great support, that releases a fixed version just a few hours later. 😘 |
Applying this fix |
We are using the video.js Player in combination with an angular-cli project. By the
addRemoteTextTrack
method of the player, I add subtitles to the video.This works great when I´m in the development mode of the project. But when I uglify the code by angular-cli by the command
ng build --prod
, the subtitles will not update anymore. What I mean is, that it stays on the subtitle text when you have activated the subtitles but the text does not get updated.Most of the time I use Chrome for development but this happens in every browser.
Versions
@angular/cli
": "1.7.4"@angular/core
": "5.2.10"The text was updated successfully, but these errors were encountered: