UCLALibrary / ucla-library-website-components

This is a library of Vue components that will be used in UCLA Library Nuxt websites.
Other
4 stars 1 forks source link

Component Request - VideoEmbed - {x}hrs #536

Open pghorpade opened 3 days ago

pghorpade commented 3 days ago

Component Description

This new component is used in the screening block on Event detail page to display embedded video from craft cms content. The Embed HTML iframe src will be extracted from Craft trailer field

Design

Please also see attached screenshots for quick reference.

If no mobile designs provided, please use your best judgment for responsiveness.

Slots

Name and description of any slots needed.

Props

props: {

    trailer: {
        type: String,
        default: ""
    },

}

Developer Tips

List any developer tips here

  1. FTVA craft example https://test-craft.library.ucla.edu/admin/entries/ftvaEvent/2847944-la-r%C3%A9gion-centrale-03-08-24
  2. image

  3. There will pareseTrailer computed method to parse src from this craft data
          "trailer": "<figure><iframe width=\"560\" height=\"315\" src=\"https://www.youtube.com/embed/uYr_SvIKKuI?si=ihenbmyE91KqyXK5\" title=\"YouTube video player\" frameborder=\"0\"></iframe></figure>"
  4. This is Codepen code link thank you @axamei
  5. Update ResponsiveVideo to have this component as a named slot for ftva variation

Events

No events emitted

Child components

List out any components that are used by this new component. For example, if you are building a grid that is made up of block components.

no child components needed

Screenshots

image

image