Function JS2VideoProvider

  • JS2Video Provider Component

    Parameters

    • props: {
          autoPlay?: boolean;
          children: ReactNode;
          enableUnsecureMode?: boolean;
          loop?: boolean;
          onAfterExport?: any;
          onBeforeExport?: any;
          onLoading?: any;
          params?: any;
          templateUrl: string;
          videoFilePrefix?: string;
      }

      Component props

      • OptionalautoPlay?: boolean

        Play video immediately after loading? Default: false.

      • children: ReactNode
      • OptionalenableUnsecureMode?: boolean

        Enables the template to be loaded and executed from outside an iframe. Use with caution, and only set to 'true' if you trust the template code as it enables code execution on the current page. Default: false.

      • Optionalloop?: boolean

        Loop the video? Default: false.

      • OptionalonAfterExport?: any

        A function that's called after the video is exported.

      • OptionalonBeforeExport?: any

        A function that's called before the video is exported. Must return true for export to continue.

      • OptionalonLoading?: any

        OnLoading callback function.

      • Optionalparams?: any

        Video template params. Default; {}.

      • templateUrl: string

        URL to the video template.

      • OptionalvideoFilePrefix?: string

        String to prefix exported video file names with. default: js2video.

    Returns JSX.Element

    • The video template preview wrapped a context