I am using a streaming video as a diffuse texture, and I’d like to detect when this video user is no longer streaming. When the stream is off, the video becomes a solid colour - (currently this is configured to be black, but could be any colour).
I’d like an efficient way of getting the current colour of the video texture over a small area such as 10x10 pixels, so I can detect if the video is streaming or not.
Ie, if the average colour is 0,0,0 then I know it’s currently off.
I’ve briefly looked into using readPixels on the diffuse texture but didn’t have much luck.
Does anyone have any suggestions?
Thanks,
Tom