# Google Cloud Video Live Stream V1 Client - Class TextStream (1.4.0)

1.4.0 (latest) 1.3.2 1.2.1 1.1.3 1.0.0 0.7.5 0.6.2 0.5.0 0.4.2 0.3.2 0.2.6 Reference documentation and code samples for the Google Cloud Video Live Stream V1 Client class TextStream.

Encoding of a text stream. For example, closed captions or subtitles.

Generated from protobuf message `google.cloud.video.livestream.v1.TextStream`

## Namespace

Google \\ Cloud \\ Video \\ LiveStream \\ V1

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ codec` | `string` Required. The codec for this text stream. Supported text codecs: - `cea608` - `cea708` - `webvtt` |
| `↳ language_code` | `string` Optional. The BCP-47 language code, such as `en-US` or `sr-Latn`. For more information, see <https://www.unicode.org/reports/tr35/#Unicode_locale_identifier>. |
| `↳ display_name` | `string` Optional. The name for this particular text stream that will be added to the HLS/DASH manifest. |
| `↳ output_cea_channel` | `string` Optional. The channel of the closed caption in the output stream. This field should only be set when textstream is used for partner distribution. Must be one of `CC1`, `CC2`, `CC3`, and `CC4`, if the [codec](https://docs.cloud.google.com/php/docs/reference/cloud-video-live-stream/latest/V1.TextStream#_Google_Cloud_Video_LiveStream_V1_TextStream__getCodec__) is `cea608`; Must be one between `SERVICE1` and `SERVICE63`, if the [codec](https://docs.cloud.google.com/php/docs/reference/cloud-video-live-stream/latest/V1.TextStream#_Google_Cloud_Video_LiveStream_V1_TextStream__getCodec__) is `cea708`. |
| `↳ mapping` | `array<https://docs.cloud.google.com/php/docs/reference/cloud-video-live-stream/latest/V1.TextStream.TextMapping>` Optional. The mapping for the input streams and text tracks. |

### getCodec

Required. The codec for this text stream.

Supported text codecs:

- `cea608`
- `cea708`
- `webvtt`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `string` |   |

### setCodec

Required. The codec for this text stream.

Supported text codecs:

- `cea608`
- `cea708`
- `webvtt`

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `string` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getLanguageCode

Optional. The BCP-47 language code, such as `en-US` or `sr-Latn`. For more
information, see
<https://www.unicode.org/reports/tr35/#Unicode_locale_identifier>.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `string` |   |

### setLanguageCode

Optional. The BCP-47 language code, such as `en-US` or `sr-Latn`. For more
information, see
<https://www.unicode.org/reports/tr35/#Unicode_locale_identifier>.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `string` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getDisplayName

Optional. The name for this particular text stream that will be added to
the HLS/DASH manifest.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `string` |   |

### setDisplayName

Optional. The name for this particular text stream that will be added to
the HLS/DASH manifest.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `string` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getOutputCeaChannel

Optional. The channel of the closed caption in the output stream.

This field should only be set when textstream is used for partner
distribution.
Must be one of `CC1`, `CC2`, `CC3`, and `CC4`, if the
[codec](https://docs.cloud.google.com/php/docs/reference/cloud-video-live-stream/latest/V1.TextStream#_Google_Cloud_Video_LiveStream_V1_TextStream__getCodec__) is `cea608`;
Must be one between `SERVICE1` and `SERVICE63`, if the
[codec](https://docs.cloud.google.com/php/docs/reference/cloud-video-live-stream/latest/V1.TextStream#_Google_Cloud_Video_LiveStream_V1_TextStream__getCodec__) is `cea708`.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `string` |   |

### setOutputCeaChannel

Optional. The channel of the closed caption in the output stream.

This field should only be set when textstream is used for partner
distribution.
Must be one of `CC1`, `CC2`, `CC3`, and `CC4`, if the
[codec](https://docs.cloud.google.com/php/docs/reference/cloud-video-live-stream/latest/V1.TextStream#_Google_Cloud_Video_LiveStream_V1_TextStream__getCodec__) is `cea608`;
Must be one between `SERVICE1` and `SERVICE63`, if the
[codec](https://docs.cloud.google.com/php/docs/reference/cloud-video-live-stream/latest/V1.TextStream#_Google_Cloud_Video_LiveStream_V1_TextStream__getCodec__) is `cea708`.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `string` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getMapping

Optional. The mapping for the input streams and text tracks.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/RepeatedField<https://docs.cloud.google.com/php/docs/reference/cloud-video-live-stream/latest/V1.TextStream.TextMapping>` |   |

### setMapping

Optional. The mapping for the input streams and text tracks.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `array<https://docs.cloud.google.com/php/docs/reference/cloud-video-live-stream/latest/V1.TextStream.TextMapping>` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |