There are two types of wireless speakers.
Stream audio from online music services like Spotify and TuneIn, control it via an app, use WiFi presets etc.
If you leave the room the speaker still plays.
All WiFi-speakers also has Bluetooth.
These speakers only uses Bluetooth, which is a direct connection between a transmitter (phone, tablet or computer) and the speaker.
You need to have the transmitter in the same room as the speaker. If you leave the room the speaker stops playing.