Execute shortcode only once in the page

Set a flag like $already_run to static and give it an initial value false. Then check if that value is true. If not, do the one-time thing and then set $already_run to true. The next time this function is called, it will not re-assign the static property, but will instead use the value set at end of code. So it will skip second and subsequent calls.

function foo_add_player($atts) {
    static $already_run = false;
    if ( $already_run !== true ) {
        // do stuff here
    }
    $already_run = true;
}