setBarrageSettings method

Future<void> setBarrageSettings({
  1. double? displayAreaRatio,
  2. double? opacity,
  3. double? fontSize,
  4. double? speedLevel,
})

批量设置弹幕显示参数,所有字段均可选。

  • displayAreaRatio 显示区域 0.25~1.0
  • opacity 不透明度 0.2~1.0
  • fontSize 字体大小,建议值:10 / 12 / 14 / 16 / 18
  • speedLevel 速度等级 0.0(极慢)~ 1.0(极快),0.5 为适中

Implementation

Future<void> setBarrageSettings({
  double? displayAreaRatio,
  double? opacity,
  double? fontSize,
  double? speedLevel,
}) =>
    _invoke('setBarrageSettings', {
      if (displayAreaRatio != null) 'displayAreaRatio': displayAreaRatio,
      if (opacity != null) 'opacity': opacity,
      if (fontSize != null) 'fontSize': fontSize,
      if (speedLevel != null) 'speedLevel': speedLevel,
    });