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

Video controls never shown when controlsVisible is false #2289

Open
cpetrov opened this issue Mar 3, 2024 · 0 comments
Open

Video controls never shown when controlsVisible is false #2289

cpetrov opened this issue Mar 3, 2024 · 0 comments
Labels

Comments

@cpetrov
Copy link
Member

cpetrov commented Mar 3, 2024

Problem description

Previously, when controlsVisible was false, the controls appeared in an overlay when the user tapped on the video. In Tabris.js 3.9.0, the controls don't appear anymore upon tap. In the snippet below, tapping on the very center of the video pauses it though, which indicates that the controls are interactive, despite being invisible.

Expected behavior

When controlsVisible is false, either:

  • the video controls should appear when the video is tapped, or:
  • the user should not be able to interact with invisible video controls

Environment

  • Tabris.js version: 3.9.0
  • Device: iPhone
  • OS: 17.3.1

Code snippet

import {Button, contentView, Video} from 'tabris';

const button = new Button({
  id: 'button',
  centerX: 0, bottom: 16,
  text: '❚❚'
}).onSelect(() => video.state === 'play' ? video.pause() : video.play())
  .appendTo(contentView);

const video = new Video({
  left: 0, top: 0, right: 0, bottom: '#button 16',
  url: 'http://peach.themazzone.com/durian/movies/sintel-1280-stereo.mp4',
  controlsVisible: false
}).onStateChanged(({value: state}) => button.text = state !== 'pause' && state !== 'finish' ? '❚❚' : '▶')
  .appendTo(contentView);
@cpetrov cpetrov added the bug label Mar 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant