The Electric Book template includes an include tag for easily inserting YouTube videos. (Other services may be supported in future.) The Electric Book guide provides more detail on how that’s done.

Here’s a video that only appears in the web version.

In epub output, authors may choose to replace video with a link to watch the video online. Video iframes won’t validate in EPUB2.