I’m not sure you actually used the html
inside php
like you have in the bottom of the question, but do try as below.
<?php
if( echo do_shortcode('[passster password="123456"]'); ):
?>
<!--<hide content>-->
<ul class="TPlayerNv">
<?php echo $optplayer; ?>
</ul>
<div class="TPlayerCn BgA">
<div class="EcBgA" style="background-color:#EEEEEE!important;">
<div class="TPlayer">
<?php echo $player; ?>
<span class="AAIco-lightbulb_outline lgtbx-lnk"></span>
</div>
</div>
</div>
<span class="lgtbx"></span>
<!--</hide content>-->
<?php echo do_shortcode('[/passster]') endif; ?>
Update: Since I couldn’t find anything related to this on your plugin’s documentation, give following methods a try if above is not working
<?php if( echo do_shortcode('[passster password="123456"]') ): ?>
content here
<?php echo do_shortcode('[/passster]'); endif; ?>
or
<?php
$scode="[passster password="123456"]";
if ( shortcode_exists( $scode ) ): ?>
content here
<?php echo do_shortcode('[/passster]'); endif; ?>