晴川云百度小程序教程:swan.createVideoContext

  • swan.createVideoContext
    • 方法参数
      • 返回值
    • 示例
      • 图片示例
      • 代码示例

    swan.createVideoContext

    解释: 创建并返回 video 上下文 videoContext 对象。通过 videoId 跟一个 video 组件绑定,通过它可以操作一个 video 组件。

    方法参数

    String videoId

    返回值

    VideoContext

    示例

    跳转编辑工具

    在开发者工具中打开

    在 WEB IDE 中打开

    扫码体验

    代码示例

    请使用百度APP扫码

    图片示例

    代码示例

    • SWAN
    • JS
     
     
     
    1. <view class="wrap">
    2. <video id="myVideo" enable-danmu="true" src="https://b.bdstatic.com/swan-temp/940fe716b0eaad38f47b209d61657490.mp4"></video>
    3. </view>

    © 版权声明
    THE END
    喜欢就支持一下吧
    点赞0 分享
    评论 抢沙发

    请登录后发表评论

      暂无评论内容