How can I properly limit media loop for a video?

Hello, I need help with 2 issues that I don’t know how to do right, first, it’s to get the loop index for all media (image, video, external video, 3D)

the second one is how to limit the loop for the first one when we use media for the video only

// First Issue
// I want to get index for each image, videos, exernal_video and model by 1, 2, 3, 4, 5, 6, 7, 8.... by order

// Second Issue
{% for media in product.media %}
{% case media.media_type %}
{% when 'image' %}
// All images
{% when 'video' %}
// How to get only first video?
{% when 'external_video' %}
// ...
{% when 'model' %}
// ...
{% endcase %}
{% endfor %}

Website: https://www.topbrighttoys.com/products/120519g

Would https://shopify.github.io/liquid/tags/iteration/ be of any use?

A bit late here, but

{% break %} works perfectly.