Problem
VideoPlayer does not play the video.
REGRESSION - works fine with SDK 1.7.5
Reproducible Steps
1. Run the code from above
Sample Code
var win = Titanium.UI.createWindow();
var android = (Titanium.Platform.name == 'android');
var options = {
contentURL:'movie.mp4',
backgroundColor:'#111',
scalingMode:Titanium.Media.VIDEO_SCALING_MODE_FILL,
mediaControlStyle: Titanium.Media.VIDEO_CONTROL_DEFAULT
};
var activeMovie = Titanium.Media.createVideoPlayer(options);
activeMovie.addEventListener('complete',function()
{
var dlg = Titanium.UI.createAlertDialog({title:'Movie', message:'Completed!'});
dlg.show();
});
win.addEventListener('close', function() {
activeMovie.stop();
});
win.open();
activeMovie.play();
The Video file has been attached.
Logs from Samsung Device
12-21 09:07:40.700: V/AudioFlinger(94): Track constructor name 4100, calling thread 175
12-21 09:07:40.710: V/AudioFlinger(94): start(4100), calling thread 175
12-21 09:07:40.710: V/AudioFlinger(94): ? => ACTIVE (4100) on thread 0x29980
12-21 09:07:40.710: V/AudioPolicyManager(94): startOutput() output 1, stream 1
12-21 09:07:40.710: E/AudioPolicyManagerBase(94): unknown stream type
12-21 09:07:40.710: E/AudioPolicyManagerBase(94): unknown stream type
12-21 09:07:40.710: E/AudioPolicyManagerBase(94): unknown stream type
12-21 09:07:40.710: V/AudioPolicyManager(94): getDeviceForStrategy() from cache strategy 0, device 2
12-21 09:07:40.710: V/AudioPolicyManager(94): getNewDevice() selected device 2
12-21 09:07:40.710: V/AudioPolicyManager(94): setOutputDevice() output 1 device 2 force 0 delayMs 0
12-21 09:07:40.710: V/AudioPolicyManager(94): setOutputDevice() setting same device 2 or null device for output 1
12-21 09:07:40.710: V/AudioFlinger(94): mWaitWorkCV.broadcast
12-21 09:07:40.710: V/AudioFlinger(94): MixerThread 0xbb38 TID 151 waking up
12-21 09:07:40.710: V/AudioPolicyManager(94): releaseOutput() 1
12-21 09:07:40.710: V/AudioFlinger(94): remove track (4099) and delete from mixer
12-21 09:07:40.710: V/AudioFlinger(94): PlaybackThread::Track destructor
12-21 09:07:40.710: I/ActivityManager(175): Starting activity: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10200000 cmp=com.appcelerator.video/.VideoActivity }
12-21 09:07:40.760: I/Launcher(259): onPause()
12-21 09:07:40.760: V/AudioHardwareMSM72XX(94): open driver
12-21 09:07:40.760: V/AudioHardwareMSM72XX(94): get config
12-21 09:07:40.760: V/AudioHardwareMSM72XX(94): set config
12-21 09:07:40.760: V/AudioHardwareMSM72XX(94): buffer_size: 4800
12-21 09:07:40.760: V/AudioHardwareMSM72XX(94): buffer_count: 2
12-21 09:07:40.760: V/AudioHardwareMSM72XX(94): channel_count: 2
12-21 09:07:40.760: V/AudioHardwareMSM72XX(94): sample_rate: 44100
12-21 09:07:40.830: W/ActivityManager(175): Trying to launch com.appcelerator.video/.VideoActivity
12-21 09:07:40.840: W/TiApplication(23158): (main) [6835,8473] activity stack is emtpy, unable to get current activity
12-21 09:07:40.840: I/TiRootActivity(23158): (main) [0,0] checkpoint, on root activity create, savedInstanceState: null
12-21 09:07:40.900: I/Launcher(259): onWindowFocusChanged(false)
12-21 09:07:40.900: D/Launcher(259): setWallpaperDimension() called
12-21 09:07:40.900: D/Launcher(259): USE_NON_SCROLLABLE_IMAGE_WALLPAPER is true
12-21 09:07:40.900: D/Launcher(259): It's image wallpaper. suggestDesiredDimensions(-1,-1)
12-21 09:07:40.930: W/AudioFlinger(94): write blocked for 167 msecs, 224 delayed writes, thread 0xbb38
12-21 09:07:40.940: W/TiApplication(23158): (main) [100,100] activity stack is emtpy, unable to get current activity
12-21 09:07:40.940: W/TiApplication(23158): (main) [1,101] activity stack is emtpy, unable to get current activity
12-21 09:07:40.940: W/TiApplication(23158): (main) [0,101] activity stack is emtpy, unable to get current activity
12-21 09:07:41.100: W/TiApplication(23158): (KrollRuntimeThread) [159,260] Registering module with name already in use.
12-21 09:07:41.100: E/TiApplication(23158): (KrollRuntimeThread) [1,261] APP PROXY: ti.modules.titanium.app.AppModule@49dd2858
12-21 09:07:41.150: W/TypeConverter(23158): jsValueToJavaObject returning null
12-21 09:07:41.201: V/AudioFlinger(94): getNextBuffer() no more data for track 4100 on thread 0xbb38
12-21 09:07:41.201: V/AudioFlinger(94): stop(4100), calling thread 175
12-21 09:07:41.201: V/AudioFlinger(94): (> STOPPED) => STOPPED (4100) on thread 0xbb38
12-21 09:07:41.201: V/AudioPolicyManager(94): stopOutput() output 1, stream 1
12-21 09:07:41.201: E/AudioPolicyManagerBase(94): unknown stream type
12-21 09:07:41.201: E/AudioPolicyManagerBase(94): unknown stream type
12-21 09:07:41.201: E/AudioPolicyManagerBase(94): unknown stream type
12-21 09:07:41.201: E/AudioPolicyManagerBase(94): unknown stream type
12-21 09:07:41.201: V/AudioPolicyManager(94): getNewDevice() selected device 0
12-21 09:07:41.201: V/AudioPolicyManager(94): setOutputDevice() output 1 device 0 force 0 delayMs 150
12-21 09:07:41.201: V/AudioPolicyManager(94): setOutputDevice() setting same device 0 or null device for output 1
12-21 09:07:41.220: I/TiRootActivity(23158): (main) [0,0] checkpoint, on root activity resume. activity = com.appcelerator.video.VideoActivity@49def740
12-21 09:07:41.220: W/VideoPlayerProxy(23158): (main) [4,4] Player action ignored; player has not been created.
12-21 09:07:41.220: V/AudioFlinger(94): TrackBase::reset
12-21 09:07:41.270: I/ActivityManager(175): Displayed activity com.appcelerator.video/.VideoActivity: 442 ms (total 442 ms)
12-21 09:07:41.280: I/ActivityThread(23158): queueIdle
12-21 09:07:41.280: V/ActivityThread(23158): Reporting idle of ActivityRecord{49e0b140 token=android.os.BinderProxy@49df3fe0 {com.appcelerator.video/com.appcelerator.video.VideoActivity}} finished=false
12-21 09:07:41.280: W/ActivityNative(23158): send ACTIVITY_IDLE_TRANSACTION
12-21 09:07:41.280: W/ActivityNative(175): RCV ACTIVITY_IDLE_TRANSACTION
12-21 09:07:44.210: V/AudioFlinger(94): Audio hardware entering standby, mixer 0xbb38, mSuspended 0
You need to either add the
activeMovie
to the window (or any other view on the window) or setfullscreen:true
to display it fullscreen instead of in a view. The Release Candidate release notes explain this under the "Android Changes" section: http://developer.appcelerator.com/apidoc/mobile/1.8.0.1.RC2/changelog.htmlClosing ticket as invalid.