Gutenberg: Block audit: Audio

Created on 30 Jul 2018  路  3Comments  路  Source: WordPress/gutenberg

_Note: We'll be doing these audits in waves and editing this as we work through the blocks, so this text will be updated and fleshed out as we progress. See the full picture here._

Overview

screenshot 2018-07-30 15 16 49

Name: Audio
Description: Embed an audio file and a simple audio player.
Category: Common blocks
CSS class: wp-block-audio in frontend or editor
Can be converted to: file

States

Empty:
screenshot 2018-07-30 15 04 01

Selected:
screenshot 2018-07-30 15 07 47

With a caption:
screenshot 2018-07-30 15 22 21

With a caption and right-aligned:
screenshot 2018-07-30 15 07 47

Unselected:
screenshot 2018-07-30 15 22 27
screenshot 2018-07-30 15 22 37

Placeholder:
screenshot 2018-07-30 15 04 45

Primary (toolbar) settings

Align: left, centre, right, edit
For captions: bold, italic, strikethrough, link

Secondary (sidebar) settings

Audio Settings: Autoplay, Loop, Preload
Advanced: Additional CSS Class

Frontend appearance

Gutenberg starter theme:

screen shot 2018-07-31 at 1 57 53 pm

Atomic Blocks

screen shot 2018-07-31 at 1 53 20 pm

twentyseventeen:

screen shot 2018-07-31 at 2 29 09 pm

twentyten:

screen shot 2018-07-31 at 2 28 08 pm

Bugs/errors

_Individual issues will be opened for these soon_

  • [ ] Same float issues as image block. (#8293) Here, they're actually a bit worse, because the left- and right-aligned versions of the player are so small, it becomes impossible to select anything. (Especially if you have a caption!)

  • [x] Converting to a file isn't undoable via the toolbar, and also causes issues with the edit icon moving from the right to the left. _(@kjellr, 2/28/19: Unable to reproduce in master, so crossing this out for now.)_

  • [x] Converting a formatted caption to a file creates some weird JS [object Object]-y-ness. (#7626)

  • [x] Setting an audio file to display full-width (which, honestly, feels a bit like an odd choice) causes it to overflow its container. (#8717)

Suggestions

_Individual issues will be opened for these soon_

  • [ ] What does "Preload" mean? It gives the options for Auto|Metadata|None. (#7726)

  • [ ] Good to see that Autoplay is untoggled by default. It could be nice to add a little note, a la colour contrast warnings, when people toggle this, to warn them to be careful autoplaying anything lest they annoy their users. (#13550)

  • [ ] I didn't expect left- and right-aligning the block to change the layout of the audio player so dramatically. _(@kjellr: Thankfully, this is alleviated somewhat by the fact that the editor mimics the front end: at least you'll get to see the change right away)_

  • [ ] Empty state could be improved from a consistency standpoint. (#8409)

[Feature] Blocks [Type] Task

Most helpful comment

How to prohibit download option? I don't want users to download my audio files. Please suggest..

All 3 comments

How to prohibit download option? I don't want users to download my audio files. Please suggest..

All of the bugs/errors noted here have been filed as individual issues.

I'm not going to open an individual issue for that last suggestion at this point, but it's recorded here for reference. If we want to pursue in the future, we can open a new issue.

Closing this in the meantime. 馃憤

Like ajuluri above, I'd like to see a way to disable audio file downloading by hiding the control at far right. I tried to do it with CSS but there is no way to target that one behavior. I have not found a plugin that does the job either. Please consider reopening this issue. Thanks.

Was this page helpful?
0 / 5 - 0 ratings