Problem/Motivation

Subtitles cannot currently be enabled by default per video.

Steps to reproduce

Create a Rijksvideo with captions; subtitles remain disabled until the user enables them.

Proposed resolution

Add a checkbox to enable subtitles by default and activate the default caption track.

Remaining tasks

Review and test the implementation.

User interface changes

Adds a “Show subtitles by default” checkbox to the Rijksvideo form.

API changes

None.

Data model changes

Adds the boolean media field field_rijksvideo_show_subtitles.

Issue fork rijksvideo-3623290

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

daaan created an issue. See original summary.

emielb’s picture

Thanks for this input, we appreciate it.

That said, we'd prefer to handle this in the settings rather than per video. There is already a settings form, and it makes sense to have an option there to enable subtitles by default everywhere, rather than toggling it on each individual video.

Would you be open to moving the "Show subtitles by default" option into the existing settings form instead of adding a per-video field?

daaan’s picture

Thanks for the feedback, that makes sense as a common use case.

I’d prefer to keep this as a field rather than (only) a global settings option, because we specifically need per-video control as well.

Suggested approach that covers both scenarios without cluttering the form for everyone:

  • Keep field_rijksvideo_show_subtitles with default value 0 (already the case).
  • Hide the field by default on the form display, instead of showing it on every video edit form.

That way:

  • By default, subtitles stay off for all videos, and editors don’t see an extra checkbox.
  • Want subtitles on for all new videos? Change the field’s default value to 1.
  • Want per-video control? Enable the field in the form display.

A settings-only toggle would work for the “everywhere” case, but it would remove the ability to enable/disable this per video which is a requirement for our project.

Would you be open to that compromise? Happy to update the MR accordingly (hide the field on the default form display + document the two configuration options).

  • emielb committed 896aaeb6 on 2.x authored by daaan
    Issue #3623290: Allow subtitles to be enabled by default
    
emielb’s picture

Version: 2.0.0-alpha6 » 2.0.0-alpha7
Status: Active » Fixed

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.