added logic to stop media stream on teardown of MediaCapture