Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Issue to upload patch into
Comment | File | Size | Author |
---|---|---|---|
#7 | closed_captions_support-1318342-7.patch | 6.92 KB | rob_johnston |
#4 | jw_player_captions.tar_.gz | 820 bytes | remy40 |
#1 | closed_captions_and_audio_desc_support-1318342-1.patch | 7.17 KB | realityloop |
Comments
Comment #1
realityloopPatch attached, This also enabled link fields as well as file for source of files
Comment #2
rickvug CreditAttribution: rickvug commented@realityloop Thank you very much for the patch! I would like to support closed caption and audio descriptions. However I am worried about doing too much in main preprocessor. The main problem to solve is how to support plugins generally. Solving that problem (#1338964: Support JW Player plugins) will open up the door for these features, either within this project or in its own project. Your feedback on the plugin problem is valued.
Comment #3
rickvug CreditAttribution: rickvug commented@realityloop I've just committed a plugin API that you can use. It would be great to see if this use case is properly catered for. I'm definitely up for improving the API as needed. All of your code can be moved to a separate module(s) (example: jw_player_closed_captions).
Separate from this, I'd also be up for allowing for JW Player for format link fields (as a separate patch).
Comment #4
remy40 CreditAttribution: remy40 commentedHello,
I'm a drupal beginner but I try to learn ;-)
I'm working on a website where I need a media player with subtitles support. So, I'm really interesting by a JW player captions module for drupal.
I have done a simple JW player caption module according to new plugin APIs. I join it with this message. You can use it to publish a JW player caption module if you want, but this version is too simple to be useful because subtitles files are set in the plugin option for all of videos using the preset.
I want to allow to set a list of subtitle files in a field in a content (as it's done for the video file). I have an idea but I don't know if it's the best way to do that. I want to add a new field formatter "JW Player Caption" to use for every subtitle files.
Then, when plugin options are passed to the JW player in the JW player module, I propose a plugin callback function to update plugin options with dynamic data like subtitle files.
I don't know if it's clear (my english is not so good) ... What do you think about that ?
Comment #5
mgifford@remy40 how does your module differ from the patch provided by @realityloop in #1. In general patches are easier to review.
Also @rickvug is a maintainer and suggested moving this to a separate module & using the API that's been added. Did you use the API?
It would be great if we could add this as a sub-module.
Comment #6
julianmancera CreditAttribution: julianmancera commentedHi remy40,
Can you please explain how this plugin should be configured after the module is installed?
Thank you
Julian Mancera
Comment #7
rob_johnston CreditAttribution: rob_johnston commentedHere's what works for me (see attached) using the new plugin API. There are a bit of rough edges and hopefully somebody else can improve on this.
The set-up assumes a video content type with a file field named "field_video" and within this file type is another file field named "field_caption". The get_captions_uri function uses the names of these fields (as defined in the "JW Player presets" at /admin/config/media/jw_player) to determine the link to the closed captions file. I'm sure there must be a better way.
Comment #8
ron_s CreditAttribution: ron_s commentedWe have created a 7.x-2.x patch to add closed captioning functionality for both multilingual captions and transcripts. This builds off the work that has been done for the Refactor theming patch (https://www.drupal.org/node/2713725).
We are going to close this issue and combine into Issue #2389283 as a single thread for discussion and review. Thanks.