Why can my phone interact with other devices wifi streaming? I've noticed today, that, if someone in my company is streaming music to our smartTV, my phone is able to interact with it and, for example, pause it or even fully stop it.

I don't know what causes this behaviour, even weirder, my colleague is casting using Spotify and I don't have Spotify on my device.

Needless to say we are using the same WI-FI. But, still, I can't figure out why I can access the stream.

Couldn't that even be a security flaw? 

Cordially,
Matthieu
Most likely the TV supports DLNA and provides the controls to any device in it's network. 

In your scenario there are three DLNA device roles:


The "Server" provides the audio/video stream (e.g. a NAS with a lot of files or as in your case a smart phone)
A "Renderer" (the TV) displays the data
One or many "Control Points" control what is displayed where and how


In conclusion what you have observed is simply a DLNA feature. It just means that multiple control points can be active at the same time. I think DLNA was just designed to work - security was not an objective - therefore it is not a security flaw, it is a feature...

BTW: TVs and DLNA are designed for end customers not for company networks, therefore they should always be separated into a restricted network section.