objective c - Get notifications when a Dailymotion video is played into a UIWebView -


i'm showing dailymotion url directly uiwebview. when tapping on thumbnail image, video starts playing in fullscreen mode.

the problem is: when video stops playing or user tapps "done" button, original thumbnail has disapeared uiwebview, making impossible launch video again. control when video has finished playing or user has tapped done button reload uiwebview.

i've been looking around , playing notification center couldn't response, can tell me code should use ?

loading video

    nsurlrequest *requestobject = [nsurlrequest requestwithurl:[nsurl urlwithstring:@"http://www.dailymotion.com/embed/video/xh7cgv_cine-pocket-a-candidate_creation"]]; [self.webv loadrequest:requestobject]; 

notification catch

[[nsnotificationcenter defaultcenter] addobserver:self                                          selector:@selector(movieplayerdidexitfullscreen:)                                              name:mpmovieplayerdidexitfullscreennotification                                            object:nil]; [[nsnotificationcenter defaultcenter] addobserver:self                                          selector:@selector(movieplayerdidenterfullscreennotification:)                                              name:mpmovieplayerdidenterfullscreennotification                                            object:nil]; [[nsnotificationcenter defaultcenter] addobserver:self                                          selector:@selector(playbackdidfinish:)                                               name:mpmovieplayerplaybackdidfinishnotification                                             object:nil]; 

thanks, louis

corresponding thread mediaplayer doesn't send out notifications when started within uiwebview (no source given however). try these hacks: visible-hidden events hack, timed key window checking-hack, subview events-hack. if had luck, please share code!


Comments

Popular posts from this blog

php - What is the difference between $_SERVER['PATH_INFO'] and $_SERVER['ORIG_PATH_INFO']? -

fortran - Function return type mismatch -

queue - mq_receive: message too long -