跳转到内容

轨道对象

app.project.sequences[index].audioTracks[index]

app.project.sequences[index].videoTracks[index]

轨道对象表示序列对象中的视频或音频轨道。


app.project.sequences[index].audioTracks[index].clips

app.project.sequences[index].videoTracks[index].clips

轨道中包含的轨道项对象数组,按时间顺序排列。

轨道项集合对象,只读;


app.project.sequences[index].audioTracks[index].id

app.project.sequences[index].videoTracks[index].id

这是轨道创建时分配的序号。

整数,只读。


app.project.sequences[index].audioTracks[index].mediaType

app.project.sequences[index].videoTracks[index].mediaType

轨道中包含的媒体类型。

字符串,只读。可能的值:

  • Audio
  • Video

app.project.sequences[index].audioTracks[index].name

app.project.sequences[index].videoTracks[index].name

轨道的名称。

字符串;只读。


app.project.sequences[index].audioTracks[index].transitions

app.project.sequences[index].videoTracks[index].transitions

轨道中包含的转场对象数组,按时间顺序排列。

轨道项集合对象,只读;


app.project.sequences[index].audioTracks[index].insertClip(projectItem, time, vTrackIndex, aTrackIndex)

app.project.sequences[index].videoTracks[index].insertClip(projectItem, time, vTrackIndex, aTrackIndex)

在指定时间向轨道添加一个“片段”(来自项目项对象的媒体片段)。媒体将在该时间插入。

参数类型描述
projectItem项目项对象从中获取媒体的项目项。
time字符串添加项目项的时间,以ticks为单位。
vTrackIndex整数插入视频的(从零开始的)轨道索引。
aTrackIndex整数插入音频的(从零开始的)轨道索引。

无。


app.project.sequences[index].audioTracks[index].isMuted()

app.project.sequences[index].videoTracks[index].isMuted()

获取轨道的当前静音状态。

无。

如果轨道当前静音,则返回true;否则返回false


app.project.sequences[index].audioTracks[index].overwriteClip(projectItem, time)

app.project.sequences[index].videoTracks[index].overwriteClip(projectItem, time)

在指定时间向轨道添加一个“片段”(来自项目项对象的媒体片段)。这将覆盖该时间点的任何现有媒体。

参数类型描述
projectItem项目项对象从中获取媒体的项目项。
time字符串添加项目项的时间,以ticks为单位。

返回true


app.project.sequences[index].audioTracks[index].setMute(isMuted)

app.project.sequences[index].videoTracks[index].setMute(isMuted)

设置轨道的静音状态。

参数类型描述
isMuted整数如果为1,则静音轨道。如果为0,则取消静音轨道。

如果成功,则返回0