public abstract class ActionBase
extends java.lang.Object
ActionFade
,
ActionRotate
,
ActionRotateBy
,
ActionRotateTo
,
ActionScale
,
ActionTranslate
,
ActionWipe
,
ActionSet
Modifier and Type | Class and Description |
---|---|
static class |
ActionBase.Interpolator
Added in v3.25.0
Interpolator
|
static class |
ActionBase.PartParam
Added in v3.25.0
The animation param of child node.
|
static class |
ActionBase.RepeatMode |
static class |
ActionBase.Scope |
static class |
ActionBase.Type |
Modifier and Type | Field and Description |
---|---|
protected java.lang.String |
mAnimationConfig
The animation configuration.
|
protected java.lang.Long |
mDuration
The animation duration on the playback timeline.
|
protected int |
mFillAfter
Indicates whether the animation transformation should be applied after the
animation ends.
|
protected int |
mFillBefore
If fillBefore is true, this animation will apply its transformation
before the start time of the animation.
|
protected int |
mId
The animation id.
|
protected int |
mInterpolatorType
Interceptor Type.
|
protected boolean |
mIsStream
Whether to perform animation on the source stream.
|
protected ActionBase.PartParam |
mPartParam
Added in v3.25.0
|
protected int |
mRepeatCount |
protected int |
mRepeatMode |
protected int |
mScope
Added in v3.25.0
|
protected float |
mStartOffset
The delay in seconds after which the animation must start.
|
protected int |
mTargetId
The id of the object on which this animation is performed.
|
protected float |
mTimelineIn
The time when this action appears.
|
protected float |
mTimelineOut
The time when this action disappears.
|
protected ActionBase.Type |
mType
The animation type.
|
Constructor and Description |
---|
ActionBase() |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object obj) |
java.lang.String |
getAnimationConfig()
Gets the animation configuration.
|
long |
getDuration()
Gets the animation duration.
|
long |
getDuration(java.util.concurrent.TimeUnit timeUnit)
Gets the animation duration.
|
int |
getId()
Gets the id, unique resource identifier, of this animation.
|
java.lang.String |
getResId()
Gets the id of a resource.
|
long |
getStartTime()
Gets the animation start time.
|
long |
getStartTime(java.util.concurrent.TimeUnit timeUnit)
Gets the animation start time.
|
int |
getTargetId()
Gets the id of the object on which this animation is performed.
|
float |
getTimelineIn()
Gets the time when this animation appears.
|
float |
getTimelineOut()
Gets the time when this animation disappears.
|
ActionBase.Type |
getType()
Gets the animation type.
|
boolean |
isStream()
Returns whether this animation is performed on a source stream.
|
void |
setAnimationConfig(java.lang.String animationConfig)
Deprecated.
|
void |
setDuration(long durationUs)
Sets the animation duration.
|
void |
setDuration(long duration,
java.util.concurrent.TimeUnit timeUnit)
Sets the animation duration.
|
void |
setFillAfter(boolean aFillAfter)
Added in v3.25.0
Indicates whether the animation transformation should be applied after the
animation ends.
|
void |
setFillBefore(boolean aFillBefore)
Added in v3.25.0
If fillBefore is true, this animation will apply its transformation
before the start time of the animation.
|
void |
setId(int id)
Sets the id of this animation.
|
void |
setInterpolatorType(ActionBase.Interpolator aInterpolator)
Added in v3.25.0
Set Interceptor Type.
|
void |
setIsStream(boolean isStream)
Defines whether this animation is performed on a source stream.
|
void |
setPartParam(ActionBase.PartParam aPartParam)
Added in v3.25.0
set the part node param of animation when the scope is
ActionBase.Scope.Part |
void |
setRepeatCount(int aRepeatCount)
Added in v3.25.0
|
void |
setRepeatMode(ActionBase.RepeatMode aRepeatMode)
Added in v3.25.0
the repeat mode
|
void |
setResId(java.lang.String id)
Set the id of action resource.
|
void |
setScope(ActionBase.Scope aScope)
Added in v3.25.0
|
void |
setStartOffset(long aStartOffset)
Added in v3.25.0
Set the animation delay time in milliseconds.
|
void |
setStartTime(long startTimeUs)
Sets the animation start time.
|
void |
setStartTime(long startTime,
java.util.concurrent.TimeUnit timeUnit)
Sets the animation start time.
|
void |
setTargetId(int id)
Sets the id of the object on which this animation is performed.
|
void |
setTimelineIn(float timelineIn)
Sets the time when this animation appears.
|
void |
setTimelineOut(float timelineOut)
Sets the time when this animation disappears.
|
protected void |
setType(ActionBase.Type type)
Sets the animation type.
|
protected transient int mTargetId
protected ActionBase.Type mType
protected float mTimelineIn
protected float mTimelineOut
protected int mScope
The animation scope. 0 : Whole 1 : Part the default value is 0
protected ActionBase.PartParam mPartParam
The param when the scope is part
protected transient java.lang.Long mDuration
protected float mStartOffset
protected transient boolean mIsStream
protected transient int mId
protected int mFillBefore
protected int mFillAfter
protected int mRepeatCount
protected int mRepeatMode
protected java.lang.String mAnimationConfig
protected int mInterpolatorType
ActionBase.Interpolator
for more detailpublic java.lang.String getAnimationConfig()
@Deprecated public void setAnimationConfig(java.lang.String animationConfig)
Defines custom animations with the specified animation configuration. Allows you to create custom animations at random points in time to achieve different transition speeds. The animation configuration must be a string representation of semicolon-separated key-value pairs. The key indicates the point in time and the value can hold one or two values depending on the animation type. One value is needed for animations such as rotation while two comma-separated values are needed for animations such as transition and scaling. Separate the key and value in a key-value pair with a colon. Examples: rotation: "0.0:0.123;0.1:0.245;0.3:0.798" translation: "0.0:0.234,1.47;0.1:2.3,4.565;0.2:3.45,6.78"
animationConfig
- The animation configuration.public ActionBase.Type getType()
protected void setType(ActionBase.Type type)
type
- The animation type.public long getStartTime()
public long getStartTime(java.util.concurrent.TimeUnit timeUnit)
Added in v3.27.0
public void setStartTime(long startTimeUs)
startTimeUs
- The start time in microseconds.public void setStartTime(long startTime, java.util.concurrent.TimeUnit timeUnit)
Added in v3.27.0
startTime
- timeUnit
- Time Unitpublic long getDuration()
public long getDuration(java.util.concurrent.TimeUnit timeUnit)
Added in v3.27.0
timeUnit
- Time Unitpublic void setDuration(long durationUs)
durationUs
- The duration in microseconds.public void setDuration(long duration, java.util.concurrent.TimeUnit timeUnit)
Added in v3.27.0
duration
- The duration.timeUnit
- Time Unitpublic boolean isStream()
public void setIsStream(boolean isStream)
isStream
- Whether this animation is performed on a source stream.public int getTargetId()
public void setTargetId(int id)
Sets the id of the object on which this animation is performed. The object can be a stream or a material, such as a GIF image or a subtitle line. To perform this animation on a source stream during a specific time period, the source stream id is required. UseAliyunIClipManager.getAllClips()
} to get the list of source streams, and find the specificAliyunClip
. UseAliyunClip.getId()
to get the stream id. If the object is a material, such as a GIF image or JPG image, useEffectBase.getViewId()
to get the material id. To perform this animation on a source stream,setIsStream(boolean)
must be set to true.
id
- The id of the object on which this animation is performed.public int getId()
public void setId(int id)
id
- The id of this animation.public java.lang.String getResId()
public void setResId(java.lang.String id)
public void setScope(ActionBase.Scope aScope)
The animation scope.ActionBase.Scope.Overall
:OverallActionBase.Scope.Part
: Part - Currently only works with caption, where animations are applied to individual text the default value isActionBase.Scope.Overall
public void setPartParam(ActionBase.PartParam aPartParam)
ActionBase.Scope.Part
public void setFillBefore(boolean aFillBefore)
aFillBefore
- public void setFillAfter(boolean aFillAfter)
aFillAfter
- public void setRepeatCount(int aRepeatCount)
Sets the max repeat times of animation when repeatMode is not NONE。 If the repeat count is 0, the animation will repeat indefinitely.
repeatCount
- the max repeat times of animationpublic void setRepeatMode(ActionBase.RepeatMode aRepeatMode)
aRepeatMode
- public float getTimelineIn()
public void setTimelineIn(float timelineIn)
timelineIn
- Unit: second.public float getTimelineOut()
public void setTimelineOut(float timelineOut)
timelineOut
- Unit: second.public void setInterpolatorType(ActionBase.Interpolator aInterpolator)
ActionBase.Interpolator
for more detailaInterpolator
- Interpolatorpublic void setStartOffset(long aStartOffset)
aStartOffset
- public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object