Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Taro3.1.0 一个页面多个video标签,无法调用Taro.createVideoContext的播放、暂停方法 #12395

Open
LLLLLLLX opened this issue Aug 29, 2022 · 3 comments
Labels
F-react Framework - React T-weapp Target - 编译到微信小程序 V-3 Version - 3.x

Comments

@LLLLLLLX
Copy link

相关平台

微信小程序

小程序基础库: 2.25.2
使用框架: React

复现步骤

同一个页面应该多个video标签

期望结果

一个页面多个video标签,可以通过Taro.createVideoContext控制单个视频的播放和暂停

实际结果

Taro.createVideoContext的play()、pause()方法不起作用

环境信息

👽 Taro v3.4.11

publicPath:  undefined
PUBLIC_PATH:  "//test-hwc-gy1-bu-dx-bucket-deepexi.obs.cn-southwest-2.myhuaweicloud.com/dr-uat/mobile/code"

  Taro CLI 3.4.11 environment info:
    System:
      OS: Windows 10
    Binaries:
      Node: 14.16.0 - C:\Program Files\nodejs\node.EXE
      Yarn: 1.22.19 - C:\Users\12726\AppData\Roaming\npm\yarn.CMD
      npm: 6.14.11 - C:\Program Files\nodejs\npm.CMD
@taro-bot2 taro-bot2 bot added F-react Framework - React T-weapp Target - 编译到微信小程序 V-3 Version - 3.x labels Aug 29, 2022
@LLLLLLLX LLLLLLLX changed the title 一个页面多个video标签,无法调用Taro.createVideoContext的播放、暂停方法 Taro3.1.0 一个页面多个video标签,无法调用Taro.createVideoContext的播放、暂停方法 Aug 29, 2022
@Chen-jj
Copy link
Contributor

Chen-jj commented Sep 2, 2022

@LLLLLLLX 可以先在原生 demo 上试试是否 ok

@TheKonka
Copy link
Member

我试了 原生 和 Taro 项目 都支持的呢,虽然我的 taro 版本是最新版本,不过应该影响不大,要不你给个复现的 demo

@StephenWong88
Copy link

    在 tarojs 3.6.16版本上,遇到同样的问题。但我认为不是一个页面多个video标签导致的问题,而是video标签绑定动态ID时,即使一个页面就一个video标签也会出现无法控制的问题。
  单个video标签,使用video标签绑定静态ID,能正常调用video的方法。

<Video id={video_${id}} ... />
const videoContext = Taro.createVideoContext(video_${id}); videoContext.seek(30);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
F-react Framework - React T-weapp Target - 编译到微信小程序 V-3 Version - 3.x
Projects
None yet
Development

No branches or pull requests

4 participants