Module mod_oembed

Enables embedding media from their URL.

Copyright © 2011-2013 Arjan Scherpenisse <arjan@scherpenisse.net>

Authors: Arjan Scherpenisse (arjan@scherpenisse.net).

Description

Enables embedding media from their URL.

Function Index

event/2
observe_media_import/2Recognize youtube and vimeo URLs, generate the correct embed code.
observe_media_stillimage/2Return the filename of a still image to be used for image tags.
observe_media_viewer/2Return the media viewer for the embedded video (that is, when it is an embedded media).
observe_rsc_update/3Check if the update contains video embed information.
preview_create/2(Re)create a preview from the stored oembed information.

Function Details

event/2

event(Postback, Context) -> any()

observe_media_import/2

observe_media_import(Media_import, Context) -> any()

Recognize youtube and vimeo URLs, generate the correct embed code

observe_media_stillimage/2

observe_media_stillimage(Media_stillimage::Notification, Context::_Context) -> undefined | {ok, Filename}

Return the filename of a still image to be used for image tags.

observe_media_viewer/2

observe_media_viewer(Media_viewer::Notification, Context) -> undefined | {ok, Html}

Return the media viewer for the embedded video (that is, when it is an embedded media). First tries the template called _oembed_embeddable_(providername).tpl; if not found, falls back to the HTML code that the oembed provider gave us; if none found, falls back to the generic template _oembed_embeddable.tpl.

observe_rsc_update/3

observe_rsc_update(Rsc_update::#rsc_update{}, Error::{ok, m_rsc:props()} | {error, term()}, Context::z:context()) -> {ok, m_rsc:props()} | {error, term()}

Check if the update contains video embed information. If so then try to get the oembed information from the provider and update the attached medium item.

preview_create/2

preview_create(Id, Context) -> any()

(Re)create a preview from the stored oembed information


Generated by EDoc