app中环境配置
ios WKWebView 和UIWebView 播放没有声音的方案
WKWebView设置
WKWebViewConfiguration *config = [[WKWebViewConfiguration alloc] init];
config.allowsInlineMediaPlayback = YES;
config.mediaPlaybackRequiresUserAction = false;
displayWebView=[[WKWebView alloc] initWithFrame:rect configuration:config];
displayWebView.UIDelegate=self;
displayWebView.navigationDelegate=self;
UIWebView设置
[self.webView setMediaPlaybackRequiresUserAction:NO];