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 will also cleanup pasted embed code for these and other services.

When used in the Zotonic site, the {% media %} tag then displays the embed code.

This module accompanies module#mod_oembed and can be used for integrating with services that do not have oEmbed support but do provide HTML embed-code functionality. Video embed helper module for normalizing and rendering embeddable media URLs/code.

Accepted Events

This module handles the following notifier callbacks:

  • observe_media_import: Recognize youtube and vimeo URLs, generate the correct embed code using z_url_metadata:p.
  • observe_media_import_medium: Import a embedded medium for a rsc_import using z_sanitize:html.
  • observe_media_stillimage: Return the still image filename used for embedded-media previews.
  • observe_media_viewer: Return the media viewer for the embedded video (that is, when it is an embedded media) using z_template:render_to_iolist.
  • observe_rsc_update: Check if the update contains video embed information using z_acl:is_allowed.

Delegate callbacks:

  • event/2 with submit messages: add_video_embed.

Edit on GitHub

Observes

Notifications

observe_media_viewer/2

Request to generate a HTML media viewer for a resource. The HTML data can not contain any Javascript, as it might be serialized. This could happen if the…

Notifications

observe_media_import/2

Notification to translate or map a file after upload, before insertion into the database Used in mod_video to queue movies for conversion to mp4. You can set…

Notifications

observe_rsc_update/3

An updated resource is about to be persisted. Observe this notification to change the resource properties before they are persisted.

Notifications

observe_media_stillimage/2

See if there is a ‘still’ image preview of a media item. (eg posterframe of a movie) Return:: {ok, ResourceId} or undefined

Notifications

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…

See also

Modules

mod_oembed

Makes media resources from embeddable URLs through the OEmbed protocol.

Modules

mod_video

Adds support for viewing and handling video medium items.

Tags

media

Show embed, video or audio media.

Modules

mod_audio

Adds support for viewing and handling audio medium items.

Referred by

Tags

media

Show embed, video or audio media.