We propose a novel type of composite light-matter magnetometer based on a transversely driven multi-component Bose-Einstein condensate coupled to two distinct electromagnetic modes of a linear cavity. Above the critical pump strength, the change of the population imbalance of the condensate caused by an external magnetic field entails the change of relative photon number of the two cavity modes. Monitoring the cavity output fields thus allows for nondestructive measurement of the magnetic field in real time. We show that the sensitivity of the proposed magnetometer exhibits Heisenberg-like scaling with respect to the atom number. For state-of-the-art experimental parameters, we calculate the lower bound on the sensitivity of such a magnetometer to be of the order of fT/$sqrt{mathrm{Hz}}$--pT/$sqrt{mathrm{Hz}}$ for a condensate of $10^4$ atoms with coherence times of the order of several ms.