observe_media_import_medium/2

Notification to import a medium record from external source. This is called for non-file medium records, for example embedded video. If the medium record is not recognized then it will not be imported. The handling module is responsible for sanitizing and inserting the medium record.

Type:

first

Return:

ok | {error, term()}.

#media_import_medium{} properties:

  • id: m_rsc:resource_id()
  • medium: map

Edit on GitHub

Observed by

Modules

mod_video_embed

This module, if activated, checks the pasted URLs in the create media / page dialog of the admin. It will show an embed option for Youtube and Vimeo URLs. It…

Modules

mod_oembed

Makes media resources from embeddable URLs through the OEmbed protocol.