Skip to content

This tutorial code shows how to embed YouTube, Vimeo and self-hosted videos in HTML pages, customize them and control them via JavaScript.

License

Notifications You must be signed in to change notification settings

edonosotti/smarter-video-embeds-tutorial

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

codebeat badge

Smartify Your Video Embeds - Tutorial

This tutorial shows how to:

  • embed externally hosted videos (on YouTube and Vimeo) into HTML pages
  • embed self-hosted hosted videos into HTML pages
  • make the embeds responsive with CSS or JS
  • use custom cover images on all kinds of videos
  • change resolution depending on the device screen size
  • set video options
  • use JavaScript to control videos

Code

See:

and check the comments in the files.

Open in JSFiddle

Reference documentation

See:

Kudos

This demo uses code and assets from:

External videos are randomly picked from YouTube and Vimeo and were publicly available at the time of writing. Cover images are picked from Unsplash and served by Lorem Picsum. Some videos are picked from Pexels.

Code has been built on JSFiddle, hosting for the demo files is provided by GitHub Pages.

About

This tutorial code shows how to embed YouTube, Vimeo and self-hosted videos in HTML pages, customize them and control them via JavaScript.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published