ScreenShot plugin for LIFF
Like other packages, it can be installed via NPM.
$ npm i liff-screeenshot-plugin # or yarn add liff-screenshot-plugin
Also, since @line/liff is provided by NPM, after installing it together, simply do liff.use to complete the installation.
import liff from '@line/liff'
import 'liff-screenshot-plugin/styles/index.css'
import LIFFSSPlugin from 'liff-screenshot-plugin'
liff.use(LIFFSSPlugin)
coming soon
capture('blob')
Promise<Blob>
Take a screenshot. Currently only the Blob format is supported; PNG support is planned for the future.
captureWithModal('blob', option?: CaptureWithModalOptions)
Promise<{ feedback?: string, data: Blob }>
Display a dedicated modal and capture screenshots with user feedback.
The final result is feedback in string format and the Blob's data.
Mainly options exist for i18n. These are all optional.
type TextDictionary = {
title: string;
placeholder: string;
note: string;
cancelText: string;
submitText: string;
};
type CaptureWithModalOptions = {
format?: SupportFormat;
dictionary?: Partial<TextDictionary>;
};
hideModal()
void
Interrupts the processing of the displayed modal and hides it.
MIT