# Vimeo Plugin get duration of a video on page load

**URL:** https://community.weweb.io/t/vimeo-plugin-get-duration-of-a-video-on-page-load/7252
**Category:** Tips and Hacks
**Created:** [February 25, 2024, 4:26pm UTC](https://community.weweb.io/t/vimeo-plugin-get-duration-of-a-video-on-page-load/7252 "2024-02-25T16:26:46Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![ReadyDev](https://avatars.discourse-cdn.com/v4/letter/r/94ad74/32.png) [@ReadyDev](https://community.weweb.io/u/ReadyDev)
#### Post date: [February 25, 2024, 4:26pm UTC](https://community.weweb.io/t/vimeo-plugin-get-duration-of-a-video-on-page-load/7252/1 "2024-02-25T16:26:46Z")

</div>

H, i am using the Vimeo plugin from weweb. How do I get a duration of a video when running an on-play workflow? or even on load. The idea is to subtract the duration from currentPlaying time and to save this to xano. Example:  
Users navigate to the video page =\> onPageLoad workflow (variable videoCompleted= getDuration() - 1500 milliseconds)

User press play =\> run a workflow  
onPlay =\> if check {currentTime = videoCompleted ) =\> api call to xano update cell for completed\_video}

---

<div class="post-metadata">

### Author: ![luka](https://sea2.discourse-cdn.com/flex016/user_avatar/community.weweb.io/luka/32/1571_2.png) [@luka](https://community.weweb.io/u/luka)
#### Post date: [February 26, 2024, 9:36am UTC](https://community.weweb.io/t/vimeo-plugin-get-duration-of-a-video-on-page-load/7252/2 "2024-02-26T09:36:59Z")

</div>

![image](https://us1.discourse-cdn.com/flex016/uploads/weweb/original/2X/b/bb7c8cbd822d3b8ce0feb0bec050c202f78a41e7.png)

You have access to the time of the vimeo video in the variables and also you have the On end trigger of the workflow on the video to do anything after the user has finished watching the video

---

<div class="post-metadata">

### Author: ![ReadyDev](https://avatars.discourse-cdn.com/v4/letter/r/94ad74/32.png) [@ReadyDev](https://community.weweb.io/u/ReadyDev)
#### Post date: [February 26, 2024, 3:44pm UTC](https://community.weweb.io/t/vimeo-plugin-get-duration-of-a-video-on-page-load/7252/3 "2024-02-26T15:44:57Z")

</div>

Thank you for the replay. However, 90% of users don’t look last 15 to 30 seconds of the video. I need a way to subtract the end time by a value of 15s to run an API call to Xano that the user has finished that video.

---

<div class="post-metadata">

### Author: ![luka](https://sea2.discourse-cdn.com/flex016/user_avatar/community.weweb.io/luka/32/1571_2.png) [@luka](https://community.weweb.io/u/luka)
#### Post date: [February 26, 2024, 4:17pm UTC](https://community.weweb.io/t/vimeo-plugin-get-duration-of-a-video-on-page-load/7252/4 "2024-02-26T16:17:35Z")

</div>

You can add a workflow on page unload to check for the time and send a request if its completed

---

<div class="post-metadata">

### Author: ![ReadyDev](https://avatars.discourse-cdn.com/v4/letter/r/94ad74/32.png) [@ReadyDev](https://community.weweb.io/u/ReadyDev)
#### Post date: [February 28, 2024, 4:06am UTC](https://community.weweb.io/t/vimeo-plugin-get-duration-of-a-video-on-page-load/7252/5 "2024-02-28T04:06:59Z")

</div>

Thank you for the replay but as said users can go to a next video 20s before end or 10s before end i know that vimeo has a duration of the video in their API example player.getDuration().then({})  
i also see that on github in weweb vue config there is also duration but its not accessible in the editor

> **[Screenshot](https://prnt.sc/3kzxUNIExWhy)**
>
> Captured with Lightshot

---

<div class="post-metadata">

### Author: ![luka](https://sea2.discourse-cdn.com/flex016/user_avatar/community.weweb.io/luka/32/1571_2.png) [@luka](https://community.weweb.io/u/luka)
#### Post date: [February 28, 2024, 11:06am UTC](https://community.weweb.io/t/vimeo-plugin-get-duration-of-a-video-on-page-load/7252/6 "2024-02-28T11:06:15Z")

</div>

Fair enough, I will create a product ticket internally to expose this duration. However, I’m not sure when you should expect this to be added as our roadmap is very busy at the moment with new features
