Skip to content

Instantly share code, notes, and snippets.

@milon120203
Created November 14, 2019 15:32
Show Gist options
  • Save milon120203/48f9aad32be66b351e820960a55c5de5 to your computer and use it in GitHub Desktop.
Save milon120203/48f9aad32be66b351e820960a55c5de5 to your computer and use it in GitHub Desktop.
overlay for iOS app in Titanium.Media.VideoPlayer (code from Motiur Rahman)
var vidWin = Titanium.UI.createWindow({
title : 'Video View Demo',
backgroundColor : '#fff'
});
var videoPlayer = Titanium.Media.createVideoPlayer({
top : 2,
autoplay : false,
backgroundColor : 'blue',
height : 600,
overlayView : Ti.UI.createView({
backgroundImage : "motiur.jpeg",
width : 100,
height : 100,
borderRadius : 20,
borderWidth : 2,
borderColor : 'blue',
}),
width : Ti.UI.FILL,
mediaControlStyle : Titanium.Media.VIDEO_CONTROL_DEFAULT,
scalingMode : Titanium.Media.VIDEO_SCALING_ASPECT_FIT
});
videoPlayer.url = 'test.mp4';
vidWin.add(videoPlayer);
vidWin.open();
@milon120203
Copy link
Author

Tested on iPhone 5s, Xcode 11.2, Ti-SDK 8.2.1.GA
IMG_0897

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