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

feat(android): videoPlayer speed property #14006

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Conversation

m1ga
Copy link
Contributor

@m1ga m1ga commented Mar 15, 2024

New property to adjust the playback speed in a VideoPlayer.

Test

Add a video video.mp4 to the assets folder.

var vidWin = Titanium.UI.createWindow({
    title: 'Video View Demo',
    backgroundColor: '#fff'
});

var videoPlayer = Titanium.Media.createVideoPlayer({
    top: 2,
    autoplay: true,
    backgroundColor: 'blue',
    height: 300,
    width: 300,
    speed: 0.5,                 // <------------- new
    url: "./video.mp4",
    mediaControlStyle: Titanium.Media.VIDEO_CONTROL_DEFAULT,
    scalingMode: Titanium.Media.VIDEO_SCALING_RESIZE_ASPECT
});

var videoPlayer2 = Titanium.Media.createVideoPlayer({
    top: 304,
    autoplay: true,
    backgroundColor: 'blue',
    height: 300,
    width: 300,
    speed: 2,                  // <------------- new
    url: "./video.mp4",
    mediaControlStyle: Titanium.Media.VIDEO_CONTROL_DEFAULT,
    scalingMode: Titanium.Media.VIDEO_SCALING_RESIZE_ASPECT
});

vidWin.add(videoPlayer);
vidWin.add(videoPlayer2);
vidWin.open();

@m1ga m1ga marked this pull request as ready for review March 19, 2024 11:17
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

Successfully merging this pull request may close these issues.

None yet

1 participant