Created
April 21, 2012 14:52
-
-
Save joshjensen/2437514 to your computer and use it in GitHub Desktop.
Video pops out of full screen when played inside a table row and rotated.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Video pops out of full screen when played inside a table row and rotated. | |
// Steps to replicate: | |
// 1. Wait for video to load. | |
// 2. Click to open full screen. | |
// 3. Rotate device. | |
// Video pops out of full screen mode. | |
var win = Ti.UI.createWindow({ | |
backgroundColor: '#fff', | |
orientationModes: [ | |
Titanium.UI.PORTRAIT, | |
Titanium.UI.UPSIDE_PORTRAIT, | |
Titanium.UI.LANDSCAPE_LEFT, | |
Titanium.UI.LANDSCAPE_RIGHT | |
] | |
}); | |
var tableView = Ti.UI.createTableView(); | |
win.add(tableView); | |
var row = Ti.UI.createTableViewRow({ | |
height: 'auto', | |
selectedBackgroundColor: '#fff' | |
}); | |
var videoPlayer = Titanium.Media.createVideoPlayer({ | |
url: 'http://vid.ly/3b1t5p', | |
top: 6, | |
autoplay : false, | |
backgroundColor : '#000', | |
height: 169, | |
width: 300, | |
allowsAirPlay: true, | |
mediaControlStyle:Titanium.Media.VIDEO_CONTROL_DEFAULT, | |
scalingMode:Titanium.Media.VIDEO_SCALING_ASPECT_FIT | |
}); | |
row.add(videoPlayer); | |
tableView.setData([row]); | |
win.open(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment