Skip to content

Video controls never shown when controlsVisible is false #2289

@cpetrov

Description

@cpetrov

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);

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions