uiwebview

Using a webview to play an mp3- is it possible to keep it playing even when the screen is locked?

谁都会走 提交于 2019-12-25 00:18:05
问题 I have a portion of my app that simply launches a webview linked to an mp3 file- it opens the file and plays the audio. What I'd like to do is allow that audio to continue playing even if the user locks their iPhone. (As a side note, is there any way to replace the default Quicktime logo that appears in the player? Not that big a deal, just thought I'd ask =) A third question- I also do the same thing (webview) with an .m3u linked file to stream live audio throughout the week- is it also

How do I “listen” for something in WebView, Android?

邮差的信 提交于 2019-12-24 21:00:12
问题 private class HelloWebViewClient extends WebViewClient { @Override public boolean shouldOverrideUrlLoading(WebView view, String url) { view.loadUrl(url); return true; } } /** Called when the activity is first created. */ @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); webview = (WebView) findViewById(R.id.webview); webview.setWebViewClient(new HelloWebViewClient()); webview.getSettings().setJavaScriptEnabled(true);

ObjectiveC - WebView not reloading from the top

独自空忆成欢 提交于 2019-12-24 19:49:32
问题 I have a webpage which has a long list of items. I want the user to refresh the page when they tapped on the tab bar item. I manage to call the method to load the web view when they tapped the tab bar item. But it just doesn't reload afresh from the top. It seems like webview is loading from where it is or cache or something. I tried to removecahce but it doesn't seems to work. I want it to reload afresh from the top again. I can't use viewWillAppear because I don't want the page to reload

How to use a custom font inside a UIWebView

隐身守侯 提交于 2019-12-24 18:38:37
问题 I'm working on an iPhone application that use UIWebView which load xhtml files the html file could include css file that use custom fonts, but it's look like that the web view doesn't support custom fonts since it doesn't render the custom font in the css file example: xhtml file: <head> <link href="../Styles/p1.css" rel="stylesheet" type="text/css" /> </head> <body> <p class="line1">تجريب</p> </body> </html> css file: @font-face { font-family: "AHRAM"; font-style: normal; font-weight: bold;

iOS 9.0 UIWebView Behaviour on WiFi

一笑奈何 提交于 2019-12-24 17:34:06
问题 Use-case: We are using UIWebview to load HTML, contents are different text,images and raw data. We are using NSURLProtocol to observe redirected URLs for UIWebview. We are observing by NSURLConnection, How much data load for each redirected URL. Delegate Observation: On WiFi for continuous two iteration on UIWebview "loadRequest", 1st iteration works fine, but 2nd iteration few URL take time to load, that URLs are most of image URLs. On Cellular for continuous ten iteration, it will work as

How do I display the loading progress for a UIWebView and the actual UIWebView on separate views?

落爺英雄遲暮 提交于 2019-12-24 17:24:46
问题 Im looking to implement a method that dropbox uses for there iOS app, where they have the actual progress view for a UIWebView on a view that is shown right before the actual UIWebView is shown. The video in this link shows exactly what I am trying to say. Now just as they have a masterView -> progessView -> PdfViewer setup , I do as well. So I guess the question is, how did they pass the data from the tableView, onto the progress view, and display the UIWebView? Does the progress view

How to debug ScriptError on line 0 on webview?

喜欢而已 提交于 2019-12-24 16:25:13
问题 I have built a mobile webapp in html/js and I am using the 'window.onerror' to track client side js errors and report them to the server. Recently I noticed that I receive many reports of ScriptError on line 0 . A quick google search brought me to discussions like Cryptic "Script Error." reported in Javascript in Chrome and Firefox and https://ravikiranj.net/posts/2014/code/how-fix-cryptic-script-error-javascript/ For most people such errors seem to be triggered by failures in scripts that

NSAppTransportSecurity UIWebView issue

核能气质少年 提交于 2019-12-24 16:16:02
问题 I have these lines in my info.plist file: <key>NSAppTransportSecurity</key> <dict> <key>NSExceptionDomains</key> <dict> <key>mysebserver.com</key> <dict> <key>NSIncludesSubdomains</key> <true/> <key>NSTemporaryExceptionAllowsInsecureHTTPLoads</key> <true/> <key>NSTemporaryExceptionMinimumTLSVersion</key> <string>TLSv1.1</string> </dict> </dict> </dict> So it works perfect with my API calls. In my view controller I have UIWebView that tries to display web content: NSURLRequest* request =

change user agent multiple times

时间秒杀一切 提交于 2019-12-24 15:59:35
问题 I am trying to toggle user agent for a uiwebview between iPhone and iPad. So to have a button that will change from iPad user agent to iPhone user agent and backward. I found this link: http://www.mphweb.com/en/blog/easily-set-user-agent-uiwebview Unfortunately, the user agent can be changed only once, even if I recreate the uiwebview. Does anyone has an idea about how to do it? Btw, I also tried set the user agent in urlrequest header, without success. Thanks 回答1: Me too, I have been able to

White Space in UIWebView

我的未来我决定 提交于 2019-12-24 14:18:37
问题 I am working on an app in which I am using UIWebView . To make UIWebView editable, I have used an HTML file and have set its attribute contenteditable=true . To perform some operation, I am using JavaScript. I have set css in HTML file. Below is the code. <style> #test { padding-left:5px; padding-right:5px; background-color:green; text-align:left; width:100%; font-family: "Times New Roman"; border-radius:5px; } </style> Now, my problem is I am getting a white margin of about 10-15px from top,