ios - How to play video in fully visible cell in UITableView -


in application playing video in uitableviewcell using following code. works perfectly.

cell2.movieplayer = [[mpmovieplayercontroller alloc]initwithcontenturl:vidurl]; cell2.movieplayer.controlstyle = mpmoviecontrolstyledefault; [cell2.movieplayer.view setframe:cell2.playvw.frame]; cell2.movieplayer.controlstyle=mpmoviecontrolstyleembedded; [cell2.contentview addsubview:cell2.movieplayer.view]; [cell2.movieplayer setfullscreen:no animated:yes]; 

only video play cells visible, managed following code. woking

- (void)scrollviewdidenddecelerating:(uiscrollview *)scrollview { nsmutablearray *arr = [[nsmutablearray alloc]init]; (nsindexpath *indexvisible in tblfeedtable.indexpathsforvisiblerows) {     cgrect cellrect = [tblfeedtable rectforrowatindexpath:indexvisible];     bool isvisible = cgrectcontainsrect(tblfeedtable.bounds, cellrect);     if (isvisible)     {         [arr addobject:[nsstring stringwithformat:@"%ld",(long)indexvisible.row]];     } } nslog(@"%@",arr); } 

but problem when scroll table next cell video play after complete visible cell. instead of want play visible cells video.


Comments

Popular posts from this blog

How to show in django cms breadcrumbs full path? -

php - Invalid Cofiguration - yii\base\InvalidConfigException - Yii2 -

ruby on rails - npm error: tunneling socket could not be established, cause=connect ETIMEDOUT -