wiki:docs_image_video_input_types

Images

  • Images should be placed into the "add" sub-directory under the project directory
    • create one if it does not already exist
    • you can also created a subdirectory or subdirectories under add, but if so, you will need to add the path to your image "name"
  • N.B. Formats for images that are accepted by major browsers include png, gif & bmp.
  • .json template is the following:
                 {
                   "role"       : "input",
                   "id"         : "imageid",
		   "name"       : "ImageName.jpg",  
                   "type"       : "image",
		   "label"      : "Image",
		   "alt"        : "Some Alternative Text",
# colspan, height, width are optional, but specifying a too small colspan (column span) will effect the layout of columns in the input fields
		   "colspan"    :  5,  
		   "width"      : 300,
		   "height"     : 250  
                 }, 

Video

  • Video files should be placed into the "add" sub-directory under the project directory
    • create one if it does not already exist
    • you can also created a subdirectory or subdirectories under add, but if so, you will need to add the path to your video "name"
  • N.B. for videos, you need to create both a .webm and .mp4 (h264 encoded) to support the major browsers
  • .json template
                {
                   "role"       : "input",
                   "id"         : "videoid",
		   "name"       : "Video_file_basename",  
                   "type"       : "video",
		   "label"      : "Video",
# colspan, height, width are optional, but specifying a too small colspan (column span) will effect the layout of columns in the input fields
		   "colspan"    :  5,  
		   "width"      : 300,
		   "height"     : 250   
                }

Width and height are in pixels. For the video, two formats should be supplied, .mp4 and .webm. Note, only file basename must be provided in .json module (no extension)

Last modified 21 months ago Last modified on Jun 10, 2016, 10:17:25 AM