Skip to content

发送弹幕内容 ​

注意

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

方法名 ​

sendDanMu

用法 ​

js
this.$refs.refPlayer.sendDanMu({
  text: "这里是弹幕内容"
});
js
let options = {
  text: "这里是弹幕内容"
};
let params : JSONObject = JSONObject.parse(JSON.stringify(options)) as JSONObject
refPlayer.value?.sendDanMu(params);

参数说明 ​

参数名参数类型是否必填默认值参数描述
textString是无弹幕内容
paddingInteger否0内边距
isLiveBoolean否false是否是直播弹幕
textSizeInteger否12文本大小
textColorString否#FFFFFF文本颜色
textShadowColorString否#888888阴影/描边颜色
borderColorString否#FF0000边框的颜色
withBorderBoolean否true是否加边框