markcellus / youtube-video-js

A light-weight web component for YouTube videos
MIT License
47 stars 17 forks source link

Make sizes strings so caller can can use percentages #609

Open pureooze opened 1 year ago

pureooze commented 1 year ago

This change lets callers use percentages for height and width so they can dynamically resize for different screen sizes.

Example:

// using percentages
<youtube-video height="100%" width="100%" src="..." controls></youtube-video>

// using exact values
<youtube-video height="800" width="500" src="..." controls></youtube-video>