Pause content slider when out of viewport

I have a content slider module as a header on a page. The height responds to the content, and I would prefer not to use the minimum height as the content varies too much from slide to slide.

What I am looking for is a way to pause when someone has scrolled pause it so it doesn’t continue to move content below it.