Module mod_video

Video support for Zotonic.

Copyright © 2014 Marc Worrell

Behaviours: supervisor.

Authors: Marc Worrell (marc@worrell.nl).

Description

Video support for Zotonic. Converts all video files to mp4 and extracts a previes image.

Function Index

convert_task/2
init/1
observe_media_stillimage/2Return the filename of a still image to be used for image tags.
observe_media_upload_preprocess/2If a video file is uploaded, queue it for conversion to video/mp4.
observe_media_upload_props/3After a video file is processed, generate a preview image.
observe_media_viewer/2Return the media viewer for the mp4 video.
post_insert_fun/5The medium record has been inserted, queue a conversion.
queue_path/2
remove_task/2
start_link/1

Function Details

convert_task/2

convert_task(Task, Context) -> any()

init/1

init(X1) -> any()

observe_media_stillimage/2

observe_media_stillimage(Media_stillimage::#media_stillimage{}, Context::z:context()) -> undefined | {ok, file:filename_all()}

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

observe_media_upload_preprocess/2

observe_media_upload_preprocess(Media_upload_preprocess, Context) -> any()

If a video file is uploaded, queue it for conversion to video/mp4

observe_media_upload_props/3

observe_media_upload_props(Media_upload_props, Medium, Context) -> any()

After a video file is processed, generate a preview image.

observe_media_viewer/2

observe_media_viewer(Media_viewer::#media_viewer{}, Context::z:context()) -> undefined | {ok, template_compiler:render_result()}

Return the media viewer for the mp4 video

post_insert_fun/5

post_insert_fun(Id, Medium, Upload, ProcessNr, Context) -> any()

The medium record has been inserted, queue a conversion

queue_path/2

queue_path(Filename, Context) -> any()

remove_task/2

remove_task(QueueFilename::file:filename_all(), Context::z:context()) -> non_neg_integer()

start_link/1

start_link(Args) -> any()


Generated by EDoc