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

[BUG] Video 组件的 controls 等属性无效 #17152

Open
BH4HPA opened this issue Jan 6, 2025 · 1 comment
Open

[BUG] Video 组件的 controls 等属性无效 #17152

BH4HPA opened this issue Jan 6, 2025 · 1 comment

Comments

@BH4HPA
Copy link
Contributor

BH4HPA commented Jan 6, 2025

相关平台

微信小程序

复现仓库

https://github.com/BH4HPA/taro-app-demo-video-component.git
小程序基础库: 3.7.2
使用框架: React

复现步骤

编译运行 可以直接重现

期望结果

视频不应该出现控制栏

微信小程序原生代码编译结果
微信小程序原生代码编译结果

实际结果

视频出现了控制栏

Taro React 编译结果
Taro React 编译结果

环境信息

👽 Taro v4.0.8


  Taro CLI 4.0.8 environment info:
    System:
      OS: macOS 15.1.1
      Shell: 5.9 - /bin/zsh
    Binaries:
      Node: 18.19.1 - /var/folders/d1/hzt03c6n11j9v2q90ly1f8gc0000gn/T/yarn--1736137412554-0.8936156426031014/node
      Yarn: 1.22.22 - /var/folders/d1/hzt03c6n11j9v2q90ly1f8gc0000gn/T/yarn--1736137412554-0.8936156426031014/yarn
      npm: 10.2.4 - ~/.nvm/versions/node/v18.19.1/bin/npm
    npmPackages:
      @tarojs/cli: 4.0.8 => 4.0.8 
      @tarojs/components: 4.0.8 => 4.0.8 
      @tarojs/helper: 4.0.8 => 4.0.8 
      @tarojs/plugin-framework-react: 4.0.8 => 4.0.8 
      @tarojs/plugin-platform-alipay: 4.0.8 => 4.0.8 
      @tarojs/plugin-platform-h5: 4.0.8 => 4.0.8 
      @tarojs/plugin-platform-harmony-hybrid: 4.0.8 => 4.0.8 
      @tarojs/plugin-platform-jd: 4.0.8 => 4.0.8 
      @tarojs/plugin-platform-qq: 4.0.8 => 4.0.8 
      @tarojs/plugin-platform-swan: 4.0.8 => 4.0.8 
      @tarojs/plugin-platform-tt: 4.0.8 => 4.0.8 
      @tarojs/plugin-platform-weapp: 4.0.8 => 4.0.8 
      @tarojs/react: 4.0.8 => 4.0.8 
      @tarojs/runtime: 4.0.8 => 4.0.8 
      @tarojs/shared: 4.0.8 => 4.0.8 
      @tarojs/taro: 4.0.8 => 4.0.8 
      @tarojs/taro-loader: 4.0.8 => 4.0.8 
      @tarojs/webpack5-runner: 4.0.8 => 4.0.8 
      babel-preset-taro: 4.0.8 => 4.0.8 
      eslint-config-taro: 4.0.8 => 4.0.8 
      react: ^18.0.0 => 18.3.1 
@BH4HPA
Copy link
Contributor Author

BH4HPA commented Jan 6, 2025

#16903 提及的方法目前仍然可用。

$ yarn add @tarojs/plugin-inject

然后修改 ./cinfig/index.ts:L19 找到 plugins,加入以下配置(可以根据需要修改)

[
  '@tarojs/plugin-inject',
  {
    components: {
      Video: {
        /**
         * 临时解决taro bug
         * @fix https://github.com/NervJS/taro/issues/17152
         * @todo ldl remove
         */
        controls: false,
        pageGesture: false,
        showProgress: false,
        showFullscreenBtn: false,
        showPlayBtn: false,
        showCenterPlayBtn: false,
        enableProgressGesture: false,
        showMuteBtn: false,
        enablePlayGesture: false,
        vslideGesture: false,
        vslideGestureInFullscreen: false,
        showBottomProgress: false,
      },
    },
  },
];

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant