iphone - MPMoviePlayerController existed black background -




make ios app.

use mpmovieplayercontroller, shows black background.

think problem can solve url, can't understand use way.
mpmovieplayercontroller background color won't stick

code this.

nsstring *path = [[nsbundle mainbundle] pathforresource:@"movie_files" oftype:@"m4v"]; nsurl *videourl = [nsurl fileurlwithpath:path];  movieplayer =  [[mpmovieplayercontroller alloc]                 initwithcontenturl:videourl];  //setting movieplayer.scalingmode =mpmoviescalingmodeaspectfit; movieplayer.controlstyle=mpmoviecontrolstyledefault; movieplayer.shouldautoplay=no; [movieplayer.view setframe:cgrectmake(20, 20, 280, 200)];      //notification [[nsnotificationcenter defaultcenter] addobserver:self                                          selector:@selector(movieplaybackdidfinish:)                                              name:mpmovieplayerplaybackdidfinishnotification                                            object:movieplayer];  //clearcolor uiview *subv =[[uiview alloc]init]; for(subv in movieplayer.backgroundview.subviews) {     subv.backgroundcolor = [uicolor clearcolor]; } [movieplayer.view addsubview:subv];     [self.view addsubview:movieplayer.view]; //show white screen 

please tell clear background way.

you need change to:

movieplayer.backgroundview.backgroundcolor = [uicolor clearcolor]; for(uiview *asubview in movieplayer.view.subviews) {     asubview.backgroundcolor = [uicolor clearcolor]; } 

Comments

Popular posts from this blog

django - How can I change user group without delete record -

java - Need to add SOAP security token -

java - EclipseLink JPA Object is not a known entity type -