{"size": 2748, "ext": "js", "max_stars_repo_path": "src/plugins/html-video/index.js", "max_stars_repo_name": "alec-ng/react-block-content-editor", "max_stars_repo_stars_event_min_datetime": "2020-01-27T23:39:26.000Z", "max_stars_repo_stars_event_max_datetime": "2022-02-28T01:07:48.000Z", "max_issues_repo_path": "src/plugins/html-video/index.js", "max_issues_repo_name": "alec-ng/react-block-content-editor", "max_issues_repo_issues_event_min_datetime": "2021-05-11T01:13:37.000Z", "max_issues_repo_issues_event_max_datetime": "2021-09-03T00:41:45.000Z", "max_forks_repo_path": "src/plugins/html-video/index.js", "max_forks_repo_name": "alec-ng/react-brandywine-editor", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": 4, "max_issues_count": 2, "max_forks_count": null, "avg_line_length": 21.984, "max_line_length": 75, "alphanum_fraction": 0.3999272198}
/**
 * PEER DEPENDENCIES: VisibilitySensor
 */

import { VARIATION_DEFAULT, HTMLVideoElement } from "./html-video";
import { VARIATION_AUTOPLAY } from "./variation-autoplay";

const HTMLVideo = {
  name: "html_video",
  label: "HTML Video",
  description: "Renders an HTML5 Video element to play from a URL source",
  canvasElement: HTMLVideoElement,
  baseAttrs: [
    {
      name: "urlSource",
      label: "URL Source",
      element: "input",
      type: "text"
    },
    {
      name: "size",
      label: "Size",
      element: "select",
      defaultRequired: true,
      defaultValue: "large",
      options: [
        {
          name: "stretch",
          label: "Stretch"
        },
        {
          name: "large",
          label: "Large"
        },
        {
          name: "medium",
          label: "Medium"
        },
        {
          name: "small",
          label: "Small"
        }
      ]
    }
  ],
  variations: [
    {
      name: VARIATION_DEFAULT,
      label: "Video with Controls",
      attrs: []
    },
    {
      name: VARIATION_AUTOPLAY,
      label: "Autoplay video without controls or audio",
      attrs: [
        {
          name: "text",
          label: "Caption",
          element: "input",
          type: "text"
        },
        {
          name: "align",
          label: "Text Alignment",
          element: "select",
          defaultRequired: true,
          defaultValue: "left",
          options: [
            {
              name: "left",
              label: "Left"
            },
            {
              name: "center",
              label: "Center"
            },
            {
              name: "right",
              label: "Right"
            }
          ]
        },
        {
          name: "top",
          label: "Top Offset (%)",
          element: "input",
          type: "range",
          min: 0,
          max: 100,
          defaultValue: 1
        },
        {
          name: "right",
          label: "Right Offset (%)",
          element: "input",
          type: "range",
          min: 0,
          max: 100,
          defaultValue: 1
        },
        {
          name: "bottom",
          label: "Bottom Offset (%)",
          element: "input",
          type: "range",
          min: 0,
          max: 100,
          defaultValue: 1
        },
        {
          name: "left",
          label: "Left Offset (%)",
          element: "input",
          type: "range",
          min: 0,
          max: 100,
          defaultValue: 1
        }
      ]
    }
  ],
  defaultVariation: VARIATION_DEFAULT
};
export default HTMLVideo;
