Skip to content

Commit

Permalink
chore: maybe fix vimeo types
Browse files Browse the repository at this point in the history
  • Loading branch information
harlan-zw committed Sep 9, 2024
1 parent a00f753 commit 159fdcd
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/runtime/components/ScriptVimeoPlayer.vue
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,7 @@ const height = computed(() => {
})
onMounted(() => {
// @ts-ignore failing for end users
onLoaded(async ({ Vimeo }) => {
const vimeoOptions = props.vimeoOptions || {}
if (!vimeoOptions.id && props.id) {
Expand Down
3 changes: 2 additions & 1 deletion src/runtime/registry/vimeo-player.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { watch } from 'vue'
import type Vimeo from '@vimeo/player'
import type { UseScriptContext } from '@unhead/vue'
import { useRegistryScript } from '../utils'
import type { RegistryScriptInput } from '#nuxt-scripts'
import { useHead } from '#imports'
Expand All @@ -18,7 +19,7 @@ declare global {
interface Window extends VimeoPlayerApi {}
}

export function useScriptVimeoPlayer<T extends VimeoPlayerApi>(_options?: VimeoPlayerInput) {
export function useScriptVimeoPlayer<T extends VimeoPlayerApi>(_options?: VimeoPlayerInput): UseScriptContext<T> {
const instance = useRegistryScript<T>('vimeoPlayer', () => ({
scriptInput: {
src: 'https://player.vimeo.com/api/player.js',
Expand Down

0 comments on commit 159fdcd

Please sign in to comment.