Support from Acquia helps fund testing for Drupal Acquia logo

Comments

realityloop’s picture

Status: Active » Needs review
FileSize
7.17 KB

Patch attached, This also enabled link fields as well as file for source of files

rickvug’s picture

@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.

rickvug’s picture

Status: Needs review » Needs work

@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).

remy40’s picture

FileSize
820 bytes

Hello,

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 ?

mgifford’s picture

@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.

julianmancera’s picture

Hi remy40,

Can you please explain how this plugin should be configured after the module is installed?

Thank you

Julian Mancera

rob_johnston’s picture

Here'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.

ron_s’s picture

Issue summary: View changes
Status: Needs work » Closed (duplicate)
Related issues: +#2389283: Add closed captioning options (language and transcript), +#2713725: Refactor theming

We 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.