<!--components/media-carousel/media-carousel.wxml-->
<view class="media-carousel">
  <swiper class="carousel-swiper" indicator-dots="{{showIndicator}}" indicator-color="{{indicatorColor}}" indicator-active-color="{{indicatorActiveColor}}" autoplay="{{autoplay}}" interval="{{interval}}" duration="{{duration}}" circular="{{circular}}">
    <swiper-item wx:for="{{mediaList}}" wx:key="index" class="carousel-item">
      <!-- 图片轮播 -->
      <view wx:if="{{item.type === 'image' && item.src}}" class="image-container">
        <image src="{{item.src}}" mode="aspectFit" class="carousel-image" />
      </view>

      <!-- 视频轮播 -->
      <view wx:if="{{item.type === 'video' && item.src}}" class="video-container">
        <video 
          src="{{item.src}}" 
          class="carousel-video" 
          controls="{{true}}" 
          object-fit="contain"
          bindfullscreenchange="onFullscreenChange"
        >
        </video>
      </view>
    </swiper-item>
  </swiper>
</view>