playByPath method

dynamic playByPath(
  1. String path
)

播放文件通过文件路径

Implementation

playByPath(String path) {
  _methodChannel?.invokeMethod('playGift', {'mp4Path': path}).then((value) {
    if (value == 'playEnd') {
      widget.playEndCallback();
      if (Platform.isIOS) {
        stopPlay();
      }
    }
  });
}