Somehow this is becoming the new annoying trend. Or, maybe, it's just me who is becoming more sensitive to it each year. But is it allowed to listen to audio through loudspeaker from phones, tablets or laptops in a flight? Do some airlines (I wonder specifically in the EU, but probably it's a global thing) have explicit regulations that are applied systematically to avoid this? I ask specifically about flights, because you are somehow stuck there for some hours. But, obviously, it also happens in lounges, buses and so on. What is the MO? Ask politely the person to stop, ask the steward?
Most (if not all) airlines will have either rules or policies that headphones are to be used whenever using such devices on board.
Exactly where these rules/policies are stated will depend on the airline, however as an example, United Airlines states the following in their "Hemisphere" magazine that can be found on all flights :
Portable electronic device policy
All devices must be used with the sound off or with headphones at all times
As with all such rules, it is not down to other passengers to enforce them. Whilst there's nothing wrong with asking another passenger to put on headphones or turn the sound down, if they don't comply then simply bring it to the attention of the flight attendants who will be aware of the airlines specific policies, and will almost certainly ask the other passenger to stop the noise.
Areas like Lounges and even the general airport are a different situation. Again, the lounge may have policies around noise, but it's probably going to be less likely than in-flight. Thankfully in a lounge you may have the option of moving to get away from the other person - although again talking to the lounge staff may be the best option to at least confirm with the lounges policy is.