/* tslint:disable */ /** * This file was automatically generated by json-schema-to-typescript. * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file, * and run json-schema-to-typescript to regenerate this file. */ export interface Lottie { /** * 是否自动播放。 */ autoplay?: boolean; /** * Lottie 资源地址。包含近端(包内地址)和远端(网络)的 JSON 文件地址。 */ path?: string; /** * 播放速度。正数为正向播放,负数负向播放。 */ speed?: { [k: string]: unknown; }; /** * 循环次数。 * * 如果是负数表示无限次。 * 如果是 0 表示不循环,播放一次。 * 如果是 1 表示循环一次,播放两次。 */ "repeat-count"?: number; /** * 是否自动回播。 */ "auto-reverse"?: boolean; /** * 资源地址。"/" 表明是小程序根目录。 */ "assets-path"?: string; /** * 兜底图或者降级图地址。 * * 1. 支持本地资源,案例:'/image/lottie/lottie2_default.png'。 * 支持 http 的 cdn 地址、近端地址。 */ placeholder?: string; /** * 在线资源的 md5 校验。 * 可以使用 b.zip 加密 获取 md5 值 * md5="77c6c86fc89ba94cc0a9271b77ae77d2" */ md5?: string; /** * 降级。降级是指如遇低端设备,Lottie 会降级展示为 placeholder。 * 当 optimize 为 true ,并且传入了 placeholder 时,在低端设备上只会展示 placeholder,不展示 Lottie。 * 低端设备如下所示: * * iOS :小于等于 iPhone6P * Android:内存容量小于 3G */ optimize?: boolean; /** * 当数据下载+视图创建完成时触发。 */ onDataReady?: () => void; /** * 数据加载失败时触发。 */ onDataFailed?: () => void; /** * 动画开始时触发。 */ onAnimationStart?: () => void; /** * 动画结束时触发。 */ onAnimationEnd?: () => void; /** * 动画一次重播结束。 */ onAnimationRepeat?: () => void; /** * 动画取消。业务调用 Cancel 时回调。 */ onAnimationCancel?: () => void; /** * 参数化时,数据准备完成,等待业务传入参数化值。 */ onDataLoadReady?: () => void; }