big trouble with javascript

Relative URLs work nicely in wordpress, which is the reason for your failures. In general never use relative URLs for resources as they will most likely fail when a site is using “pretty permalinks”.

Best thing for what you are doing is to “group” the graphical resources and styling in a CSS (in which resources are relative to the CSS file and not the HTML URL).

The JS alternative is to store the root of the site/theme/plugin in a JS variable and use it to construct the URL. Followin code is to take site root into consideration, but you most likely will want theme or plugin root.

<script>
  var homeurl="<?php echo home_url()?>";
.....
  pauseImage = homeurl+"https://wordpress.stackexchange.com/questions/206957/images/play.png"; // url to your play image
</script>