Sensors like a Kinect can already detect your heart rate and general mood. Putting those into laptops and monitors isn’t really a stretch any more. So it’s reasonable to think anything with a set of sensors can figure out how you’re feeling.
We’re about to get into eye tracking as an input method for consumers, so that basically gives all the sensors needed as well, and an excuse to turn them on. You don’t want to have to use a mouse, like some dinosaur, do you? ~
Then it’s really just classifying and routing the ads, which has been refined for decades. I’m pretty sure that’s not going to slow anyone down.
That’s all a long, drawn out, way to say it’s probably already being worked on, and isn’t even considered difficult.
The hurdle right now is just making the tech needed common enough for advertisers to care and pay more for that data.