Problem/Motivation

Once #2924631: Media sources for local video and audio support lands, Media will support local audio and video, but core will have no default configuration for either of those media sources.

Proposed resolution

Provide configuration for both media types, as optional config with Standard.

Before

After

Remaining tasks

Create the config, roll a patch (no need for tests!) and commit.

User interface changes

None.

API changes

None.

Data model changes

None.

Comments

phenaproxima created an issue. See original summary.

xjm’s picture

Title: [PP-1] Ship local audio and video media types in Standard » Ship local audio and video media types in Standard
Status: Postponed » Active

The blocker is committed now, so unpostponing!

starshaped’s picture

Status: Active » Needs review
StatusFileSize
new10.42 KB
new151.23 KB
new151.42 KB
new88.24 KB
new119.78 KB
new63.59 KB
new69.54 KB

Created patch and tested it by applying the patch to a fresh Drupal install. Screenshots before and after the patch was applied are attached.

phenaproxima’s picture

Status: Needs review » Reviewed & tested by the community

RTBC from me. Ideally we would get a +1 from another maintainer, but this looks great. Thanks, @starshaped!

phenaproxima’s picture

Issue summary: View changes

Adding screenshots to the IS.

xjm’s picture

+++ b/core/profiles/standard/config/optional/media.type.audio.yml
@@ -0,0 +1,12 @@
+description: 'A locally-hosted audio file.'

+++ b/core/profiles/standard/config/optional/media.type.video.yml
@@ -0,0 +1,12 @@
+description: 'A locally-hosted video file.'

Minor nitpick: "locally hosted" does not need to be hyphenated. :)

starshaped’s picture

StatusFileSize
new10.42 KB
new978 bytes

Removed those pesky hyphens :)

xjm’s picture

Status: Reviewed & tested by the community » Needs work

I double-checked the config exports by diffing an export following installation against the shipped defaults:

diff --git b/core.entity_form_display.media.audio.default.yml a/core.entity_form_display.media.audio.default.yml
index 8eebf67..639ad07 100644
--- b/core.entity_form_display.media.audio.default.yml
+++ a/core.entity_form_display.media.audio.default.yml
@@ -1,3 +1,4 @@
+uuid: 4c551dc0-e7db-44f6-876d-7e0c758ea5fa
 langcode: en
 status: true
 dependencies:
@@ -7,6 +8,8 @@ dependencies:
   module:
     - file
     - path
+_core:
+  default_config_hash: B5ovuePUhsfTx-wokQ5mBnPWdnWT8bN9VTf4Vt6O0fE
 id: media.audio.default
 targetEntityType: media
 bundle: audio
diff --git b/core.entity_form_display.media.file.default.yml a/core.entity_form_display.media.file.default.yml
index 50d57bc..e61de58 100644
--- b/core.entity_form_display.media.file.default.yml
+++ a/core.entity_form_display.media.file.default.yml
@@ -1,3 +1,4 @@
+uuid: 1ef26f0a-3b3a-44fd-9f18-eaa68e748c16
 langcode: en
 status: true
 dependencies:
@@ -6,6 +7,9 @@ dependencies:
     - media.type.file
   module:
     - file
+    - path
+_core:
+  default_config_hash: hXrcSi0w6aTt3jtOSoec3ah6KyHcQM__VFL8eWmmkfw
 id: media.file.default
 targetEntityType: media
 bundle: file
@@ -32,6 +36,12 @@ content:
       size: 60
       placeholder: ''
     third_party_settings: {  }
+  path:
+    type: path
+    weight: 30
+    region: content
+    settings: {  }
+    third_party_settings: {  }
   status:
     type: boolean_checkbox
     settings:
diff --git b/core.entity_form_display.media.image.default.yml a/core.entity_form_display.media.image.default.yml
index 6f2323b..d85735e 100644
--- b/core.entity_form_display.media.image.default.yml
+++ a/core.entity_form_display.media.image.default.yml
@@ -1,3 +1,4 @@
+uuid: a236925b-3061-43d0-80d2-f851afbac9b6
 langcode: en
 status: true
 dependencies:
@@ -7,6 +8,9 @@ dependencies:
     - media.type.image
   module:
     - image
+    - path
+_core:
+  default_config_hash: 6Yw_Qc7BjR5JTvdpHMYqAjhoE_I2Q8fRVYCZPjfsERs
 id: media.image.default
 targetEntityType: media
 bundle: image
@@ -34,6 +38,12 @@ content:
       size: 60
       placeholder: ''
     third_party_settings: {  }
+  path:
+    type: path
+    weight: 30
+    region: content
+    settings: {  }
+    third_party_settings: {  }
   status:
     type: boolean_checkbox
     settings:
diff --git b/core.entity_form_display.media.video.default.yml a/core.entity_form_display.media.video.default.yml
index d8c9481..165802e 100644
--- b/core.entity_form_display.media.video.default.yml
+++ a/core.entity_form_display.media.video.default.yml
@@ -1,3 +1,4 @@
+uuid: 07a9eca6-dddb-4f83-a922-5a8c028c8372
 langcode: en
 status: true
 dependencies:
@@ -7,6 +8,8 @@ dependencies:
   module:
     - file
     - path
+_core:
+  default_config_hash: tISu0AHPfTIoCW10_m4TGvFQ6lqj47Ukdh2KeKyWkGw
 id: media.video.default
 targetEntityType: media
 bundle: video
diff --git b/core.entity_view_display.media.audio.default.yml a/core.entity_view_display.media.audio.default.yml
index 9d97f26..6bfd008 100644
--- b/core.entity_view_display.media.audio.default.yml
+++ a/core.entity_view_display.media.audio.default.yml
@@ -1,3 +1,4 @@
+uuid: c6f5dd02-203a-439f-a461-2ec5e4187c6d
 langcode: en
 status: true
 dependencies:
@@ -9,6 +10,8 @@ dependencies:
     - file
     - image
     - user
+_core:
+  default_config_hash: YjplsT0zWv3Vw5lCDGVE8pikoY4Kc-fg2hr7Xewo0Ac
 id: media.audio.default
 targetEntityType: media
 bundle: audio
diff --git b/core.entity_view_display.media.file.default.yml a/core.entity_view_display.media.file.default.yml
index 72b0bdc..c28301b 100644
--- b/core.entity_view_display.media.file.default.yml
+++ a/core.entity_view_display.media.file.default.yml
@@ -1,3 +1,4 @@
+uuid: 6fded9f5-1f69-461d-a491-6a1c42fabb7a
 langcode: en
 status: true
 dependencies:
@@ -6,6 +7,8 @@ dependencies:
     - media.type.file
   module:
     - file
+_core:
+  default_config_hash: 9s0lWIanCnW5Xrrkmedxohs9F0yk4LO8ZcmVQ9xyuu4
 id: media.file.default
 targetEntityType: media
 bundle: file
@@ -20,6 +23,6 @@ content:
     region: content
 hidden:
   created: true
+  name: true
   thumbnail: true
   uid: true
-  name: true
diff --git b/core.entity_view_display.media.image.default.yml a/core.entity_view_display.media.image.default.yml
index 728150f..a0d7eae 100644
--- b/core.entity_view_display.media.image.default.yml
+++ a/core.entity_view_display.media.image.default.yml
@@ -1,12 +1,14 @@
+uuid: 3f212457-6e61-44c8-add4-79553fc62187
 langcode: en
 status: true
 dependencies:
   config:
     - field.field.media.image.field_media_image
-    - image.style.medium
     - media.type.image
   module:
     - image
+_core:
+  default_config_hash: jOwnt_yq6AKAfqU6f0xKnxEkFQ2eTPJWxrk3WMLbL68
 id: media.image.default
 targetEntityType: media
 bundle: image
@@ -23,6 +25,6 @@ content:
     region: content
 hidden:
   created: true
+  name: true
   thumbnail: true
   uid: true
-  name: true
diff --git b/core.entity_view_display.media.video.default.yml a/core.entity_view_display.media.video.default.yml
index 25b096e..e27a4b5 100644
--- b/core.entity_view_display.media.video.default.yml
+++ a/core.entity_view_display.media.video.default.yml
@@ -1,3 +1,4 @@
+uuid: 0e97d548-2ff2-4762-ad8c-0bf58aa3dc2b
 langcode: en
 status: true
 dependencies:
@@ -9,6 +10,8 @@ dependencies:
     - file
     - image
     - user
+_core:
+  default_config_hash: cs1H1Qzw3vQMLZBFR0u0k5cPfbxUYrBVvjBI9o9dCIQ
 id: media.video.default
 targetEntityType: media
 bundle: video
diff --git b/field.field.media.audio.field_media_audio_file.yml a/field.field.media.audio.field_media_audio_file.yml
index 5e013f3..3b5d1ba 100644
--- b/field.field.media.audio.field_media_audio_file.yml
+++ a/field.field.media.audio.field_media_audio_file.yml
@@ -1,3 +1,4 @@
+uuid: 633d6205-5e10-46f9-8c75-5aa58e044108
 langcode: en
 status: true
 dependencies:
@@ -6,6 +7,8 @@ dependencies:
     - media.type.audio
   module:
     - file
+_core:
+  default_config_hash: sI-7KvS4Qbg6EucALXjwYEotxgxUfH-bMC19yTpZ1kw
 id: media.audio.field_media_audio_file
 field_name: field_media_audio_file
 entity_type: media
diff --git b/field.field.media.file.field_media_file.yml a/field.field.media.file.field_media_file.yml
index 00c16ec..8d459c3 100644
--- b/field.field.media.file.field_media_file.yml
+++ a/field.field.media.file.field_media_file.yml
@@ -1,3 +1,4 @@
+uuid: 0f8fe8d2-aea8-48bd-8a71-b1d5d6f9765e
 langcode: en
 status: true
 dependencies:
@@ -9,6 +10,8 @@ dependencies:
       - media
   module:
     - file
+_core:
+  default_config_hash: _C8rbTRQABc6PuyRw2LD9zdf_muwzZVumKG6HSfzqfI
 id: media.file.field_media_file
 field_name: field_media_file
 entity_type: media
diff --git b/field.field.media.image.field_media_image.yml a/field.field.media.image.field_media_image.yml
index f6a62cc..0e498b5 100644
--- b/field.field.media.image.field_media_image.yml
+++ a/field.field.media.image.field_media_image.yml
@@ -1,3 +1,4 @@
+uuid: 41f90ed5-eed3-40a3-9c97-91b0515f5838
 langcode: en
 status: true
 dependencies:
@@ -9,6 +10,8 @@ dependencies:
       - media
   module:
     - image
+_core:
+  default_config_hash: pzPA-2JwyxlJ3qMb4L9viAnhNhbEhl2couH8A3FO020
 id: media.image.field_media_image
 field_name: field_media_image
 entity_type: media
diff --git b/field.field.media.video.field_media_video_file.yml a/field.field.media.video.field_media_video_file.yml
index 19c3b26..e5671d5 100644
--- b/field.field.media.video.field_media_video_file.yml
+++ a/field.field.media.video.field_media_video_file.yml
@@ -1,3 +1,4 @@
+uuid: 3d3480b1-5a16-4c31-afa2-ddddfdfc899b
 langcode: en
 status: true
 dependencies:
@@ -6,6 +7,8 @@ dependencies:
     - media.type.video
   module:
     - file
+_core:
+  default_config_hash: OA1qtcEH8xxQhIPvf4TykZOp1MqSTA1R4HoWxbcWZD0
 id: media.video.field_media_video_file
 field_name: field_media_video_file
 entity_type: media
diff --git b/field.storage.media.field_media_audio_file.yml a/field.storage.media.field_media_audio_file.yml
index 1626b60..a4478de 100644
--- b/field.storage.media.field_media_audio_file.yml
+++ a/field.storage.media.field_media_audio_file.yml
@@ -1,9 +1,12 @@
+uuid: 2b0f03c5-8d50-418e-a7b1-764fac9e0f84
 langcode: en
 status: true
 dependencies:
   module:
     - file
     - media
+_core:
+  default_config_hash: JCHoh95CpUeBx9ch24Tmi6ru0nwmNz8xWVH4Qs7RnTg
 id: media.field_media_audio_file
 field_name: field_media_audio_file
 entity_type: media
diff --git b/field.storage.media.field_media_file.yml a/field.storage.media.field_media_file.yml
index 1fa8af9..3a1b6f2 100644
--- b/field.storage.media.field_media_file.yml
+++ a/field.storage.media.field_media_file.yml
@@ -1,3 +1,4 @@
+uuid: 61ae6110-47c3-4875-8df6-7508c75d407f
 langcode: en
 status: true
 dependencies:
@@ -7,6 +8,8 @@ dependencies:
   module:
     - file
     - media
+_core:
+  default_config_hash: 4GNilUMnj0opT050eZIkWhkfuzu69ClyEr-cHxofjQw
 id: media.field_media_file
 field_name: field_media_file
 entity_type: media
diff --git b/field.storage.media.field_media_image.yml a/field.storage.media.field_media_image.yml
index 231200d..bef4216 100644
--- b/field.storage.media.field_media_image.yml
+++ a/field.storage.media.field_media_image.yml
@@ -1,3 +1,4 @@
+uuid: f20ee16b-ebd4-459c-a1f4-02e3a01a1f13
 langcode: en
 status: true
 dependencies:
@@ -8,6 +9,8 @@ dependencies:
     - file
     - image
     - media
+_core:
+  default_config_hash: 7ZBrcl87ZXaw42v952wwcw_9cQgTBq5_5tgyUkE-VV0
 id: media.field_media_image
 field_name: field_media_image
 entity_type: media
diff --git b/field.storage.media.field_media_video_file.yml a/field.storage.media.field_media_video_file.yml
index 0ac96a1..d3ede78 100644
--- b/field.storage.media.field_media_video_file.yml
+++ a/field.storage.media.field_media_video_file.yml
@@ -1,9 +1,12 @@
+uuid: e17487d4-c0d8-4862-979d-cfbbaacb9626
 langcode: en
 status: true
 dependencies:
   module:
     - file
     - media
+_core:
+  default_config_hash: z5mgbn1PIVZ5TNMByBmivqo_u3Rdk58UIzpyN4ypTeM
 id: media.field_media_video_file
 field_name: field_media_video_file
 entity_type: media
diff --git b/media.type.audio.yml a/media.type.audio.yml
index 2a9c0bd..e069b25 100644
--- b/media.type.audio.yml
+++ a/media.type.audio.yml
@@ -1,6 +1,9 @@
+uuid: fa5320a3-a794-437a-8d31-5b91ed1fe283
 langcode: en
 status: true
 dependencies: {  }
+_core:
+  default_config_hash: RQ75tMARZvKiI0hge9SKZpZFi-dOzZyq0nlouHHBeLM
 id: audio
 label: Audio
 description: 'A locally hosted audio file.'
diff --git b/media.type.file.yml a/media.type.file.yml
index a716fc1..27881c6 100644
--- b/media.type.file.yml
+++ a/media.type.file.yml
@@ -1,9 +1,12 @@
+uuid: ae61f905-0036-4710-9667-484d566cccb9
 langcode: en
 status: true
 dependencies: {  }
+_core:
+  default_config_hash: s6qJnINiq7zI-ZoQOXM_gtiDpIsHT3fm7RySP1F_BE0
 id: file
 label: File
-description: "Use local files for reusable media."
+description: 'Use local files for reusable media.'
 source: file
 queue_thumbnail_downloads: false
 new_revision: true
diff --git b/media.type.image.yml a/media.type.image.yml
index 9527f62..eba35d0 100644
--- b/media.type.image.yml
+++ a/media.type.image.yml
@@ -1,9 +1,12 @@
+uuid: 01149a6f-0dac-4e16-9c49-01b61e7e6763
 langcode: en
 status: true
 dependencies: {  }
+_core:
+  default_config_hash: u7OxrscEED35iDR3R0akmw7QNvBSMEPJXFtKP57qBh8
 id: image
 label: Image
-description: "Use local images for reusable media."
+description: 'Use local images for reusable media.'
 source: image
 queue_thumbnail_downloads: false
 new_revision: true
diff --git b/media.type.video.yml a/media.type.video.yml
index c17d3db..10e2f5f 100644
--- b/media.type.video.yml
+++ a/media.type.video.yml
@@ -1,6 +1,9 @@
+uuid: c0a6bef0-b964-4dc9-8067-91a2d033e3a2
 langcode: en
 status: true
 dependencies: {  }
+_core:
+  default_config_hash: _Cj9j8iA9MZ3HWv7QEwv1Pdxni0UlWGKnMw3Ou0rlXo
 id: video
 label: Video
 description: 'A locally hosted video file.'

Among those things, the _ccore and uuid are correct to exclude. The other diffs are actually with the file and image types, rather than audio and video. :) So let's file a followup issue to change the quotes, fix the dependencies, and (I think) add the missing third-party settings.

xjm’s picture

Status: Needs work » Reviewed & tested by the community

Didn't mean to change status.

phenaproxima’s picture

  • xjm committed a9d3f0a on 8.5.x
    Issue #2934962 by starshaped, xjm: Ship local audio and video media...
xjm’s picture

Committed and pushed to 8.5.x. Yay! I think this followup means we truly, completely support (local) audio and video. :)

xjm’s picture

Status: Reviewed & tested by the community » Fixed
xjm’s picture

Status: Fixed » Closed (fixed)

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

andrewmacpherson’s picture

Found this by git blame.

This change should not have been allowed through the accessibility QA gate. It isn't possible for authors to produce accessible audio and video content, i.e. there is no possibility to provide closed captions and/or subtitles for local video media type, or provide a transcript for local audio or local video. So we haven't met the gate requirements for WCAG and ATAG. This issue went through very quickly, without any mention of accessibility, and the accessibility maintainers were unaware of it at the time. Audio and video alternative are among the earliest-numbered level A success criteria for WCAG, which would be found at the start of any WCAG checklist. I'll conclude that no-one attempted to assess this for the accessibility gate.

At Drupalcon Vienna in autumn 2017, I did ask the initiative leads about how authors could provide captions and transcripts, in the Q+A for the media initiative update session. The response was along the lines of "it's not an issue for Drupal core, because we only have file and image media bundles configured", but a couple of months later this was added as quick-win and accessibility was forgotten.

I'm kind of disappointed by this, however let's be pragmatic. These preconfigured local audio and video bundles have been included in the standard profile for a couple of releases now, so it seems a pity to call for a reversion of the commit here. In any case, lots of sites are using these bundles, and it's a popular feature of blog posts, tutorials, and podcasts. Instead let's just get on with filling the feature gap.

A few months ago I filed an minimum-viable plan to address transcripts and closed captions, in #3002770: Provide authors with tools to manage transcripts and captions/subtitles for local video and audio, but it hasn't had a response yet from the media initiative leads. I'll bring it to their attention, and get it a proper place in the media roadmap.