简体   繁体   中英

Audio is not playing in uiwebview in iPhone

i want to play live streaming video in uiwebview it is playing by believe code

UIWebView *web=[[UIWebView alloc]initWithFrame:self.view.bounds];
[web loadHTMLString:htmlString baseURL:nil];
NSError *setCategoryErr = nil;
NSError *activationErr  = nil;
web.scalesPageToFit=YES;
web.mediaPlaybackRequiresUserAction=NO;
[self.view addSubview: web];

but the problem is that audio is not playing in simulator or not in any device with that live video what i am doing wrong or what i have missed here

go to Info.plist property list - add a new row - select required background modes, there should be a subrow called Item 0, select app plays audio or streams audio/video using AirPlay. Also check Audio air play in background modes in compatibility.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM