@graffiti-garden/wrapper-vue
    Preparing search index...

    Function useGraffitiGetMedia

    • The Graffiti.getMedia method as a reactive composable for use in the Vue composition API.

      Its corresponding renderless component is GraffitiGetMedia.

      The arguments of this composable are the same as Graffiti.getMedia, only they can also be Refs or getters. As they change the output will automatically update. Reactivity only triggers when the root array or object changes, not when the elements or properties change. If you need deep reactivity, wrap your argument in a getter.

      Parameters

      • url: MaybeRefOrGetter<string>
      • accept: MaybeRefOrGetter<GraffitiMediaAccept>
      • Optionalsession: MaybeRefOrGetter<GraffitiSession | null | undefined>

      Returns {
          media: Ref<GraffitiMedia & { dataUrl: string } | null | undefined>;
          poll: () => Promise<void>;
      }

      • media: A ref that contains the retrieved Graffiti media, if it exists. The media will include a dataUrl property that can be used to directly display the media in a template. If the media has been deleted, the result is null. If the media is still being fetched, the result is undefined.
      • poll: A function that can be called to manually check if the media has changed.