后浪云百度小程序教程:AnimationVideo

  • AnimationVideo
    • 示例
      • 图片示例
      • 代码示例

    AnimationVideo

    解释: swan.createAnimationVideo 的返回值,相关组件 animation-video 。
    Web 态说明:详见 animation-video 组件 Web 态说明。

    示例

    跳转编辑工具

    在开发者工具中打开

    在 WEB IDE 中打开

    扫码体验

    代码示例

    后浪云百度小程序教程:AnimationVideo插图

    请使用百度APP扫码

    图片示例

    后浪云百度小程序教程:AnimationVideo插图1

    代码示例

    • SWAN
    • JS
    • CSS
     
     
     
    1. <view class="wrap">
    2. <view class="card-area">
    3. <view class="video-area">
    4. <animation-video
    5. id="myAnimationVideo"
    6. path="{{path}}"
    7. loop="{{loop}}"
    8. resource-width="800"
    9. resource-height="400"
    10. canvas-style="width:200px;height:200px"
    11. autoplay="{{autoplay}}"
    12. bindstarted="started"
    13. bindended="ended"
    14. ></animation-video>
    15. </view>
    16. <button class="btn" type="primary" bindtap="changeStatus">{{status}}动画</button>
    17. <button class="btn" type="primary" bindtap="seek">跳转到动画2S处</button>
    18. </view>
    19. </view>
    THE END