Commit 60dfd06
Display VTT transcripts in audio/video players (#7418)
* Add transcript_ids property to file set model(s)
* Add transcript_ids to file set form
* Copy changes from @kirkkwang's draft PR, WIP: Implement Transcription Support in Hyrax #7380
https://github.com/samvera/hyrax/pull/7380/changes
* Support transcriptions for ActiveFedora works
* Fix broken specs
* Normalize VTT file set language values to 2-letter language codes.
* Simplify iiif_manifest_presenter_spec#annotates_content
* Add comments and rubocop fixes
* Add language field to file set form and move transcript ids form hint into simple form
* Add VTT transcripts to default audio/video partials
* Fix "l is not a function" error when displaying VTT transcripts in Annotations tab of Clover IIIF viewer.
"l" is supposed to refer to the <ItemStyled> object in Annotation (https://github.com/samvera-labs/clover-iiif/blob/main/src/components/Viewer/InformationPanel/Annotation/Item.styled.tsx). In the minified version of this file, this should actually be uppercase L, not lowercase l.
`l("span",{style:{backgroundImage` was changed to `L("span",{style:{backgroundImage`
`return l(n9,{dir:P,"data-format"` was changed to `return L(n9,{dir:P,"data-format"`
There appears to be an unnecessary call to `l()` in the following switch/case statement:
```
case "text/vtt":
return l(HQ, {
inlineCues: k,
label: A,
vttUri: ((D = y[0]) == null ? void 0 : D.id) || void 0
});
```
In fact, `return l(HQ,{inlineCues:k` can be changed to `return HQ({inlineCues:k` since HQ is a function in the minified file.
* Fix "l is not a function" error for other file types. The implementation for other file types seems unfinished and doesn't work.
* Use the file set presenter to render the file set edit form instead of the solr document. Do not make language a required field for a file set.
* Allow transcriptions_controller to serve file types other than VTT. Fix some formatting and specs.
* Fix syntax error in clover.js
* Increase the height of Clover IIIF viewer so that thumbnails for works with multiple files are visible.
* Rename "transcriptions" to "transcripts" for consistency
* Account for ActiveTriples::Resource in a transcript's language field. Remove tests for code that was already tested/covered elsewhere.
* Remove unused fallback label, since a file set should always have a title or label
* Make language optional again in IIIF manifest annotations, especially since it's not required by the viewer.
* Delete a stray, unnecessary comment
* Rename .valid_transcripts to .available_transcripts
* Update file_set_form_helper_spec.rb
* Fixes for Koppie: use file_ids_ssim.first instead of original_file_id
* Fix and refactor file_set_form_helper_spec to use top-level context blocks (instead of describe)
* Rubocop fixes and add comment
* Refactor file set form
* Use cached parent for FileSetFormHelper instead of running an extra query. Rename form_transcript_ids_select_for to transcript_ids_select_options
* Add vtt file metadata to file_set_form_helper_spec
* When searching for available transcripts. use an fq filter to capture both FileSets and Hyrax::FileSets.
* Fix whitespace and add some clarifying comments.
* Authorize transcript before streaming the file
* Remove test for ActiveTriples::Resource in presenters/hyrax/displays_transcripts.
It was created for a hypothetical edge case in which someone might configure a controlled vocabulary field (e.g. Hyrax::ControlledVocabularies::Language) in an AF-based app. Removed since it doesn't refer to any existing use case in Hyrax.
* Make `transcript_ids` property conditional on Hyrax.config.file_set_include_metadata. Add `transcript_ids` to default flexible metadata profiles.
* Update metadata profiles to fix allinson and koppie builds
* Move the transcripts_ids form field to views/records/edit_fields so it can be optional for apps with flexible metadata.
* Move transcript_ids into the file set metadata schema
* Update clover.js to v.3.6.0, which officially fixes samvera-labs/clover-iiif#305
---------
Co-authored-by: Rob Kaufman <rob@notch8.com>1 parent 8a6d964 commit 60dfd06
51 files changed
Lines changed: 1166 additions & 193 deletions
File tree
- .dassie/config/metadata_profiles
- .koppie/config/metadata_profiles
- app
- assets/stylesheets/hyrax
- controllers
- concerns/hyrax
- hyrax
- forms
- concerns/hyrax
- hyrax/forms
- helpers/hyrax
- indexers/hyrax
- indexers
- models/concerns/hyrax
- file_set
- presenters/hyrax
- services/hyrax
- views
- hyrax/file_sets
- media_display
- records/edit_fields
- config
- locales
- metadata_profiles
- metadata
- lib/generators/hyrax/iiif_viewer/templates
- clover
- spec
- controllers/hyrax
- fixtures
- files
- forms/hyrax/forms
- helpers/hyrax
- indexers/hyrax
- indexers
- models
- hyrax
- presenters/hyrax
- services/hyrax
- views/hyrax/file_sets
- media_display
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
942 | 942 | | |
943 | 943 | | |
944 | 944 | | |
| 945 | + | |
| 946 | + | |
| 947 | + | |
| 948 | + | |
| 949 | + | |
| 950 | + | |
| 951 | + | |
| 952 | + | |
| 953 | + | |
| 954 | + | |
| 955 | + | |
| 956 | + | |
| 957 | + | |
| 958 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
914 | 914 | | |
915 | 915 | | |
916 | 916 | | |
| 917 | + | |
| 918 | + | |
| 919 | + | |
| 920 | + | |
| 921 | + | |
| 922 | + | |
| 923 | + | |
| 924 | + | |
| 925 | + | |
| 926 | + | |
| 927 | + | |
| 928 | + | |
| 929 | + | |
| 930 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| 14 | + | |
14 | 15 | | |
15 | 16 | | |
16 | 17 | | |
17 | 18 | | |
18 | 19 | | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
19 | 27 | | |
Lines changed: 7 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
139 | 139 | | |
140 | 140 | | |
141 | 141 | | |
142 | | - | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
143 | 145 | | |
144 | | - | |
| 146 | + | |
145 | 147 | | |
146 | | - | |
147 | | - | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
148 | 151 | | |
149 | 152 | | |
150 | 153 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
15 | | - | |
| 15 | + | |
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
| 17 | + | |
17 | 18 | | |
18 | 19 | | |
19 | 20 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
| 24 | + | |
24 | 25 | | |
25 | 26 | | |
26 | 27 | | |
| |||
0 commit comments