@vizzu/video-capture
TypeScript icon, indicating that this package has built-in type declarations

0.2.0 • Public • Published

Vizzu video capture plugin

This plugin allows you to create videos from chart animations in Vizzu.

Install

$ npm install @vizzu/video-capture

Usage

To use the plugin, simply add it to your Vizzu instance as a feature:

import { VideoCapture } from '@vizzu/video-capture'

await chart.initializing
chart.features(new VideoCapture(), true)

Once registered, you can start and stop the recording as needed:

const anim = chart.animate({
	data,
	config: {
		x: 'Year',
		y: ['Value 2 (+)', 'Joy factors'],
		color: 'Joy factors',
		title: 'Video Export'
	}
})

anim.activated.then(() => {
	chart.feature.videoCapture.start()
})

anim.then(async (chart) => {
	const output = await chart.feature.videoCapture.stop()
	window.open(output.getObjectURL())
})

Extracting information

The plugin provides two functions, start() to begin the recording and stop() to end it.

chart.feature.videoCapture.start()
chart.feature.videoCapture.stop()

Contributing

Release

If you need to change the Vizzu version number in the plugins, use the following command:

yarn node tools/updateVizzuMinorVersion.cjs <version>

License

Copyright © 2021-2023 Vizzu Inc.

Released under the Apache 2.0 License.

Package Sidebar

Install

npm i @vizzu/video-capture

Weekly Downloads

2

Version

0.2.0

License

Apache-2.0

Unpacked Size

13.4 kB

Total Files

8

Last publish

Collaborators

  • dovicsin
  • veghdev
  • laszlosimon