MPVPlayer constructor

MPVPlayer({
  1. List<String> mpvArgs = const [],
  2. bool debug = false,
  3. bool verbose = false,
  4. String socketURI = '/tmp/MPV_Dart.sock',
  5. bool audioOnly = false,
  6. bool autoRestart = true,
  7. int timeUpdate = 1,
  8. String? binary,
})

Implementation

MPVPlayer({
  this.mpvArgs = const [],
  this.debug = false,
  this.verbose = false,
  this.socketURI = '/tmp/MPV_Dart.sock',
  this.audioOnly = false,
  this.autoRestart = true,
  this.timeUpdate = 1,
  this.binary,
}) {
  socketURI =
      Platform.isWindows ? '\\\\.\\pipe\\mpvserver' : '/tmp/MPV_Dart.sock';

  mpvArgs = utils.mpvArguments(audioOnly, mpvArgs);

  socket = IPCInterface(debug: debug);

  _errorHandler = ErrorHandler();
}