video player causes error on android

You must Login before you can answer or comment on any questions.

Mobile App Titanium SDK version: 1.8.2 iPhone SDK version: 4.3 Mac OS x 10.6.8

I am creating a videoplayer which works fine on ios but I keep getting a runtime error on android - also get same error on kitchen sink

' var effectVideoWindow = Titanium.UI.createWindow({ id: '24EffectVideoWindow', title: '24 hour effect', backgroundColor: '#FFF', barColor: '#00BFFF', navBarHidden: false, width: '100%', height: '100%', fullscreen: false });

    var options = {
        url: '/movies/movie.mp4',
        backgroundColor: '#FFF',
        scalingMode: Titanium.Media.VIDEO_SCALING_MODE_FILL,
        movieControlMode: Titanium.Media.VIDEO_CONTROL_DEFAULT          
    };

    var activeMovie = Titanium.Media.createVideoPlayer(options);
    effectVideoWindow.add(activeMovie);

    activeMovie.play();

    effectVideoWindow.addEventListener('close', function() {
        activeMovie.stop();
    });'
— asked 2 years ago by derek johnston
2 Comments
  • I'd suggest you take a look at the Using Questions and Answers article, specifically the Q&A Question Checklist. It will make your experience here much more enjoyable.


    It be nice to actually have the run time error to at least a smidgeon of a clue.

    — commented 2 years ago by Stephen Feather

  • http://twitpic.com/94s5u0

    — commented 2 years ago by derek johnston

3 Answers

Accepted Answer

hi derek, remember one thing that when you use video player in android , there is no need to add player in the window so try to run your code without adding the player

see this doc

— answered 2 years ago by Mitul Bhalia
answer permalink
4 Comments
  • I tried what you suggested , the runtime error disappears but all i see is a blank white screen. I tested using the movie.mp4 from kitchen sink and same happens

    — commented 2 years ago by derek johnston

  • is your path correct of movie.mp4....?

    — commented 2 years ago by Mitul Bhalia

  • yes - it works for the iphone so its there in the correct folder

    — commented 2 years ago by derek johnston

  • Show 1 more comment

Hi

here is a screen shot of error as I said get same error in kitchen sink

http://twitpic.com/94s5u0

anyone seen this before?

In addition to this my mp4 video plays ok in iphone but not in android.

An mp4 video with codecs MPEG-4 Video, AAC and dimensions 368?×?208 plays ok in android but mp4 video codecs AAC, H.264 and dimensions 960?×?640 the video controls very briefly appear then disappear and just a black screen with no audio and there is no info in the console window.

Is this connected to the codecs or dimensions - any help would be great

Your Answer

Think you can help? Login to answer this question!