I think the right thing to do is check remoteVideo.src != "", and have the apprtc code clear .src when shutting down.