# `Membrane.Realtimer`
[🔗](https://github.com/membraneframework/membrane_realtimer_plugin/blob/v0.11.1/lib/membrane/realtimer.ex#L1)

Sends buffers to the output in real time, according to buffers' timestamps.

If buffers come in slower than realtime, they're sent as they come in.

It can be reset by sending `%Membrane.Realtimer.Events.Reset{}` event on its input pad.

## Element options

Passed via struct `t:Membrane.Realtimer.t/0`

- `max_latency`  

  ```
  Time.non_neg()
  ```
  
  Default value: `0 |> Membrane.Time.days()`  
  This element will keep a part of the stream, of duration specified by this option,
  buffered. The purpose of this it to handle cases where the incoming stream can get
  lagged, for example when an element up the pipeline can get held up for some time
  and then produce all the "late" media at once. The buffered stream gives Realtimer some
  margin in waiting for this "late" media, so that the outgoing stream is still smooth.
  The initial accumulation of the buffer can introduce some latency, especially when
  the input stream is in realtime, but it will never exceed the amount provided via this
  option.

## Pads

### `:input`

Accepted formats:
```
_any
```

Direction: | `:input`
Availability: | `:always`
Flow control: | `:manual`
Demand unit: | `:buffers`

### `:output`

Accepted formats:
```
_any
```

Direction: | `:output`
Availability: | `:always`
Flow control: | `:push`

# `t`

```elixir
@type t() :: %Membrane.Realtimer{max_latency: Membrane.Time.non_neg()}
```

Struct containing options for `Membrane.Realtimer`

# `options`

```elixir
@spec options() :: keyword()
```

Returns description of options available for this module

---

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