detect browser size and add play/pause buttons