Best practice to caluclate GeoJson polygon of what the camera see's

Hi,

I need to calculate the map “extent” (part of the world that the player actually sees). What is the best approach for it?