Using the QVideo component makes embedding a video like YouTube easy. It also resizes to fit the container by default.
TIP
You may also want to check our own HTML 5 video player component: QMediaPlayer, which is far more advanced than QVideo (which essentially is an iframe pointing to embedded YouTube videos).
Usage
Basic
With aspect ratio
Markup equivalent
Accessibility v2.25+
The iframe’s accessible name comes from the title prop — always provide it, otherwise screen readers announce an anonymous frame with no way to tell what it embeds. Captions and player keyboard support are the embedded player’s responsibility, not QVideo’s.