> For the complete documentation index, see [llms.txt](https://docs.fluidplayer.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.fluidplayer.com/portuguese/integracao/using-fluid-player-with-vue.js.md).

# Usar o Fluid Player com Vue.js

O Fluid Player funciona com Vue.js de imediato. Para começar a usar o Fluid Player no seu projeto Vue.js, será necessário:

* instalar o Fluid Player usando Yarn ou NPM, como descrito [aqui](/portuguese/integracao/quick-setup.md#integration-using-npm); e
* importar o módulo do Fluid Player e anexá-lo ao elemento de vídeo da sua escolha.

Pode ver um exemplo de como integrar o Fluid Player e o Vue.js no exemplo abaixo. Este é um exemplo simplificado para o ajudar a começar rapidamente. Siga as melhores práticas do Vue.js sobre como criar componentes reutilizáveis, dependendo das necessidades do seu projeto.

**IMPORTANTE:** a troca dinâmica de fontes não é suportada. É **necessário** recriar o componente OU recriar a instância do Fluid Player para alterar as fontes ou outras configurações do player.

```html
<template>
    <div class="fluid-component">
        <video ref="myVideoPlayer">
            <source src='https://cdn.fluidplayer.com/videos/valerian-1080p.mkv'
                    data-fluid-hd
                    title="1080p"
                    type='video/mp4'/>
        </video>
    </div>
</template>

<script>
    import fluidPlayer from 'fluid-player';

    export default {
        name: 'FluidPlayer',
        props: {},
        data() {
            return {
                player: null
            }
        },
        mounted() {
            this.player = fluidPlayer(this.$refs.myVideoPlayer);
        },
        destroyed() {
            if (!this.player) {
                return;
            }

            this.player.destroy();
        }
    }
</script>

<style>
    @import "fluid-player/src/css/fluidplayer.css";

    div.fluid-component, div.fluid-component > video {
        width: 100%;
        height: 100%;
    }
</style>
```

**Nota**: O Safari não suporta a reprodução de ficheiros .mkv. Para visualizar este tipo de ficheiro, considere usar um navegador diferente que suporte o formato .mkv.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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://docs.fluidplayer.com/portuguese/integracao/using-fluid-player-with-vue.js.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.
