[TIMOB-10129] Android: VideoPlayer: Application crashes when videos on multiple views of scrollableview
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | High |
Status | Closed |
Resolution | Duplicate |
Resolution Date | 2014-02-21T14:31:22.000+0000 |
Affected Version/s | Release 2.1.1, Release 3.1.0 |
Fix Version/s | n/a |
Components | Android |
Labels | api, qe-and070112 |
Reporter | Neha Chhabra |
Assignee | Sunila |
Created | 2012-07-25T05:58:26.000+0000 |
Updated | 2014-07-17T10:12:03.000+0000 |
Description
On Android platform, the application crashes when videos on multiple views of scrollableview.
This is not a regression. It even occurs on 2.1.0
Steps to Reproduce:
1. Install and launch the application on to the android device.
2. Scroll to any view.
Expected Result:
1. A scrollable view is shown with first view as the current view. A video start playing when application opens
2. The video starts playing in that view. On scrolling to any view the video plays from the start.
Actual result:
The application crashes when scrolled to the other view.find attached the log.txt (This works fine on iOS)
var _window= Ti.UI.createWindow();
_window.backgroundColor='white';
_window.orientationModes=[Ti.UI.PORTRAIT,Ti.UI.LANDSCAPE_LEFT,Ti.UI.LANDSCAPE_RIGHT];
var videoParams = {
mediaControlStyle: Titanium.Media.VIDEO_CONTROL_EMBEDDED,
scalingMode: Ti.Media.VIDEO_SCALING_ASPECT_FIT,
height: '72%'
};
var videoViews = [];
var curVideo = null;
for(var i=0; i<7; i++){
videoViews.push(Ti.Media.createVideoPlayer(videoParams));
}
var scrollableView = Ti.UI.createScrollableView({
views: videoViews,
showPagingControl: true
});
scrollableView.addEventListener('scrollEnd', function(e){
if (curVideo)
{
if (curVideo == videoViews[e.currentPage])
{
return;
}
curVideo.stop();
curVideo.url = null;
}
curVideo = videoViews[e.currentPage];
curVideo.url = 'movie.mp4';
curVideo.play();
});
_window.add(scrollableView);
_window.addEventListener('open',function(e){
curVideo = videoViews[scrollableView.currentPage];
curVideo.url = 'movie.mp4';
curVideo.play();
})
_window.open();
Attachments
File | Date | Size |
---|---|---|
log.txt | 2012-07-25T05:58:26.000+0000 | 4716 |
issue reproduces with sdk 3.0.2 and sdk 3.1.0 . this works fine on ios.
Duplicate of TIMOB-9959