eliblock Posted November 8, 2021 Posted November 8, 2021 (edited) Site URL: https://www.eliblock.co.uk Hi there, I just launched my new site which is an audio portfolio. I find that when I click on my audio blocks from an iphone it opens the player in a new window. When on a desktop it's fine. Is there a way to stop this from happening? So it just stays on the player on the main site page? Any help would be much appreciated. Thanks! Eli Edited November 8, 2021 by eliblock
Wolfsilon Posted November 8, 2021 Posted November 8, 2021 This is most likely a relatively new issue for audio blocks. The audio blocks included by Squarespace are incredibly depreciated blocks and next to useless for modern uses in my opinion. Although, looking at your website, I do really like what you've done to customize them. My apologies if this seems rude but I'm very critical of these particular blocks and they need to be updated. I'd recommend you raise issue with the performance to customer support and hopefully they revamp these blocks soon. Otherwise, the answer is no. On mobile, they're seen as independent files and cannot be played in the page itself. Not easily at least. I'd recommend using an external plugin or hosting them through SoundCloud. If not SoundCloud, the ElfSight audio widget is fantastic. Elfsight 1
eliblock Posted November 9, 2021 Author Posted November 9, 2021 Ah thanks for the feedback. Elfsight looks quite good and I've used soundcloud plenty. I was hoping this was something you can sort with CSS, it would be a pain to re upload everything!
Solution paul2009 Posted November 9, 2021 Solution Posted November 9, 2021 (edited) On 11/8/2021 at 9:13 PM, eliblock said: When I click on my audio blocks from an iphone it opens the player in a new window. Is there a way to stop this from happening? On iOS devices (iPhones, iPads) Audio Blocks detect that iOS is being used and they default to the built-in iOS player that opens on a new page. You should be able to stop this by using some code to tell the Squarespace Audio Block that the visitor is not using iOS. This should prevent the block attempting to invoke the built in iOS player. To do this, add the following script to Settings > Advanced > Code Injection > Footer: <script> window.addEventListener("load", function(){ Y.UA.ios = 0; }) </script> Note: This was tested on a Squarespace 7.1 site running Safari on iOS 15. If my post helped you, please click a 'Like' or 'Thanks' icon below ⬇️ Edited February 13, 2023 by paul2009 Dor Reznik, tuanphan, brian and 1 other 2 1 1 Me: I'm Paul, a SQSP user for >18 yrs & Circle Leader since 2017. I value honesty, transparency, diversity and good design ♥. Work: Founder of SF.DIGITAL. We provide high quality original extensions to supercharge your Squarespace website. Content: Views and opinions are my own. Links in my posts may refer to my own SF.DIGITAL products or may be affiliate links. Forum advice is completely free. You can thank me by selecting a feedback emoji. Buying a coffee is generous but optional.
eliblock Posted November 10, 2021 Author Posted November 10, 2021 Ah thanks Paul - code injection appears to be a premium feature? Googling I came across this but have no idea - coding not my strong suit!! //Prevent iOS from opening audio blocks in new window <script> Y.on('domready', function(){ Y.UA.ios = 0; //Y.UA object have test key for different platforms. //Setting ios value to 0 here allow to skip default Audio Block's behavior }) </script> Thanks for your help!
paul2009 Posted November 10, 2021 Posted November 10, 2021 6 hours ago, eliblock said: Googling I came across this You’ve just posted a copy of what I’ve already provided so this isn’t anything new. You’re right that you can’t add script if you are on a Personal Plan, which means you won’t be able to change the audio block’s behaviour or use an alternative player. You will require a Business Plan. Wolfsilon 1 Me: I'm Paul, a SQSP user for >18 yrs & Circle Leader since 2017. I value honesty, transparency, diversity and good design ♥. Work: Founder of SF.DIGITAL. We provide high quality original extensions to supercharge your Squarespace website. Content: Views and opinions are my own. Links in my posts may refer to my own SF.DIGITAL products or may be affiliate links. Forum advice is completely free. You can thank me by selecting a feedback emoji. Buying a coffee is generous but optional.
Elfsight Posted November 18, 2021 Posted November 18, 2021 Hello guys! @Wolfsilonthanks a lot for recommending us! @eliblockwe do have Player widgets that are relatively easy in customization and installation. Feel welcome to try them out - and if any assistance needed, our Support Team will be always delighted to help 🙂 Regards, Elfsight Team Explore all Elfsight widgets - Widget Catalog Follow us - Facebook | Instagram Wolfsilon 1
eliblock Posted November 19, 2021 Author Posted November 19, 2021 On 11/9/2021 at 11:27 PM, paul2009 said: You’ve just posted a copy of what I’ve already provided so this isn’t anything new. You’re right that you can’t add script if you are on a Personal Plan, which means you won’t be able to change the audio block’s behaviour or use an alternative player. You will require a Business Plan. Thanks Paul. Yes I got in touch with Squarespace, they were pretty unhelpful, seems upgrading to business is the only workaround, which seems a little short sighted to me. Thanks for the help!
tuanphan Posted June 5 Posted June 5 On 6/4/2024 at 2:52 AM, xjws said: Hi, hope all is well. 🙂 I copied a code to stop an audio player from opening in a different window especially on iphones however it still opens in a different window that says static space. Is there a new code? Can anyone please help me with this? I'm trying to use it for different clients. Unfortunately I haven't been able to find any codes that will prevent this from happening. Please advise. Many Thanks, Can Here's the Url to site : https://www.hitmanjoe.com/ The code I used was: <script> window.addEventListener("load", function(){ Y.UA.ios = 0; //Y.UA object have test key for different platforms. //Setting ios value to 0 here allow to skip default Audio Block's behavior }) </script> <script> window.addEventListener("load", function(){ Y.UA.ios = 0; }) </script> (footer in code injection) I solved this for a member last night. They confirm it is fixed, but I don't sure if it works or not, you can check this site url, if it works in your end, I will give you guide to fix it. Email me if you have need any help (free, of course.). Answer within 24 hours. Or send to forum message Contact Customer Care - Learn CSS - Buy me a coffee (thank you!)
bbshayde Posted June 28 Posted June 28 On 6/5/2024 at 5:13 AM, tuanphan said: I solved this for a member last night. They confirm it is fixed, but I don't sure if it works or not, you can check this site url, if it works in your end, I will give you guide to fix it. Just used this and it solved the problem! Thank you, Tuan! Thank you everyone else for inquiring and responding!!
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment