immensity
v2.1.1
Published
JavaScript library for DOM manipulation
Downloads
2
Readme
Immensity
JavaScript library for DOM manipulation
Install
npm install immensity
Usage
import * as iy from 'immensity';
import {
cleanDocument,
controlCursorVisibility,
convertSecondsToTimeUnits,
craddel,
createVideoController,
crel,
formatTimeForVideo,
getVideoshot,
handleContextMenu,
handleKeyboardEvent,
handleMouseEvent,
openInIframe,
photoshowSimple,
removeAttributes,
saveAsJSON,
throttle
} from 'immensity';
Examples
getVideoshot
Capture video screenshot of HTML5 video at current time
import { getVideoshot } from 'immensity';
const video = document.querySelector('video');
// optional object, defaults to:
const options = {
download: true,
name: document.title,
quality: 0.95,
timestamp: ` ${Date.now()}`,
type: 'image/jpeg'
};
getVideoshot(video, options);
saveAsJSON
Save javascript object as JSON file
import { saveAsJSON } from 'immensity';
const data = { example: 'Example' };
// optional object, defaults to:
const options = {
name: document.title,
space: 0,
timestamp: ` ${Date.now()}`
};
saveAsJSON(data, options);