You need to do some homework
Video is generally encoded in YCbCr aka YUV, and is almost always done so using "limited range" 16-235 8 bit values (technically it's 16-240 for the chroma).
After decompressing the video, the player (really rendering engine inside the player of which there are many, see MadVR for an example) must convert the YUV back into RGB, since as you pointed out all monitors are actually RGB.
So, the player applies the appropriate matrix math to go from limited range YUV to full range RGB.