rewrote play function to emit only on device selection