Skip to content

设置字幕 ​

注意

该方法回调为异步事件,请参考方法事件

方法名 ​

setTimedText

用法 ​

js
this.$refs.refPlayer.setTimedText({
  index: 1
});
js
let options = {
  index: 1
};
let params : JSONObject = JSONObject.parse(JSON.stringify(options)) as JSONObject
refPlayer.value?.setTimedText(params);

参数说明 ​

参数名参数类型是否必填默认值参数描述
indexInteger是无音轨索引,可以从【其他事件】的【可用的字幕集合】中获取索引