I like the idea of a polyfill function to check whether a stream is attached, that seems generally useful. 

Waiting for ICE to go connected before starting polling seems reasonable, but I think it may make things more complicated, since the state may change to disconnected and back to connected during the call.