Android Remote Video with titanium

Welcome all!

I am trying to play a video hosted on our web server on an Android phone. I already built this for the iPhone and it works great.

Droid, however, this is another problem. Instead of receiving the video, I just get a black screen, no error or anything else.

The code I use is:

activeContent = Titanium.Media.createVideoPlayer ({contentURL: content, BackgroundColor: '# 111', movieControlMode: Titanium.Media.VIDEO_CONTROL_DEFAULT});

win.add (activeContent); activeContent.play ();

The video I download plays on the droid when it is not using Titanium, so I know that this is not a format problem. (his .MP4 incase that interests him.)

I used the Titanium SDK 1.5.1 and I continue to build 1.6.0 from today.

using 2.2 Droid SDK and Titanium Developer 1.2.2

Does anyone have any thoughts on this? One of the big selling points for Android is the ability to pull funds from the network, and to be honest, I'm a little worried about this shortcoming if this is a problem with Titanium.

+6
android video titanium
source share
2 answers

For Android, the video player should not be added to the window. Android will open its video player in a new window when you call play (). Therefore, your code should look like this:

activeContent = Titanium.Media.createVideoPlayer ({contentURL: content, backgroundColor: '# 111', movieControlMode: Titanium.Media.VIDEO_CONTROL_DEFAULT});

activeContent.play ();

Blessings!

+2
source share

In 1.6.1, the Android kitchen sink can play local video, but not remote video. I got my video to work on the iPhone, but not on Android.

0
source share

All Articles