I have a page with multiple videos using a HTML5 player and I would like to stop any video currently playing when:

1) user clicks text link with id = "close"
2) another video is clicked

How can I accomplish this using javascript?

Thank you