> **Experimental**
>
> `@aws-cdk/aws-mediaconnect-alpha` is an [**experimental**](/stability) (alpha) package: its API may change in any release, without a major version bump.
# FailoverConfig

Source failover configuration for a flow.

MediaConnect supports two failover modes:
- {@link FailoverConfig.merge} combines two binary-identical sources into a single
  stream, recovering lost packets from the other source (SMPTE 2022-7).
- {@link FailoverConfig.failover} switches between a primary and backup source when
  the active source stops receiving data.

- Stability: [Experimental](/cdk/api/stability.html)
- Source: [`lib/flow.ts`](https://github.com/aws/aws-cdk/blob/v2.276.0-alpha.0/packages/@aws-cdk/aws-mediaconnect-alpha/lib/flow.ts#L297)

## Example

```ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import * as mediaconnect_alpha from '@aws-cdk/aws-mediaconnect-alpha';
const failoverConfig = mediaconnect_alpha.FailoverConfig.failover(/* all optional props */ {
  primarySource: 'primarySource',
  state: mediaconnect_alpha.State.ENABLED,
});
```

## Methods

- `failover(options?: FailoverFailoverOptions): FailoverConfig // chainable` (static) — Configure switchover-mode failover.

  The flow swaps to the backup source when the
  primary source stops receiving data.

- `merge(options?: MergeFailoverOptions): FailoverConfig // chainable` (static) — Configure merge-mode failover.

  Requires two binary-identical sources.
