Coder Social home page Coder Social logo

Comments (15)

timmyomahony avatar timmyomahony commented on June 19, 2024 4

@pandalion here is my hack for getting this working in the meantime. I've created an event listener for "ready" that re-assigns the vimeo player instance:

<template>
  <vue-vimeo-player ref="player" video-url="..." :options="..." @ready="onReady" />
</template>

<script setup>
  import { vueVimeoPlayer } from 'vue-vimeo-player';
  
  const player = ref(null);

  const onReady = (_playerInstance) => {
    player.value.player = _playerInstance;
  }
</script>

from vue-vimeo-player.

dobromir-hristov avatar dobromir-hristov commented on June 19, 2024 3

I am extremely sorry, I totally forgot.... I will release this night.

from vue-vimeo-player.

pandalion avatar pandalion commented on June 19, 2024 2

Hi @dobromir-hristov - I have tried the new version and when I am logging this.$refs.vimeo.player I am still getting undefined for the player.

this.$refs.vimeo.pause() is working fine, and the rest of the player, but my problem is still when trying to use setCurrentTime().

Please could you advise if this is something I am doing wrong on my end? Does 1.1.2 work now for you @JamieNuom ?

Thank you :)

from vue-vimeo-player.

dobromir-hristov avatar dobromir-hristov commented on June 19, 2024 1

Published, sorry all. Try the latest next - 1.1.2

from vue-vimeo-player.

timmyomahony avatar timmyomahony commented on June 19, 2024 1

Also experiencing this with the composition API (using Vue 3 with 1.1.2):

<template>
  <vue-vimeo-player ref="player" video-url="..." :options="..." />
</template>

<script setup>
  import { vueVimeoPlayer } from 'vue-vimeo-player';
  
  const player = ref(null);

  // Works
  player.value.play();
  player.value.pause();

  // Is undefined
  player.value.player;
</script>

from vue-vimeo-player.

pandalion avatar pandalion commented on June 19, 2024 1

@timmyomahony thank you so much for that!

from vue-vimeo-player.

dobromir-hristov avatar dobromir-hristov commented on June 19, 2024

Hey, sorry for the long wait. Did you manage to figure it out?

from vue-vimeo-player.

nkeezer avatar nkeezer commented on June 19, 2024

Just chiming in to say that I'm experiencing the same issue with accessing the player and calling setCurrentTime().

from vue-vimeo-player.

dobromir-hristov avatar dobromir-hristov commented on June 19, 2024

I know why. We need to return the player from the setup function.

Anyone want to do a PR?

from vue-vimeo-player.

swilla avatar swilla commented on June 19, 2024

#88

from vue-vimeo-player.

PawDC avatar PawDC commented on June 19, 2024

Could this also be a reason why I don't see on method here:
Screenshot 2022-01-27 at 15 30 36

When I try to access it (same way I access play which works fine) it throws an error that on is not a function.

from vue-vimeo-player.

pandalion avatar pandalion commented on June 19, 2024

Do you know when this will be released to npm please? I also need to access the player object to call setCurrentTime

from vue-vimeo-player.

JamieNuom avatar JamieNuom commented on June 19, 2024

I am also waiting on this, can you update when released? Thanks!

from vue-vimeo-player.

pandalion avatar pandalion commented on June 19, 2024

Thank you @dobromir-hristov !

from vue-vimeo-player.

Joaojack avatar Joaojack commented on June 19, 2024

const onReady = (_playerInstance) => {
player.value.player = _playerInstance;
}

you saved me man ;)

from vue-vimeo-player.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.