Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Autoplay feature? #6

Open
sebastianvitterso opened this issue Jan 17, 2022 · 3 comments
Open

Autoplay feature? #6

sebastianvitterso opened this issue Jan 17, 2022 · 3 comments

Comments

@sebastianvitterso
Copy link

Would you mind adding an autoplay feature?

We're considering using your component in a setting where autoplay is preferrable, but due to Chrome's (and most other browsers') new demands to not autoplay on pages where the user hasn't interacted, we'll need a nice-looking non-autoplay look as well. Yours seems to solve this.

@wobsoriano
Copy link
Owner

Not able to add this feature :( but in the meantime, you can manualy call warmConnections and addIframe methods on your end:

<script setup>
import { ref } from 'vue'
import LiteYouTubeEmbed from 'vue-lite-youtube-embed'
import 'vue-lite-youtube-embed/style.css'

const iframe = ref(null)

onMounted(() => {
  iframe.value.warmConnections()
  iframe.value.addIframe()
})
</script>

<template>
  <LiteYouTubeEmbed
    id="dQw4w9WgXcQ"
    ref="iframe"
    title="Rick Astley - Never Gonna Give You Up (Official Music Video)"
  />
</template>

@kendrick-fnw
Copy link

kendrick-fnw commented Feb 7, 2023 via email

@NicoIsapro
Copy link

Hey wobsoriano, I was looking for this feature too, the solution you provided works but when you say "Not able to add this feature" do you mean that its not possible code-side or that you don't have time to implement it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants