# `Mediasoup.DataProducer`
[🔗](https://github.com/oviceinc/mediasoup-elixir/blob/main/lib/data_producer.ex#L1)

https://mediasoup.org/documentation/v3/mediasoup/api/#DataProducer

# `dataProducerType`

```elixir
@type dataProducerType() :: String.t()
```

https://mediasoup.org/documentation/v3/mediasoup/api/#dataProducer-type
 "sctp" or "direct"

# `event_type`

```elixir
@type event_type() :: :on_close
```

# `sctpStreamParameters`

```elixir
@type sctpStreamParameters() :: map()
```

# `t`

```elixir
@type t() :: %Mediasoup.DataProducer{
  id: String.t(),
  pid: pid(),
  sctp_stream_parameters: sctpStreamParameters(),
  type: dataProducerType()
}
```

# `child_spec`

Returns a specification to start this module under a supervisor.

See `Supervisor`.

# `close`

```elixir
@spec close(t()) :: :ok
```

# `closed?`

```elixir
@spec closed?(t()) :: boolean()
```

# `event`

```elixir
@spec event(t(), pid(), event_types :: [event_type()]) ::
  {:ok} | {:error, :terminated}
```

# `id`

```elixir
@spec id(t()) :: String.t()
```

# `sctp_stream_parameters`

```elixir
@spec sctp_stream_parameters(t()) :: sctpStreamParameters()
```

# `start_link`

# `struct_from_pid`

```elixir
@spec struct_from_pid(pid()) :: t()
```

# `struct_from_pid_and_ref`

# `type`

```elixir
@spec type(t()) :: dataProducerType()
```

---

*Consult [api-reference.md](api-reference.md) for complete listing*
