In order to loop over them and put them in the right order you will need 1 repeater.
Then you create a radio field to select media type, for example image or video.
Then you create a field for adding a video and set the conditional logic to only show when video is selected as media type and an image field that is only shown if image is selected.