Announcement: Tencent Cloud Mini Program Platform Renamed to Tencent Cloud Super App as a Service on January 2, 2025
Console Updates
Android SDK Updates
iOS SDK Updates
Flutter SDK Updates
IDE Updates
Base Library Updates
<view class="wrap"><view class="card-area"><view class="top-description border-bottom"><view>Feature</view><view>play pause seek</view></view><view class="video-area"><animation-videoid="myAnimationVideo"path="{{leftAlphaSrcPath}}"loop="{{loop}}"resource-width="800"resource-height="400"canvas-style="width:200px;height:200px"autoplay="{{autoplay}}"bindstarted="onStarted"bindended="onEnded"></animation-video></view><button bindtap="play">Play</button><button bindtap="pause">Pause</button><button bindtap="seek">Navigate to the 2-second mark of the animation.</button></view></view>
Page({onLoad() {this.createCtx();},createCtx() {this.myAnimationVideo = wx.createAnimationVideoContext('my-video');},play() {this.myAnimationVideo?.play();},pause() {this.myAnimationVideo?.pause();},seek() {this.myAnimationVideo?.seek(2);},})
This method is used via AnimationVideoContext.play().
This method is used via AnimationVideoContext.pause().
This method is used via AnimationVideoContext.seek(number position).
Was this page helpful?
You can also Contact sales or Submit a Ticket for help.
Help us improve! Rate your documentation experience in 5 mins.
Feedback