Problem/Motivation

Caption preferences (set via Preferences > Captions) won't take effect without refreshing the page.

Steps to reproduce

Create an Able Player instance, go to Preferences > Captions, make changes to captions styling, save.

Proposed resolution

There is a type error in ableplayer.min.js in getting the caption preferences:
AblePlayerInstances[u].geteferences is not a function

It works if this is changed to
AblePlayerInstances[u].getPreferencesGroups

CommentFileSizeAuthor
#8 26.patch450.72 KBthemusician

Issue fork ableplayer-3384949

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

odlein created an issue. See original summary.

Shreya_th made their first commit to this issue’s fork.

themusician’s picture

Thank you for the report and patch.
I believe this is related to the Able Player project JS itself, https://github.com/ableplayer/ableplayer/issues/581. I wonder if their proposed fix would also resolve it here until the core project releases a new update?

themusician’s picture

I tried to reproduce the issue and have not succeeded. Is this for a remote video or local video? Can you share thee exact settings you tried to save that did not take effect until refreshing the page?

Thanks

odlein’s picture

The issue is present in 3.0.0-beta1 and 3.x-dev, and does seem to be the same typo mentioned in the core issue you linked: https://github.com/ableplayer/ableplayer/issues/581#issuecomment-1648586370
I was using a remote video (YouTube), and haven't tried with a local video. It is affecting all caption preferences (background, text color, etc).

themusician’s picture

Thank you odelin. I'll try to get your patch in place tomorrow and update dev. Long-term I worry about patching the JS directly as when Able Player itself updates, we'll need to verify the patch is no longer needed or still needed and reroll.

I wonder if I can add the patch via composer with the module?

Thank you again for reporting this and supplying a fix.

Max

themusician’s picture

StatusFileSize
new450.72 KB

Adding the code commit MR as a patch file to play nice with a composer workflow. This will allow the module to maintain synchronicity with the Able Player parent project while allowing for patching of the parent project JS in between releases.

themusician’s picture

The composer route did not pan out. Merging.

themusician’s picture

Status: Active » Needs review
shubham_jain’s picture

Status: Needs review » Reviewed & tested by the community

Hi everyone, I reviewed it and it is working fine. Moving to RTBC.

themusician’s picture

Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.