Jump to content

Coding to enable single track music on android and Apple devices

Recommended Posts

Site URL: https://www.stevelbanks.co.uk/

Hi, I found the code to continuously play the piano track Milan your hear when opening the 'Paintings' page on this site, but it does not like some mobile devices, especially Apple. I understand that Apple does not like the instant/continuous play of music tracks on website pages. Does anyone know of any coding solution or advice that may help to allow the music to play across all mobile devices please. Much appreciated.

This was some advice and conversation around the issue with a web developer contact:

Good afternoon Steve,  Below is the transcript of a discussion I had with an app developer - unfortunately web design is not his area however he was helpful.  It appears the web industry is in debate regarding whether auto-play music should be allowed so a number of browsers now have this disabled. Looking through various technical forums it appears this can be fixed, if you know what your doing but this includes Java scripting!.  The easiest fix may be to just add a start button that starts the music - this could be embedded within a statement that suggest the best viewing experience is accompanied by Sam’s tune? Sell it as  a visual audio experience!
 
 
Alternatively, you could have Matt drop a query to the SquareSpace technical forum as contributors seems really keen to help the less skilled, 
 
The addition of the link would be my approach however as this way you can guarantee the music is played if the viewer wishes,  whatever the browser!
 
Good luck,
 
Begin forwarded message:
 
From: Steve Lockwood <Steve.Lockwood@avantiplc.com>
Subject: mp3
Date: 10 September 2020 at 13:32:47 BST
 
 
 
You all right?
https://ca.slack-edge.com/T0JB654MA-U1XQT70UF-gf4f3c8ef442-48
I'm hoping you can provide a little advice regarding CSS optimisation of mp3 for mobile devices?
Every used SquareSpace?
https://ca.slack-edge.com/T0JB654MA-U58AL7RP0-geeb4727ffe4-48
oh, that is something new
https://ca.slack-edge.com/T0JB654MA-U1XQT70UF-gf4f3c8ef442-48
A friend has asked my why his website plays audio or a laptop but not mobile devices?
https://ca.slack-edge.com/T0JB654MA-U58AL7RP0-geeb4727ffe4-48
no, unfortunately have no experience with that
I can have a look when you provide me a link
https://ca.slack-edge.com/T0JB654MA-U1XQT70UF-gf4f3c8ef442-48
the website is stevelbanks.co.uk  an artist I know who has a exhibition soon but his website is broke!
https://ca.slack-edge.com/T0JB654MA-U58AL7RP0-geeb4727ffe4-48
should it play background music on that page?
can't hear anything (edited) 
https://ca.slack-edge.com/T0JB654MA-U1XQT70UF-gf4f3c8ef442-48
Interestingly just noticed that  the music stops if the pictures are displayed but the header information is moved off screen -
https://ca.slack-edge.com/T0JB654MA-U58AL7RP0-geeb4727ffe4-48
I'm using Linux machine, maybe it have problem with it too
let me check it on Windows, I'll get back to you soon
https://ca.slack-edge.com/T0JB654MA-U1XQT70UF-gf4f3c8ef442-48
Thank you, any suggestion would be a great help
https://ca.slack-edge.com/T0JB654MA-U58AL7RP0-geeb4727ffe4-48
music actually plays nicely on my Android phone both in Firefox and Chrome browsers :smile:
works also under Edge browser on Windows
but is not working on Firefox, both Linux & Windows
it looks more like javascript/cross browser issue
mp3 itself is fine also, I can play it if I put link to mp3 directly in any browser, even Firefox
I can try dig deeper why it is not working on Firefox but mp3 itself looks good for me
https://ca.slack-edge.com/T0JB654MA-U1XQT70UF-gf4f3c8ef442-48
Doesn't work on an iPad or IOS also, if this helps, thanks
https://ca.slack-edge.com/T0JB654MA-U58AL7RP0-geeb4727ffe4-48
Stack OverflowStack Overflow
Before I get flamed to death, I know this doesn't work currently due to Apple's concern over downloading an audio file automatically. However, my question is: Has anyone found a cunning workaround...
problem solved (edited) 
sound autoplay is disabled by default in most of the browsers
when I enabled it in my Firefox, mp3 is playing as expected
quoting:
There is no chance to get autoplay working in mobile browsers. Android and iOS doesn't allow it and personally I think that is a feasible confinement! Imagine every second website you will open plays and ugly sound at start!
https://ca.slack-edge.com/T0JB654MA-U1XQT70UF-gf4f3c8ef442-48
HI Pawel, This explain the issue, thank you for looking at this
Link to comment
  • Replies 0
  • Views 128
  • Created
  • Last Reply

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Squarespace Webinars

Free online sessions where you’ll learn the basics and refine your Squarespace skills.

Hire a Designer

Stand out online with the help of an experienced designer or developer.