Screen get black when the video media player get back

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

I just put a video player in a new window and open the window.It works at first, but when I choose the fullscreen button the whole screen get black. As I rotate the screen, i can see a splash of the vedio image and recover to black at once.(IOS)

the code as followed:

var VideoPlayer = function(args){ if(Ti.Platform.osname == 'android'){ var MBSPlayer = require('com.mobishift.mbsplayer'); var vplayer = MBSPlayer.createPlayer({ url: args.url, autoplay: false, }); vplayer.show(); this.tiObject = vplayer; }else{ var videoPlayer = Titanium.Media.createVideoPlayer(args || { top : 2, autoplay : false, height : 300, width : 300, mediaControlStyle : Titanium.Media.VIDEO_CONTROL_DEFAULT, scalingMode : Titanium.Media.VIDEO_SCALING_ASPECT_FIT, }); videoPlayer.fullscreen = true; videoPlayer.url = args.url; videoPlayer.show();

    this.tiObject = videoPlayer;    
}

};

VideoPlayer.prototype.play = function(args, fnSuccess){ var vidWin = args.window; vidWin.tiObject.add(this.tiObject); this.tiObject.play(); vidWin.open();

this.tiObject.addEventListener('fullscreen', function(e){
    if(!e.entering){
        vidWin.close();
    }
});

this.tiObject.addEventListener('complete', function(e){
    if(e.reason == 0 || e.reason == 1){
        vidWin.close();
    }
});

};

— asked 9 months ago by Ethan Huang
1 Comment
  • Having the same problem on IOS 6, any info on this?

    — commented 8 months ago by Sound Ideas

Your Answer

Think you can help? Login to answer this question!