# 유튜브 연동

#### 유튜브 동영상 주소 입력

<figure><img src="/files/m6iD31KbolPYh5CktgPW" alt=""><figcaption></figcaption></figure>

Flutter 앱에서 유튜브 동영상을 재생하려면 `flutter_youtube_player` 패키지를 사용합니다. 이 패키지는 유튜브 동영상을 간단하게 플레이할 수 있도록 도와줍니다.&#x20;

![](/files/3UBH5e4lgvZNXCk270nM)![](/files/T3RxYl4Vse1pML7ObpdJ)

### 코드 예시

```dart
 FlutterYoutubePlayer(
              textEditingController: TextEditingController(
    text: 'https://www.youtube.com/watch?v=4AoFA19gbLo' ),
              videoId: "4AoFA19gbLo",
              youtubeUrl: "https://www.youtube.com/watch?v=4AoFA19gbLo",
            );
```

* text : 사용자가 동영상 주소를 입력하기 전 기본 Youtube URL 입니다.&#x20;
* videoId : 사용자가 입력한 동영상 주소를 입력받기 전 기본 Video ID 입니다.
* youtubeUrl : 사용자가 입력한 동영상 주소를 입력받기 전 기본 Youtube URL 입니다.&#x20;

이 가이드에서는 Flutter를 사용하여 유튜브 동영상을 효과적으로 재생하고 관리하는 방법을 설명했습니다. 사용자가 유튜브 URL을 입력하면 Video ID가 추출되어 동영상을 편리하게 재생할 수 있습니다. 이를 통해 Flutter 앱에서 유튜브 동영상을 쉽게 플레이할 수 있습니다. 유용한 동영상 관리 도구를 사용하여 앱을 더욱 풍부하게 만들어보세요.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://developer.aliothx.net/start/option/index/youtube-player.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
