ios - How to stop streaming mp3 file in UIWebview -


i want stop streaming mp3 file in uiwebview without reload page.

so don't want reload page stop. it's not best way. suggest idea me ?

thanks in advance !

you load blank page stop streaming mp3 file.

like :

[self.yrwebcontent loadrequest:nsurlrequestfromstring(@"about:blank")]; 

update: solution, play sound using avaudioplayer instead

nsurl *url = [nsurl fileurlwithpath:self.sfilepath]; nsdata *yrsound = [nsdata datawithcontentsofurl:url]; avaudioplayer *soundplayer = [[avaudioplayer alloc] initwithdata:yrsound  error:null]; soundplayer.numberofloops = 0; [soundplayer play]; 

then, stop using :

[soundplayer stop]; 

Comments

Popular posts from this blog

Delphi XE2 Indy10 udp client-server interchange using SendBuffer-ReceiveBuffer -

Qt ActiveX WMI QAxBase::dynamicCallHelper: ItemIndex(int): No such property in -

Enable autocomplete or intellisense in Atom editor for PHP -