Quantcast
Channel: Issues for Drupal core
Viewing all articles
Browse latest Browse all 291765

Add support of "preload" attribute into FileMediaFormatterBase

$
0
0

Problem/Motivation

FileMediaFormatterBase doesn't allow to specifie preload attribute on video and audio file. This attribute allow to control media loading behavior.
(See : https://developer.mozilla.org/en-US/docs/Web/HTML/Element/video)

Proposed resolution

  • Add new "preload" select field into FileMediaFormatterBase with three options :
    • None : The author thinks that the browser should NOT load the video when the page loads,
    • Auto : The author thinks that the browser should load the entire video when the page loads,
    • Metadata : The author thinks that the browser should load only metadata when the page loads.
  • Default value must to be "metadata"

Remaining tasks

  • Create patch to allow this
  • Update tests for FileVideoFormatter and FileAudioFormatter to check preload attribute exist
  • Update schema for the configuration file of the File module

User interface changes

  • New field into configuration form of FileVideoFormatter and FileAudioFormatter
  • Update summary of Fieldformatter

API changes

None

Data model changes

  • update field.formatter.settings.file_video mapping.

Viewing all articles
Browse latest Browse all 291765

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>