Post not yet marked as solved
Hi,
how can I fade out the background music (html5 audio element) of my browser game under iOS? Neither can I set audio.volume nor does it work to pipe it through the Web Audio API and modify the gain value. Both solutions work great on basically every non-Apple OS and browser. But it fails on Safari/OSX and in my experience on any browser under iOS. This is quite frustrating. So: how can I fade out music in my browser game under iOS?
Thanks
Leander
This does not want to work at all with the new WK Web Kit but Will only work with the old UIWebKit I have tried a lot of new code but still doesn't wanna work at all.
do {
w.loadHTMLString(try NSString(contentsOfFile: Bundle.main.path(forResource: "index", ofType: "html")!, encoding: String.Encoding.utf8.rawValue) as String, baseURL: URL(fileURLWithPath: Bundle.main.bundlePath, isDirectory: true))
} catch {
// catch error
}
Post not yet marked as solved
I´m using a WkWebView in my application. There is a page that shows a video recorder inside the web app. It works on iOS 14.4, but it doesn´t on 14.7.1. In that version, it is shown a modal to broadcast video, and it is shown completely black. If you close that modal, the video recorder works fine inside the web page. So, what I need is that modal doesn´t appears, as in iOS 14.4.
In my log, I have seen the following lines:
<CATransformLayer: 0x281391640> - changing property masksToBounds in transform-only layer, will have no effect
<CATransformLayer: 0x281396100> - changing property allowsGroupBlending in transform-only layer, will have no effect
Post not yet marked as solved
When the touchstart event is added on the Document - on click of the dropdown the options box opens and closes immediately, thus restricting user to make any selections
We are able to reproduce this issue on iOS14 : iPad 5th Generation, iOS 14.6 version with the code snippet below
Note : The dropdown works fine when the touchstart event is disabled and this issue is specific to iOS14, works well on iOS13.
<!DOCTYPE html>
<html>
<body onload="addEvents()">
<h1>The select element</h1>
<p>The select element is used to create a drop-down list.</p>
<form action="/action_page.php">
<label for="cars">Choose a car:</label>
<select name="cars" id="cars">
<option value="volvo">Volvo</option>
<option value="saab">Saab</option>
<option value="opel">Opel</option>
<option value="audi">Audi</option>
</select>
<br><br>
<input type="submit" value="Submit">
</form>
<p>Click the "Submit" button and the form-data will be sent to a page on the
server called "action_page.php".</p>
<script>
function touchHandler(event) {
var touches = event.changedTouches, first = touches[0], type = "";
switch (event.type) {
case "touchstart":
type = "mousedown";
break;
case "touchmove":
type = "mousemove";
break;
case "touchend":
type = "mouseup";
break;
default:
return;
}
if(document.getElementById("searchContainer") === null || document.getElementById("searchContainer").style.display === "none"){
var simulatedEvent = document.createEvent("MouseEvent");
simulatedEvent.initMouseEvent(type, true, true, window, 1, first.screenX,
first.screenY, first.clientX, first.clientY, false, false, false,
false, 0/*left*/, null);
first.target.dispatchEvent(simulatedEvent);
//event.preventDefault();
}
}
function addEvents(){
document.addEventListener("touchstart", touchHandler, true);
document.addEventListener("touchmove", touchHandler, true);
document.addEventListener("touchend", touchHandler, true);
document.addEventListener("touchcancel", touchHandler, true);
}
</script>
</body>
</html>
As in this code snippet, onload we are adding touchstart event to the Document and the containing form has the dropdown. On click of the dropdown, we are unable to make selections as the dropdown options box gets closed immediately.
Please assess this and let us know if this is a bug on your side and when the possible correction for this can be expected?
Also, can you please update on the below ticket, The issue is still reproducible on the latest iOS version. This was accepted as a bug on your side - please share updates on this as well.
https://developer.apple.com/forums/thread/671827?login=true&page=1#658436022
Post not yet marked as solved
Service Workers are difficult to debug without proper tooling. Current tools available in Safari makes it difficult to understand the lifecycle of the SW, the Cache Storage contents, to reload or remove registration and other actions. It's even more difficult when doing remote debugging to an iOS or iPadOS device where the Service Workers appears as a different context without proper explanation.
Post not yet marked as solved
[Assert] Failed to present a context menu for configuration with identifier 76F4D464-627B-4966-B90F-45D76EA6F285. This is likely due to a different presentation occuring during the lifecycle of the interaction.
this project run in ios12 is ok.
a new demo run in ios14 is ok.
but this project run in ios14 is bad.
url:
h5apk.cn/input-capture.php
WKWebViewConfiguration in ios14 change?