Hypertext Markup Language (HTML) is the standard markup language for documents designed to be displayed in a web browser.

Posts under HTML tag

200 Posts

Post

Replies

Boosts

Views

Activity

Safari Mobile Sandbox allow-scripts
Hi,I'm developing an app on a esp8266 microcontroller that is controlled by a web browser... ideally Safari on my iPhone! The website is a fairly standard html/css/javascript/websockets type of thing.For some reason I'm not able to load my javascript on Safari (or Chrome) on my iPhone??Things work fine when viewed with Safari (or Chrome) on my MacBook.I've boiled the problem down to the following example...demo.html<html> <head> <title>Demo</title> <meta name="description" content="Test of basic Javascipt function"> <script type="application/javascript" src="/demo.js"></script> </head> <body> DEMO<br> <div id="main"></div> </body> </html>demo.jsvar i = 0; function update() { 'use strict'; document.getElementById("main").innerHTML = i; i = i + 1; } setInterval(update, 500);When I load this from my computer, it runs fine, but when I load it on my iphone I get the following error via WebInspector... Blocked script execution in 'http://IP_OF_WEBSERVER/demo.html'because the document's frame is sandboxed and the 'allow-scripts' permission is not set.For the life of me, I can't figure out how to set 'allow-scripts'. I've even hacked my webserver to send... Content-Security-Policy: default-src 'self'; sandbox 'allow-scripts' 'allow-same-origin'; script-src 'unsafe-inline' 'unsafe-eval';Doesn't appear to help in any way. I've been banging my head against this for a couple of days now, and I could really use some help.Thanks,Bill
3
0
5.9k
Aug ’22
Trying to parse a JSON and display the image from the JSON
Hi, I have this code here, and I am really struggling with using SwiftUI and an MVVM architecture to display data from this NASA API. I want to take the image URL passes through the JSON and display it. I Found this article that shows how to use the SDWebView Swift package, and I would like to use this package to take the image URL that comes out of the JSON and display that image. However, I am not sure how to setup my View Model... I made this app a bit ago that parses JSONs and puts them in a table, but when it seems like you have to setup your view model differently for creating a table compared to just displaying an image? Do any of you have any tips or resources I can look at ? thanks
1
0
692
Aug ’22
HTML video showing black screen but sound is playing on iOS 15
My website shows a video using video tag which worked perfectly until not long ago. The video is working but when pressing on full screen, the video is playing but the screen is black while the sound is still playing. The issue occurs only on iPhones with iOS 15 (using Safari and Chrome also). Things I've tried: I've tried playing the video directly with a URL to the actual file(to check its not codec issue) and it worked properly. My video tag has 'position: absolute;' on it and I tried removing it(even though it breaks my layout) and that didn't work either. Tried pausing the video immediately and playing it after the video loads. Tried applying a background: white; or any non-transparent color to the video tag. Tried removing auto play. Tried to disable 'GPU process: Media' on safari settings just to check if that affects anything and it didnt. This is the html: <video data-test-id="long-video" #longVideo muted controls playsinline [class.d-none]="!isShortVideoHidden" *ngIf="isPageLoaded" src="https://cdn1.someurl.com/videos/commercial_1.mp4" type="video/mp4"> </video> and the css(with the parent): @media only screen and(min-width:992px) { .fixed-video { position: fixed; z-index: 10000; margin: auto; width: 100vw; height: 100vh; left: 0; top: 0; bottom: 0; right: 0; background: rgba(0, 0, 0, 0.5); transition: 0.4s; video { width: 80%; left: 0; right: 0; top: 0; bottom: 0; margin: auto; } } } Please tell me if you have struggled with this and know how to solve it. Thank you :)
3
1
5.1k
Aug ’22
Xcode and eps32 wifi/ble
hello, I'm pretty new to programming (swift,c++,html, css) I've started working with esp32 to make a home automation project with personal interface. I'm finding lots of problems to get this going.. at the moment I've tried couple of things: connect testLed to esp32 to see if code & interface works. first I tried with AsyncWebServer & made a custom webpage with html with the ledbutton. when I push the button the led turns on/off correctly.. Problem: 5-6second delay.. I've tried the same apStyle, remaining the delay... when I make my custom app with Xcode & make actions to go to the url with paths /on, /off I can control the led with my custom Xcode app.. still remaining a delay of 5-6seconds.. Question: How can I fix everything so it's a max delay of 1second? (I'll post all of my code after this post) or is the problem cause of the contact server & not directly contact esp32? would ble be better for this project? in my opninion not cause I would like to control everything from anywhere... ble means I need to be at home to maintain connection.. I've been looking up, changing code, & not going anywhere anymore :( tried different GPIO's for led.. coding only for one or 2led's to keep it minimal to optimize, & afterwards expand to the full home with relais en mosfet connections.. working with homekit & homespan is working good, but also delayed 3seconds.. better then what I have but still to slow..
1
0
1.4k
Jul ’22
Why does IOS App show "This site is suspended"
I'm not (yet) an app developer at all. I started by just using a sample to create me a JavaScript-App and deploy it via "app.netlify.com/drop". Thats was it, to get an idea about it. I used the sample, as is - but of no use for me, and this one still works without problems. Now I started by adding function to it to call my shelly devices. See here, how it is meant for just one shelly-device &lt;script&gt; let fountain = 'http://shelly1pm-E8DB84D7EDED.fritz.box'; function Shelly (shelly) { window.location.href = shelly; } &lt;/script&gt; &lt;body class="background-dark"&gt; &lt;div class="center margin-top"&gt; &lt;a href="javascript:Shelly(fountain)"&gt; &lt;img class="icon" src="img/fountain.jpg" alt="Fountain" &gt; &lt;/a&gt; &lt;/div&gt; The app works few hours but now, a day later, I just see the message "This site is suspended". I stopped it and started again, I switched off/on the IPhone - nothing helps. Any idea, what this might mean and how to solve it - or whom to ask?
0
0
765
Jul ’22
Safari iOS15 video.played TimeRange is broken
We have implemented a check on our app, that validates when a user has seen a video in it's entirety and hasn't skipped any section. We were using the video.played TimeRange Buffer available on a video HTML5 element. The expected behaviour For a user playing a video once and letting it end, it means you get one TimeRange where start is zero and end is the duration of the video in seconds. The end is not always the exact duration but it was always within 1 second of it. The issue After iOS15 the end integer is never the correct one or even close to the duration when a video ends (The "ended" event fires). It almost always is close to the start timer. When pausing the video though the end duration is correct on the played TimeRange. Testing on iOS 15.0.2
2
0
1.2k
Jul ’22
Attempted upload fails -1005
I'm trying to upload a binary file from iOS to a server on local Wifi. The uploader on the server works fine from its web page, but I can't get it to upload from Swift. It looks to me like my request is not properly formed, but I haven't been able to figure out what it's missing. Thanks for any help. ~ Nancy Here's my upload routine:    func uploadFile() {     let config = URLSessionConfiguration.default         let session = URLSession(configuration: config)     let updateURL = URL(string: ("http://" + currentBaseString + "/update"))     var request = URLRequest(url: updateURL!)     print("SETUP Upload Request: ", request)     request.httpMethod = "POST"     guard let fileURL = Bundle.main.url(forResource: "R2-0701", withExtension: "bin") else {       print("Failed to create URL for file.")       return     }     do {       let data = try Data(contentsOf: fileURL)       print("SETUP Found the data file\n")       request.httpBody = data       let task = URLSession.shared.uploadTask(with: request as URLRequest, fromFile: fileURL) { data, response, error in         if error != nil {           print ("RRC Task error: \(String(describing: error))")           return         }         guard let response = response as? HTTPURLResponse, (200...299).contains(response.statusCode) else {           print ("Server error")           return         }         if let mimeType = response.mimeType,           mimeType == "multipart/form-data",           let updateData = data,           let dataString = String(data: updateData, encoding: .utf8) {           print ("got data: \(dataString)")         }       }       task.resume()     }     catch {       print("Error opening file: \(error)")     }   } My URL construction is fine, it works for GET requests. "R2-0701.bin" is the filename of a file added to the project. Here's the server HTML: <script src='https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js'> </script> <form method='POST' action='#' enctype='multipart/form-data' id='upload_form'> <table cellpadding = '10' align='center''> <tr> <td bgcolor='AA0000' align='center' style='color:white;'> <p font-color='white' text-size='12' > <b>Reprogram</b> </p> </td> </tr> <tr> <td> <input type='file' name='update'> </td> </tr> <tr> <td align='center'> <input type='submit' value='Update'> </form> </td> </tr> <tr> <td align='center'> <div id='prg'>progress: 0%</div> </td> </tr> </table> <script> $('form').submit(function(e){ e.preventDefault(); var form = $('#upload_form')[0]; var data = new FormData(form); $.ajax({ url: '/update', type: 'POST', data: data, contentType: false, processData:false, xhr: function() { var xhr = new window.XMLHttpRequest(); xhr.upload.addEventListener('progress', function(evt) { if (evt.lengthComputable) { var per = evt.loaded / evt.total; $('#prg').html('progress: ' + Math.round(per*100) + '%'); } }, false); return xhr; }, success:function(d, s) { console.log('success!') }, error: function (a, b, c) { } }); }); </script>; Here's the output: SETUP Upload Request: http://192.168.86.41/update SETUP Found the data file 2022-07-04 17:21:52.075958-0600 RoadrunnerComfort[5034:11127394] Task <25F2EC07-30D7-4532-BD6A-D35A41716AF2>.<7> HTTP load failed, 1048855/0 bytes (error code: -1005 [4:-4]) 2022-07-04 17:21:52.082677-0600 RoadrunnerComfort[5034:11127423] Task <25F2EC07-30D7-4532-BD6A-D35A41716AF2>.<7> finished with error [-1005] Error Domain=NSURLErrorDomain Code=-1005 "The network connection was lost." UserInfo={_kCFStreamErrorCodeKey=-4, NSUnderlyingError=0x283fb49c0 {Error Domain=kCFErrorDomainCFNetwork Code=-1005 "(null)" UserInfo={NSErrorPeerAddressKey=<CFData 0x2812ecc80 [0x22eb841b8]>{length = 16, capacity = 16, bytes = 0x10020050c0a856290000000000000000}, _kCFStreamErrorCodeKey=-4, _kCFStreamErrorDomainKey=4}}, _NSURLErrorFailingURLSessionTaskErrorKey=LocalUploadTask <25F2EC07-30D7-4532-BD6A-D35A41716AF2>.<7>, _NSURLErrorRelatedURLSessionTaskErrorKey=(   "LocalUploadTask <25F2EC07-30D7-4532-BD6A-D35A41716AF2>.<7>" ), NSLocalizedDescription=The network connection was lost., NSErrorFailingURLStringKey=http://192.168.86.41/update, NSErrorFailingURLKey=http://192.168.86.41/update, _kCFStreamErrorDomainKey=4} 2022-07-04 17:21:52.083212-0600 RoadrunnerComfort[5034:11127396] [tcp] tcp_input [C7:2] flags=[R.] seq=3409008496, ack=2962928595, win=5744 state=LAST_ACK rcv_nxt=3409008496, snd_una=2962927159 RRC Task error: Optional(Error Domain=NSURLErrorDomain Code=-1005 "The network connection was lost." UserInfo={_kCFStreamErrorCodeKey=-4, NSUnderlyingError=0x283fb49c0 {Error Domain=kCFErrorDomainCFNetwork Code=-1005 "(null)" UserInfo={NSErrorPeerAddressKey=<CFData 0x2812ecc80 [0x22eb841b8]>{length = 16, capacity = 16, bytes = 0x10020050c0a856290000000000000000}, _kCFStreamErrorCodeKey=-4, _kCFStreamErrorDomainKey=4}}, _NSURLErrorFailingURLSessionTaskErrorKey=LocalUploadTask <25F2EC07-30D7-4532-BD6A-D35A41716AF2>.<7>, _NSURLErrorRelatedURLSessionTaskErrorKey=(   "LocalUploadTask <25F2EC07-30D7-4532-BD6A-D35A41716AF2>.<7>" ), NSLocalizedDescription=The network connection was lost., NSErrorFailingURLStringKey=http://192.168.86.41/update, NSErrorFailingURLKey=http://192.168.86.41/update, _kCFStreamErrorDomainKey=4})`
0
0
1.3k
Jul ’22
iOS 14 and browser scroll bars (webkit)
Hello! I have this scrollable container. It works fine across browsers and devices until it hits iOS14. Behaves just the way it should iOS 12 - (cant test iOS13 right now) The goal is to always show the scrollbar. On iOS14 only the native scrollbar is shown when scrolling is happening. Is there any way to fix this for iOS14 users? thanks in advance! div {&#9; max-height: 20rem; &#9;overflow-x: hidden; &#9;overflow-y: auto; &#9;margin-right: 0.25rem; &#9;::-webkit-scrollbar-track { &#9;&#9;border-radius: 0.125rem; &#9;&#9;background-color: lightgray; &#9;} &#9;::-webkit-scrollbar { &#9;&#9;width: 0.25rem; &#9;&#9;border-radius: 0.125rem; &#9;} &#9;::-webkit-scrollbar-thumb { &#9;&#9;border-radius: 0.125rem; &#9;&#9;background-color: gray;}; &#9;} }
6
1
21k
Jul ’22
HTML date min-max attribute not working in iPhone
Hi All, We are using html input type date in our hybrid application which launches the native datepicker in the app. As we need the app to be accessible we chose the html type date. However at certain instances we want to restrict the date selection till present date only. We have used the max attribute to achieve this, for some reasons the datepicker is not respecting this attribute and allowing the user to select future dates. We are in a tricky position since we do not want to use any library and the production date is nearby. Below is the markup we have used for replicating the behavior: form label for="party"Choose your preferred party date: input type="date" name="party" min="2017-04-01" max="2017-04-30" /label /form Any help would be appreciated. Thanks in advance.
6
5
5.6k
Jun ’22
How to *permanently* give a website permission to autoplay audio?
I have an SPA web app I've built for Safari iOS. One feature I have is that (with user's permission!) I would like to play audio alerts of various sorts based on events that take place in the app. (Think a chat app playing a "message received" sound.) ... again, this would be with the user's permission. This is very much a feature of the app and not nagware or adware. Currently, of course, this isn't possible. Audio can only be played in response to some user-initiated action, and that "permission" only lasts until the page closes or is reloaded. So, question: Is there a way a user can permanently give permission to a website on iOS to autoplay sound files?
0
0
587
Jun ’22
Unexpected behaviour when downloading a file fails
I'm developing a REST API app that generates some PDFs for my users, but there are only available for a certain period of time. To download them I'm using the a HTML tag: <a href="/api/items/1/generate?type=register" download="Important Letter.pdf"> <svg>...</svg> </a> This works fine in the normal flow of the use case, but if a user request a PDF outside of the download period, the server responds to the request with a 422 (Unprocessable Entity) HTML code, and place a json on the body of the request: HTTP/1.1 422 Unprocessable Entity Content-Type: application/json;charset=utf-8 {"error" : "Registration period expired", "type" : "expired", "data" : {"id" : 1}} Safari does not interpret this error and it generates the Important Letter.pdf file and writes the json content on it. Is there a wat to avoid this behavior and display an error message to the user? I was wondering if my server should send some specific error code.
0
0
594
Jun ’22
UIMarkupTextPrintFormatter - Non-public API?
I recently had a build go into the system for Test Flight distribution and got the automated message: "ITMS-90338: Non-public API usage - The app contains or inherits from non-public classes in Contents/MacOS/: UIMarkupTextPrintFormatter." I've been using UIMarkupTextPrintFormatter for a long time, and it appears to be a very-public API. I don't even see it as being marked obsolete/deprecated. Is anyone else getting this message? Is this just a goof on Apple's part, or will I need to find some alternative to UIMarkupTextPrintFormatter?
1
2
939
Jun ’22
Input focus issue inside iframe
Hi!I currently developing a mobile website and found that Safari on iOS has some problems setting the focus on inputs when they are inside an iframe.When in a page you have many inputs you can tap on a field and then use the next / previous buttons on the keyboard to navigate between the fields. When the focus move to another input Safari scroll automatically the page centering the field in the page. This is great and works well.The problem is when the fields are inside a page of an iframe. In this case when you change focus from one field to another Safari has some kind of issue; the page “bounce” and the focused field is not centered in the page.I have made a video of a simple page that has this issue. In the first part of the video the page without the iframe is loaded and the focus works correctly. In the second part the page with the iframe is loaded and the issue is visible.http://www.dale1.ch/documents/safari_iframe_focus_issue.movThe code of the first page (testinput.html) where the focus is correctly handled is this:&lt;!DOCTYPE html&gt; &lt;html&gt; &lt;head&gt; &lt;title&gt;Test input&lt;/title&gt; &lt;meta name="viewport" content="width=device-width, height=device-height, initial-scale=1, minimum-scale=1, maximum-scale=1, user-scalable=no" /&gt; &lt;/head&gt; &lt;body&gt; &lt;div&gt;&lt;span&gt;Input 1: &lt;/span&gt;&lt;input type="text" tabindex="1" /&gt;&lt;/div&gt; &lt;div&gt;&lt;span&gt;Input 2: &lt;/span&gt;&lt;input type="text" tabindex="2" /&gt;&lt;/div&gt; &lt;div&gt;&lt;span&gt;Input 3: &lt;/span&gt;&lt;input type="text" tabindex="3" /&gt;&lt;/div&gt; &lt;div&gt;&lt;span&gt;Input 4: &lt;/span&gt;&lt;input type="text" tabindex="4" /&gt;&lt;/div&gt; &lt;div&gt;&lt;span&gt;Input 5: &lt;/span&gt;&lt;input type="text" tabindex="5" /&gt;&lt;/div&gt; &lt;div&gt;&lt;span&gt;Input 6: &lt;/span&gt;&lt;input type="text" tabindex="6" /&gt;&lt;/div&gt; &lt;div&gt;&lt;span&gt;Input 7: &lt;/span&gt;&lt;input type="text" tabindex="7" /&gt;&lt;/div&gt; &lt;div&gt;&lt;span&gt;Input 8: &lt;/span&gt;&lt;input type="text" tabindex="8" /&gt;&lt;/div&gt; &lt;div&gt;&lt;span&gt;Input 9: &lt;/span&gt;&lt;input type="text" tabindex="9" /&gt;&lt;/div&gt; &lt;div&gt;&lt;span&gt;Input 10: &lt;/span&gt;&lt;input type="text" tabindex="10" /&gt;&lt;/div&gt; &lt;div&gt;&lt;span&gt;Input 11: &lt;/span&gt;&lt;input type="text" tabindex="11" /&gt;&lt;/div&gt; &lt;div&gt;&lt;span&gt;Input 12: &lt;/span&gt;&lt;input type="text" tabindex="12" /&gt;&lt;/div&gt; &lt;div&gt;&lt;span&gt;Input 13: &lt;/span&gt;&lt;input type="text" tabindex="13" /&gt;&lt;/div&gt; &lt;div&gt;&lt;span&gt;Input 14: &lt;/span&gt;&lt;input type="text" tabindex="14" /&gt;&lt;/div&gt; &lt;div&gt;&lt;span&gt;Input 15: &lt;/span&gt;&lt;input type="text" tabindex="15" /&gt;&lt;/div&gt; &lt;div&gt;&lt;span&gt;Input 16: &lt;/span&gt;&lt;input type="text" tabindex="16" /&gt;&lt;/div&gt; &lt;div&gt;&lt;span&gt;Input 17: &lt;/span&gt;&lt;input type="text" tabindex="17" /&gt;&lt;/div&gt; &lt;div&gt;&lt;span&gt;Input 18: &lt;/span&gt;&lt;input type="text" tabindex="18" /&gt;&lt;/div&gt; &lt;div&gt;&lt;span&gt;Input 19: &lt;/span&gt;&lt;input type="text" tabindex="19" /&gt;&lt;/div&gt; &lt;div&gt;&lt;span&gt;Input 20: &lt;/span&gt;&lt;input type="text" tabindex="20" /&gt;&lt;/div&gt; &lt;div&gt;&lt;span&gt;Input 21: &lt;/span&gt;&lt;input type="text" tabindex="21" /&gt;&lt;/div&gt; &lt;div&gt;&lt;span&gt;Input 22: &lt;/span&gt;&lt;input type="text" tabindex="22" /&gt;&lt;/div&gt; &lt;div&gt;&lt;span&gt;Input 23: &lt;/span&gt;&lt;input type="text" tabindex="23" /&gt;&lt;/div&gt; &lt;div&gt;&lt;span&gt;Input 24: &lt;/span&gt;&lt;input type="text" tabindex="24" /&gt;&lt;/div&gt; &lt;div&gt;&lt;span&gt;Input 25: &lt;/span&gt;&lt;input type="text" tabindex="25" /&gt;&lt;/div&gt; &lt;div&gt;&lt;span&gt;Input 26: &lt;/span&gt;&lt;input type="text" tabindex="26" /&gt;&lt;/div&gt; &lt;div&gt;&lt;span&gt;Input 27: &lt;/span&gt;&lt;input type="text" tabindex="27" /&gt;&lt;/div&gt; &lt;div&gt;&lt;span&gt;Input 28: &lt;/span&gt;&lt;input type="text" tabindex="28" /&gt;&lt;/div&gt; &lt;/body&gt; &lt;/html&gt;This is the code of the page that has the issue (testinput_iframe.html):&lt;!DOCTYPE html&gt; &lt;html&gt; &lt;head&gt; &lt;title&gt;Test input&lt;/title&gt; &lt;meta name="viewport" content="width=device-width, height=device-height, initial-scale=1, minimum-scale=1, maximum-scale=1, user-scalable=no" /&gt; &lt;/head&gt; &lt;body&gt; &lt;iframe src="/testinput.html" /&gt; &lt;/body&gt; &lt;/html&gt;The issue is present in Safari on the iPhone, iPad and the xCode Simulator from version 8.4 to version 9.2.Someone know if this is a bug? There is way to fix it in css or javascript?Thanks and sorry for my english! 😉
9
0
22k
Jun ’22
Handling mentions and hashtags
I'm fairly new to Swift and SwiftUI (and iOS development in general). I have a web app written in ReactJS and we use draftJS (Facebook opensource) to do rich text editing, which handles @mentions and #hashtags. When the keystroke listener picks up an @ or #, it looks up the mention or tag and when the user selects, it formats the result as a formatted link to the user or the tag. This works great. However, we started iOS development and are trying to bring the two version's feature sets to parity. I'm trying to build the iOS version using SwiftUI because of the reactive nature of the framework and how it mimics a lot of the same concepts from ReactJS. DraftJS has a complex data structure that gets serialized and stored as a JSON object OR I can save it as HTML. Or both. It's honestly way more than I need, but that's basically how to do it in React. I don't really need rich text. What I need is mentions, hashtags. How can I architect a solution that works for both platforms and stores state as something that both platforms can create and consume?
1
0
1.2k
May ’22
Safari 15.4 window.open freezes both parent and child tabs
Hello Safari 15.4 window.open freezes both parent and child tabs Made a github page where you can reproduce the bug: https://swanty.github.io/pdfjs-safari/broken.html It happens only when special conditions are met: The broken.html page loads Stripe v3 js file (important for the freeze) Upon clicking CLICK ME the code executes window.open().location = '...';, thus both parent and child tabs are linked together in the same process The second page opens the latest release of mozilla pdf.js that loads .pdf that contains only 1 image (the image is important for the freeze) Image is simply 3000x3000 PNG, 1 color, 1.2 kB file created with photopea, nothing special, except the resolution. PDF I created by dragging the .png into Chrome and clicking Print -> Save as pdf, also nothing special, just a regular pdf. On our production web if I navigate pages in same tab and at any point that stripe JS is loaded and then I navigate to a different page where window.open().location = '...' opens that pdf.js + .pdf file with special image then both tabs freeze. It doesn't matter how many times I navigate the pages (in same tab), it seems that once the stripe js is loaded, it lingers in the tab memory somewhere and causes the freeze. I would really appreciate it if someone from the Safari developer team could take a look at this and help find a solution :) Thank you
2
0
2.4k
May ’22
Choosing Audio Output of iPhone while using HTMLAudioElement.
I was working on a project where I used the HTMLAudioElement to record an audio response. While playing the audio on iPhone, I noticed that the sound came just from the ear speaker and not the loud speaker which is desired by the user. Is there a way to select the output to come out of the loud speaker as in the former case the user can't hear the preview audio properly?
2
1
947
May ’22
Safari Mobile Sandbox allow-scripts
Hi,I'm developing an app on a esp8266 microcontroller that is controlled by a web browser... ideally Safari on my iPhone! The website is a fairly standard html/css/javascript/websockets type of thing.For some reason I'm not able to load my javascript on Safari (or Chrome) on my iPhone??Things work fine when viewed with Safari (or Chrome) on my MacBook.I've boiled the problem down to the following example...demo.html&lt;html&gt; &lt;head&gt; &lt;title&gt;Demo&lt;/title&gt; &lt;meta name="description" content="Test of basic Javascipt function"&gt; &lt;script type="application/javascript" src="/demo.js"&gt;&lt;/script&gt; &lt;/head&gt; &lt;body&gt; DEMO&lt;br&gt; &lt;div id="main"&gt;&lt;/div&gt; &lt;/body&gt; &lt;/html&gt;demo.jsvar i = 0; function update() { 'use strict'; document.getElementById("main").innerHTML = i; i = i + 1; } setInterval(update, 500);When I load this from my computer, it runs fine, but when I load it on my iphone I get the following error via WebInspector... Blocked script execution in 'http://IP_OF_WEBSERVER/demo.html'because the document's frame is sandboxed and the 'allow-scripts' permission is not set.For the life of me, I can't figure out how to set 'allow-scripts'. I've even hacked my webserver to send... Content-Security-Policy: default-src 'self'; sandbox 'allow-scripts' 'allow-same-origin'; script-src 'unsafe-inline' 'unsafe-eval';Doesn't appear to help in any way. I've been banging my head against this for a couple of days now, and I could really use some help.Thanks,Bill
Replies
3
Boosts
0
Views
5.9k
Activity
Aug ’22
Trying to parse a JSON and display the image from the JSON
Hi, I have this code here, and I am really struggling with using SwiftUI and an MVVM architecture to display data from this NASA API. I want to take the image URL passes through the JSON and display it. I Found this article that shows how to use the SDWebView Swift package, and I would like to use this package to take the image URL that comes out of the JSON and display that image. However, I am not sure how to setup my View Model... I made this app a bit ago that parses JSONs and puts them in a table, but when it seems like you have to setup your view model differently for creating a table compared to just displaying an image? Do any of you have any tips or resources I can look at ? thanks
Replies
1
Boosts
0
Views
692
Activity
Aug ’22
HTML video showing black screen but sound is playing on iOS 15
My website shows a video using video tag which worked perfectly until not long ago. The video is working but when pressing on full screen, the video is playing but the screen is black while the sound is still playing. The issue occurs only on iPhones with iOS 15 (using Safari and Chrome also). Things I've tried: I've tried playing the video directly with a URL to the actual file(to check its not codec issue) and it worked properly. My video tag has 'position: absolute;' on it and I tried removing it(even though it breaks my layout) and that didn't work either. Tried pausing the video immediately and playing it after the video loads. Tried applying a background: white; or any non-transparent color to the video tag. Tried removing auto play. Tried to disable 'GPU process: Media' on safari settings just to check if that affects anything and it didnt. This is the html: <video data-test-id="long-video" #longVideo muted controls playsinline [class.d-none]="!isShortVideoHidden" *ngIf="isPageLoaded" src="https://cdn1.someurl.com/videos/commercial_1.mp4" type="video/mp4"> </video> and the css(with the parent): @media only screen and(min-width:992px) { .fixed-video { position: fixed; z-index: 10000; margin: auto; width: 100vw; height: 100vh; left: 0; top: 0; bottom: 0; right: 0; background: rgba(0, 0, 0, 0.5); transition: 0.4s; video { width: 80%; left: 0; right: 0; top: 0; bottom: 0; margin: auto; } } } Please tell me if you have struggled with this and know how to solve it. Thank you :)
Replies
3
Boosts
1
Views
5.1k
Activity
Aug ’22
Xcode and eps32 wifi/ble
hello, I'm pretty new to programming (swift,c++,html, css) I've started working with esp32 to make a home automation project with personal interface. I'm finding lots of problems to get this going.. at the moment I've tried couple of things: connect testLed to esp32 to see if code & interface works. first I tried with AsyncWebServer & made a custom webpage with html with the ledbutton. when I push the button the led turns on/off correctly.. Problem: 5-6second delay.. I've tried the same apStyle, remaining the delay... when I make my custom app with Xcode & make actions to go to the url with paths /on, /off I can control the led with my custom Xcode app.. still remaining a delay of 5-6seconds.. Question: How can I fix everything so it's a max delay of 1second? (I'll post all of my code after this post) or is the problem cause of the contact server & not directly contact esp32? would ble be better for this project? in my opninion not cause I would like to control everything from anywhere... ble means I need to be at home to maintain connection.. I've been looking up, changing code, & not going anywhere anymore :( tried different GPIO's for led.. coding only for one or 2led's to keep it minimal to optimize, & afterwards expand to the full home with relais en mosfet connections.. working with homekit & homespan is working good, but also delayed 3seconds.. better then what I have but still to slow..
Replies
1
Boosts
0
Views
1.4k
Activity
Jul ’22
Why does IOS App show "This site is suspended"
I'm not (yet) an app developer at all. I started by just using a sample to create me a JavaScript-App and deploy it via "app.netlify.com/drop". Thats was it, to get an idea about it. I used the sample, as is - but of no use for me, and this one still works without problems. Now I started by adding function to it to call my shelly devices. See here, how it is meant for just one shelly-device &lt;script&gt; let fountain = 'http://shelly1pm-E8DB84D7EDED.fritz.box'; function Shelly (shelly) { window.location.href = shelly; } &lt;/script&gt; &lt;body class="background-dark"&gt; &lt;div class="center margin-top"&gt; &lt;a href="javascript:Shelly(fountain)"&gt; &lt;img class="icon" src="img/fountain.jpg" alt="Fountain" &gt; &lt;/a&gt; &lt;/div&gt; The app works few hours but now, a day later, I just see the message "This site is suspended". I stopped it and started again, I switched off/on the IPhone - nothing helps. Any idea, what this might mean and how to solve it - or whom to ask?
Replies
0
Boosts
0
Views
765
Activity
Jul ’22
Audio is not audible if chrome is in background
I have an audio video meeting website implemented in javascript. When i am connected to the meeting and while meeting is going on, If the user goes to background and speaks the end user will not be able to hear until chrome comes to foreground. This issue is not happening in safari. Any help would be helpful
Replies
0
Boosts
0
Views
665
Activity
Jul ’22
Html part elements not display on page in Safari
Hello! In iPhone 15.5, intermittently, some parts of one page, especially the top area, are covered with something that is not the screen I was working on. And if you scroll, that area disappears and you can see the html areas I coded in the past. how can i solve this?
Replies
2
Boosts
0
Views
3.3k
Activity
Jul ’22
Safari iOS15 video.played TimeRange is broken
We have implemented a check on our app, that validates when a user has seen a video in it's entirety and hasn't skipped any section. We were using the video.played TimeRange Buffer available on a video HTML5 element. The expected behaviour For a user playing a video once and letting it end, it means you get one TimeRange where start is zero and end is the duration of the video in seconds. The end is not always the exact duration but it was always within 1 second of it. The issue After iOS15 the end integer is never the correct one or even close to the duration when a video ends (The "ended" event fires). It almost always is close to the start timer. When pausing the video though the end duration is correct on the played TimeRange. Testing on iOS 15.0.2
Replies
2
Boosts
0
Views
1.2k
Activity
Jul ’22
Attempted upload fails -1005
I'm trying to upload a binary file from iOS to a server on local Wifi. The uploader on the server works fine from its web page, but I can't get it to upload from Swift. It looks to me like my request is not properly formed, but I haven't been able to figure out what it's missing. Thanks for any help. ~ Nancy Here's my upload routine:    func uploadFile() {     let config = URLSessionConfiguration.default         let session = URLSession(configuration: config)     let updateURL = URL(string: ("http://" + currentBaseString + "/update"))     var request = URLRequest(url: updateURL!)     print("SETUP Upload Request: ", request)     request.httpMethod = "POST"     guard let fileURL = Bundle.main.url(forResource: "R2-0701", withExtension: "bin") else {       print("Failed to create URL for file.")       return     }     do {       let data = try Data(contentsOf: fileURL)       print("SETUP Found the data file\n")       request.httpBody = data       let task = URLSession.shared.uploadTask(with: request as URLRequest, fromFile: fileURL) { data, response, error in         if error != nil {           print ("RRC Task error: \(String(describing: error))")           return         }         guard let response = response as? HTTPURLResponse, (200...299).contains(response.statusCode) else {           print ("Server error")           return         }         if let mimeType = response.mimeType,           mimeType == "multipart/form-data",           let updateData = data,           let dataString = String(data: updateData, encoding: .utf8) {           print ("got data: \(dataString)")         }       }       task.resume()     }     catch {       print("Error opening file: \(error)")     }   } My URL construction is fine, it works for GET requests. "R2-0701.bin" is the filename of a file added to the project. Here's the server HTML: <script src='https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js'> </script> <form method='POST' action='#' enctype='multipart/form-data' id='upload_form'> <table cellpadding = '10' align='center''> <tr> <td bgcolor='AA0000' align='center' style='color:white;'> <p font-color='white' text-size='12' > <b>Reprogram</b> </p> </td> </tr> <tr> <td> <input type='file' name='update'> </td> </tr> <tr> <td align='center'> <input type='submit' value='Update'> </form> </td> </tr> <tr> <td align='center'> <div id='prg'>progress: 0%</div> </td> </tr> </table> <script> $('form').submit(function(e){ e.preventDefault(); var form = $('#upload_form')[0]; var data = new FormData(form); $.ajax({ url: '/update', type: 'POST', data: data, contentType: false, processData:false, xhr: function() { var xhr = new window.XMLHttpRequest(); xhr.upload.addEventListener('progress', function(evt) { if (evt.lengthComputable) { var per = evt.loaded / evt.total; $('#prg').html('progress: ' + Math.round(per*100) + '%'); } }, false); return xhr; }, success:function(d, s) { console.log('success!') }, error: function (a, b, c) { } }); }); </script>; Here's the output: SETUP Upload Request: http://192.168.86.41/update SETUP Found the data file 2022-07-04 17:21:52.075958-0600 RoadrunnerComfort[5034:11127394] Task <25F2EC07-30D7-4532-BD6A-D35A41716AF2>.<7> HTTP load failed, 1048855/0 bytes (error code: -1005 [4:-4]) 2022-07-04 17:21:52.082677-0600 RoadrunnerComfort[5034:11127423] Task <25F2EC07-30D7-4532-BD6A-D35A41716AF2>.<7> finished with error [-1005] Error Domain=NSURLErrorDomain Code=-1005 "The network connection was lost." UserInfo={_kCFStreamErrorCodeKey=-4, NSUnderlyingError=0x283fb49c0 {Error Domain=kCFErrorDomainCFNetwork Code=-1005 "(null)" UserInfo={NSErrorPeerAddressKey=<CFData 0x2812ecc80 [0x22eb841b8]>{length = 16, capacity = 16, bytes = 0x10020050c0a856290000000000000000}, _kCFStreamErrorCodeKey=-4, _kCFStreamErrorDomainKey=4}}, _NSURLErrorFailingURLSessionTaskErrorKey=LocalUploadTask <25F2EC07-30D7-4532-BD6A-D35A41716AF2>.<7>, _NSURLErrorRelatedURLSessionTaskErrorKey=(   "LocalUploadTask <25F2EC07-30D7-4532-BD6A-D35A41716AF2>.<7>" ), NSLocalizedDescription=The network connection was lost., NSErrorFailingURLStringKey=http://192.168.86.41/update, NSErrorFailingURLKey=http://192.168.86.41/update, _kCFStreamErrorDomainKey=4} 2022-07-04 17:21:52.083212-0600 RoadrunnerComfort[5034:11127396] [tcp] tcp_input [C7:2] flags=[R.] seq=3409008496, ack=2962928595, win=5744 state=LAST_ACK rcv_nxt=3409008496, snd_una=2962927159 RRC Task error: Optional(Error Domain=NSURLErrorDomain Code=-1005 "The network connection was lost." UserInfo={_kCFStreamErrorCodeKey=-4, NSUnderlyingError=0x283fb49c0 {Error Domain=kCFErrorDomainCFNetwork Code=-1005 "(null)" UserInfo={NSErrorPeerAddressKey=<CFData 0x2812ecc80 [0x22eb841b8]>{length = 16, capacity = 16, bytes = 0x10020050c0a856290000000000000000}, _kCFStreamErrorCodeKey=-4, _kCFStreamErrorDomainKey=4}}, _NSURLErrorFailingURLSessionTaskErrorKey=LocalUploadTask <25F2EC07-30D7-4532-BD6A-D35A41716AF2>.<7>, _NSURLErrorRelatedURLSessionTaskErrorKey=(   "LocalUploadTask <25F2EC07-30D7-4532-BD6A-D35A41716AF2>.<7>" ), NSLocalizedDescription=The network connection was lost., NSErrorFailingURLStringKey=http://192.168.86.41/update, NSErrorFailingURLKey=http://192.168.86.41/update, _kCFStreamErrorDomainKey=4})`
Replies
0
Boosts
0
Views
1.3k
Activity
Jul ’22
iOS 14 and browser scroll bars (webkit)
Hello! I have this scrollable container. It works fine across browsers and devices until it hits iOS14. Behaves just the way it should iOS 12 - (cant test iOS13 right now) The goal is to always show the scrollbar. On iOS14 only the native scrollbar is shown when scrolling is happening. Is there any way to fix this for iOS14 users? thanks in advance! div {&#9; max-height: 20rem; &#9;overflow-x: hidden; &#9;overflow-y: auto; &#9;margin-right: 0.25rem; &#9;::-webkit-scrollbar-track { &#9;&#9;border-radius: 0.125rem; &#9;&#9;background-color: lightgray; &#9;} &#9;::-webkit-scrollbar { &#9;&#9;width: 0.25rem; &#9;&#9;border-radius: 0.125rem; &#9;} &#9;::-webkit-scrollbar-thumb { &#9;&#9;border-radius: 0.125rem; &#9;&#9;background-color: gray;}; &#9;} }
Replies
6
Boosts
1
Views
21k
Activity
Jul ’22
HTML date min-max attribute not working in iPhone
Hi All, We are using html input type date in our hybrid application which launches the native datepicker in the app. As we need the app to be accessible we chose the html type date. However at certain instances we want to restrict the date selection till present date only. We have used the max attribute to achieve this, for some reasons the datepicker is not respecting this attribute and allowing the user to select future dates. We are in a tricky position since we do not want to use any library and the production date is nearby. Below is the markup we have used for replicating the behavior: form label for="party"Choose your preferred party date: input type="date" name="party" min="2017-04-01" max="2017-04-30" /label /form Any help would be appreciated. Thanks in advance.
Replies
6
Boosts
5
Views
5.6k
Activity
Jun ’22
Issue with HTML <select> element in iOS 15
Application is hosted on web kit, after iOS 15 upgrade, select dropdown triggering error. "[Assert] Failed to present a context menu for configuration with identifier ***. This is likely due to a different presentation occuring during the lifecycle of the interaction."
Replies
1
Boosts
3
Views
2.5k
Activity
Jun ’22
Issue with HTML select element in iOS 15 beta 8
On iOS 15 beta, when I tried to check my application, the select element is having issue. As when I clicked on select dropdown, the option list was not shown. The error message was "Failed to present a context menu for configuration with identifier".
Replies
5
Boosts
3
Views
5.4k
Activity
Jun ’22
How to *permanently* give a website permission to autoplay audio?
I have an SPA web app I've built for Safari iOS. One feature I have is that (with user's permission!) I would like to play audio alerts of various sorts based on events that take place in the app. (Think a chat app playing a "message received" sound.) ... again, this would be with the user's permission. This is very much a feature of the app and not nagware or adware. Currently, of course, this isn't possible. Audio can only be played in response to some user-initiated action, and that "permission" only lasts until the page closes or is reloaded. So, question: Is there a way a user can permanently give permission to a website on iOS to autoplay sound files?
Replies
0
Boosts
0
Views
587
Activity
Jun ’22
Unexpected behaviour when downloading a file fails
I'm developing a REST API app that generates some PDFs for my users, but there are only available for a certain period of time. To download them I'm using the a HTML tag: <a href="/api/items/1/generate?type=register" download="Important Letter.pdf"> <svg>...</svg> </a> This works fine in the normal flow of the use case, but if a user request a PDF outside of the download period, the server responds to the request with a 422 (Unprocessable Entity) HTML code, and place a json on the body of the request: HTTP/1.1 422 Unprocessable Entity Content-Type: application/json;charset=utf-8 {"error" : "Registration period expired", "type" : "expired", "data" : {"id" : 1}} Safari does not interpret this error and it generates the Important Letter.pdf file and writes the json content on it. Is there a wat to avoid this behavior and display an error message to the user? I was wondering if my server should send some specific error code.
Replies
0
Boosts
0
Views
594
Activity
Jun ’22
UIMarkupTextPrintFormatter - Non-public API?
I recently had a build go into the system for Test Flight distribution and got the automated message: "ITMS-90338: Non-public API usage - The app contains or inherits from non-public classes in Contents/MacOS/: UIMarkupTextPrintFormatter." I've been using UIMarkupTextPrintFormatter for a long time, and it appears to be a very-public API. I don't even see it as being marked obsolete/deprecated. Is anyone else getting this message? Is this just a goof on Apple's part, or will I need to find some alternative to UIMarkupTextPrintFormatter?
Replies
1
Boosts
2
Views
939
Activity
Jun ’22
Input focus issue inside iframe
Hi!I currently developing a mobile website and found that Safari on iOS has some problems setting the focus on inputs when they are inside an iframe.When in a page you have many inputs you can tap on a field and then use the next / previous buttons on the keyboard to navigate between the fields. When the focus move to another input Safari scroll automatically the page centering the field in the page. This is great and works well.The problem is when the fields are inside a page of an iframe. In this case when you change focus from one field to another Safari has some kind of issue; the page “bounce” and the focused field is not centered in the page.I have made a video of a simple page that has this issue. In the first part of the video the page without the iframe is loaded and the focus works correctly. In the second part the page with the iframe is loaded and the issue is visible.http://www.dale1.ch/documents/safari_iframe_focus_issue.movThe code of the first page (testinput.html) where the focus is correctly handled is this:&lt;!DOCTYPE html&gt; &lt;html&gt; &lt;head&gt; &lt;title&gt;Test input&lt;/title&gt; &lt;meta name="viewport" content="width=device-width, height=device-height, initial-scale=1, minimum-scale=1, maximum-scale=1, user-scalable=no" /&gt; &lt;/head&gt; &lt;body&gt; &lt;div&gt;&lt;span&gt;Input 1: &lt;/span&gt;&lt;input type="text" tabindex="1" /&gt;&lt;/div&gt; &lt;div&gt;&lt;span&gt;Input 2: &lt;/span&gt;&lt;input type="text" tabindex="2" /&gt;&lt;/div&gt; &lt;div&gt;&lt;span&gt;Input 3: &lt;/span&gt;&lt;input type="text" tabindex="3" /&gt;&lt;/div&gt; &lt;div&gt;&lt;span&gt;Input 4: &lt;/span&gt;&lt;input type="text" tabindex="4" /&gt;&lt;/div&gt; &lt;div&gt;&lt;span&gt;Input 5: &lt;/span&gt;&lt;input type="text" tabindex="5" /&gt;&lt;/div&gt; &lt;div&gt;&lt;span&gt;Input 6: &lt;/span&gt;&lt;input type="text" tabindex="6" /&gt;&lt;/div&gt; &lt;div&gt;&lt;span&gt;Input 7: &lt;/span&gt;&lt;input type="text" tabindex="7" /&gt;&lt;/div&gt; &lt;div&gt;&lt;span&gt;Input 8: &lt;/span&gt;&lt;input type="text" tabindex="8" /&gt;&lt;/div&gt; &lt;div&gt;&lt;span&gt;Input 9: &lt;/span&gt;&lt;input type="text" tabindex="9" /&gt;&lt;/div&gt; &lt;div&gt;&lt;span&gt;Input 10: &lt;/span&gt;&lt;input type="text" tabindex="10" /&gt;&lt;/div&gt; &lt;div&gt;&lt;span&gt;Input 11: &lt;/span&gt;&lt;input type="text" tabindex="11" /&gt;&lt;/div&gt; &lt;div&gt;&lt;span&gt;Input 12: &lt;/span&gt;&lt;input type="text" tabindex="12" /&gt;&lt;/div&gt; &lt;div&gt;&lt;span&gt;Input 13: &lt;/span&gt;&lt;input type="text" tabindex="13" /&gt;&lt;/div&gt; &lt;div&gt;&lt;span&gt;Input 14: &lt;/span&gt;&lt;input type="text" tabindex="14" /&gt;&lt;/div&gt; &lt;div&gt;&lt;span&gt;Input 15: &lt;/span&gt;&lt;input type="text" tabindex="15" /&gt;&lt;/div&gt; &lt;div&gt;&lt;span&gt;Input 16: &lt;/span&gt;&lt;input type="text" tabindex="16" /&gt;&lt;/div&gt; &lt;div&gt;&lt;span&gt;Input 17: &lt;/span&gt;&lt;input type="text" tabindex="17" /&gt;&lt;/div&gt; &lt;div&gt;&lt;span&gt;Input 18: &lt;/span&gt;&lt;input type="text" tabindex="18" /&gt;&lt;/div&gt; &lt;div&gt;&lt;span&gt;Input 19: &lt;/span&gt;&lt;input type="text" tabindex="19" /&gt;&lt;/div&gt; &lt;div&gt;&lt;span&gt;Input 20: &lt;/span&gt;&lt;input type="text" tabindex="20" /&gt;&lt;/div&gt; &lt;div&gt;&lt;span&gt;Input 21: &lt;/span&gt;&lt;input type="text" tabindex="21" /&gt;&lt;/div&gt; &lt;div&gt;&lt;span&gt;Input 22: &lt;/span&gt;&lt;input type="text" tabindex="22" /&gt;&lt;/div&gt; &lt;div&gt;&lt;span&gt;Input 23: &lt;/span&gt;&lt;input type="text" tabindex="23" /&gt;&lt;/div&gt; &lt;div&gt;&lt;span&gt;Input 24: &lt;/span&gt;&lt;input type="text" tabindex="24" /&gt;&lt;/div&gt; &lt;div&gt;&lt;span&gt;Input 25: &lt;/span&gt;&lt;input type="text" tabindex="25" /&gt;&lt;/div&gt; &lt;div&gt;&lt;span&gt;Input 26: &lt;/span&gt;&lt;input type="text" tabindex="26" /&gt;&lt;/div&gt; &lt;div&gt;&lt;span&gt;Input 27: &lt;/span&gt;&lt;input type="text" tabindex="27" /&gt;&lt;/div&gt; &lt;div&gt;&lt;span&gt;Input 28: &lt;/span&gt;&lt;input type="text" tabindex="28" /&gt;&lt;/div&gt; &lt;/body&gt; &lt;/html&gt;This is the code of the page that has the issue (testinput_iframe.html):&lt;!DOCTYPE html&gt; &lt;html&gt; &lt;head&gt; &lt;title&gt;Test input&lt;/title&gt; &lt;meta name="viewport" content="width=device-width, height=device-height, initial-scale=1, minimum-scale=1, maximum-scale=1, user-scalable=no" /&gt; &lt;/head&gt; &lt;body&gt; &lt;iframe src="/testinput.html" /&gt; &lt;/body&gt; &lt;/html&gt;The issue is present in Safari on the iPhone, iPad and the xCode Simulator from version 8.4 to version 9.2.Someone know if this is a bug? There is way to fix it in css or javascript?Thanks and sorry for my english! 😉
Replies
9
Boosts
0
Views
22k
Activity
Jun ’22
Handling mentions and hashtags
I'm fairly new to Swift and SwiftUI (and iOS development in general). I have a web app written in ReactJS and we use draftJS (Facebook opensource) to do rich text editing, which handles @mentions and #hashtags. When the keystroke listener picks up an @ or #, it looks up the mention or tag and when the user selects, it formats the result as a formatted link to the user or the tag. This works great. However, we started iOS development and are trying to bring the two version's feature sets to parity. I'm trying to build the iOS version using SwiftUI because of the reactive nature of the framework and how it mimics a lot of the same concepts from ReactJS. DraftJS has a complex data structure that gets serialized and stored as a JSON object OR I can save it as HTML. Or both. It's honestly way more than I need, but that's basically how to do it in React. I don't really need rich text. What I need is mentions, hashtags. How can I architect a solution that works for both platforms and stores state as something that both platforms can create and consume?
Replies
1
Boosts
0
Views
1.2k
Activity
May ’22
Safari 15.4 window.open freezes both parent and child tabs
Hello Safari 15.4 window.open freezes both parent and child tabs Made a github page where you can reproduce the bug: https://swanty.github.io/pdfjs-safari/broken.html It happens only when special conditions are met: The broken.html page loads Stripe v3 js file (important for the freeze) Upon clicking CLICK ME the code executes window.open().location = '...';, thus both parent and child tabs are linked together in the same process The second page opens the latest release of mozilla pdf.js that loads .pdf that contains only 1 image (the image is important for the freeze) Image is simply 3000x3000 PNG, 1 color, 1.2 kB file created with photopea, nothing special, except the resolution. PDF I created by dragging the .png into Chrome and clicking Print -> Save as pdf, also nothing special, just a regular pdf. On our production web if I navigate pages in same tab and at any point that stripe JS is loaded and then I navigate to a different page where window.open().location = '...' opens that pdf.js + .pdf file with special image then both tabs freeze. It doesn't matter how many times I navigate the pages (in same tab), it seems that once the stripe js is loaded, it lingers in the tab memory somewhere and causes the freeze. I would really appreciate it if someone from the Safari developer team could take a look at this and help find a solution :) Thank you
Replies
2
Boosts
0
Views
2.4k
Activity
May ’22
Choosing Audio Output of iPhone while using HTMLAudioElement.
I was working on a project where I used the HTMLAudioElement to record an audio response. While playing the audio on iPhone, I noticed that the sound came just from the ear speaker and not the loud speaker which is desired by the user. Is there a way to select the output to come out of the loud speaker as in the former case the user can't hear the preview audio properly?
Replies
2
Boosts
1
Views
947
Activity
May ’22