blob: 9ee1cd7667307fb1fcb222f16ec9f6b810b7c5d2 [file] [log] [blame]
// Copyright 2020 The Cobalt Authors. All Rights Reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/license/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// https://github.com/LottieFiles/lottie-player
// Note: This IDL is based off of version 0.5.1 of the web spec.
// https://www.npmjs.com/package/@lottiefiles/lottie-player/v/0.5.1
interface LottiePlayer : HTMLElement {
attribute DOMString src;
attribute boolean autoplay;
attribute DOMString background;
attribute long count;
attribute long direction;
attribute boolean hover;
attribute DOMString mode;
attribute boolean loop;
attribute double speed;
// Custom behavior: preserveAspectRatio and renderer should also be writeable
// according to the spec.
readonly attribute DOMString preserveAspectRatio;
readonly attribute DOMString renderer;
void load(DOMString src);
void play();
void pause();
void stop();
void seek((double or DOMString) frame);
void setDirection(long direction);
void setLooping(boolean loop);
void setSpeed(double speed);
void toggleLooping();
void togglePlay();
};