This example shows how to use the Switch Tube embed library to add a video player inside an existing container element, and how to control playback. This is the preferred way to use the embed library from your JavaScript code.
The content of the container element will be replaced with an iframe that has its width and height set to 100%. Note that the CSS applied in this example is just one of the many ways in which the size and positioning of the embedded player can be controlled.