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

[TIMOB-25703] Android: Added VideoPlayer "showsControls" property #9770

Merged
merged 4 commits into from Feb 13, 2018

Conversation

jquick-axway
Copy link
Contributor

JIRA: https://jira.appcelerator.org/browse/TIMOB-25703

Summary:

  • This boolean property shows/hides the overlaid video player controls.
  • This is for parity with iOS, which added this property in Titanium 7.0.0.
  • Did not remove "mediaControlStyle" property (for backward compatibility reasons) which can show/hide controls as well via different style constants. If the new "showsControls" property is false, then it will always hide the controls, regardless what the media style is set to (takes priority).

Test:

  1. Build and run the below on an Android device.
  2. Wait for the video view to start playing. (Requires an Internet connection to stream video.)
  3. Tap on the video.
  4. Verify that the video controls are not shown when tapped.
var window = Ti.UI.createWindow({ fullscreen: true });
var videoView = Ti.Media.createVideoPlayer(
{
	url: "http://download.blender.org/peach/bigbuckbunny_movies/BigBuckBunny_640x360.m4v",
	autoplay: true,
	showsControls: false,
	scalingMode: Ti.Media.VIDEO_SCALING_ASPECT_FIT,
	width: Ti.UI.FILL,
	height: Ti.UI.FILL,
});
//videoView.showsControls = false;
window.add(videoView);
window.open();

@build
Copy link
Contributor

build commented Jan 25, 2018

Messages
📖

💾 Here's the generated SDK zipfile.

Generated by 🚫 dangerJS

@lokeshchdhry
Copy link
Contributor

FR Passed.

The new showsControls property works as expected.
Setting it to true shows the controls.
Setting it to false disables the controls.

Studio Ver: 5.0.0.201712081732
SDK Ver: 7.1.0 local build
OS Ver: 10.13.2
Xcode Ver: Xcode 9.2
Appc NPM: 4.2.12
Appc CLI: 7.0.2
Daemon Ver: 1.0.1
Ti CLI Ver: 5.0.14
Alloy Ver: 1.11.0
Node Ver: 8.9.1
NPM Ver: 5.5.1
Java Ver: 1.8.0_101
Devices: ⇨ google Nexus 6P --- Android 8.0.0
⇨ google Nexus 5 --- Android 6.0.1

@lokeshchdhry
Copy link
Contributor

@jquick-axway
Copy link
Contributor Author

Hmm... I didn't know we're linting unit test code now.
@hansemannn, thanks for taking care of that.

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

Successfully merging this pull request may close these issues.

None yet

4 participants