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

Merged
merged 2 commits into from
Jun 15, 2024
Merged

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
@m1ga m1ga added the feature label May 23, 2024
@hansemannn hansemannn merged commit 7b9a4e9 into master Jun 15, 2024
8 checks passed
@m1ga m1ga deleted the androidPlaybackSpeed branch June 15, 2024 13:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants