Unexpected video type when using video() helper inside e() helper

I’m using the Builder plugin and have a block called “video” in a blueprint like this:

layout:
  label: Main Content
  type: builder
  fieldsets:
    video:
      name: Video
      fields:
        v_type:
          label: Select Video Type
          type: radio
          options:
            internal: Self-hosted video
            external: Video from YouTube or Vimeo
        v_file:
          label: Video file
          type: files
          max: 1
          layout: cards
          multiple: false
          query: page.videos
          when:
            v_type: internal
        v_url:
          type: url
          label: Video URL
          when:
            v_type: external

In my block template I have this code

$external = $data->v_url()->escape();
e($external->isNotEmpty(),video($external,[],[
	'width'=>'560',
	'height'=>'315',
	'frameborder'=>"0",
	'allow'=>"accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture"]
));

Why is it that whenever I use the e() helper I’m getting the exception “Unexpected video type” if I’m adding video blocks with self-hosted videos instead of URLs but when I’m doing

$external = $data->v_url()->escape();
if($external->isNotEmpty()):
	echo(video($external,[],[
		'width'=>'560',
		'height'=>'315',
		'frameborder'=>"0",
		'allow'=>"accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture"]
	));
endif;

it works (i. e. no exception)?

The e() method does not work like if() clause.
You get this error because all the parameters sent to the e() method have already run.
In if() clause, variables will only run when the conditions are met.

It is better to use the e() method for static and defined variables like that:

<div class="<?php echo e($page->hasImages(), 'col-md-6', 'col-md-12'); ?>">
...
...
...
</div>