Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
Advanced Search
  • 0

How to play audio file in same window on mobile without Soundblock block?


kashuda

Question

Hi,

I want to embed an audio file that opens in the same window on my mobile device when I click to play it. The Soundclock block allows this but I don't want to use Soundcloud. Uploading a file or linking to an external means the file has to be opened in a separate window on my mobile to play it. Do you recommend another type of block that would allow me to play an audio file in the same window, and not open to a new window?

Thank you.

Edited by kashuda
Link to post
  • Answers 9
  • Created
  • Last Reply

Top Posters For This Question

9 answers to this question

Recommended Posts

  • 0

@kashuda, The good fellas over at [squarespaceWebsites][1] updated their finding in the SQS widget script which allows the Squarespace audio block to play WITHOUT opening a new window with the default IOS media player. Just code inject this into your page header where you audio block lives and all is well again. Thank god as this was driving me f**king bonkers!! Apparently is needs to be with a "domready" function as opposed to the old "squarespace:initialized"Ok here it is:


<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>




Link to post
  • 0

@Fubeman this is working for me in safari, but on chrome, the first time i tap 'play,' it still opens up the native iOS player. i have to go back in my browser and then tap 'play' again for it to play on the same page. any help troubleshooting would be much appreciated!

Link to post
  • 0

Sadly, this is not working for me.... is there a solution?

Re: MobileEssentially, I have a written article on the webpage for which there is an audio file. I want the user to be able to play the audio and read the article at the same time.

It seems to be possible on the desktop, but not on mobile.

Please help, thank you so much!

Link to post
  • 0

Hello, this is ancient, but issue is still here. Shared code snippet does not solve the issue anymore (if it ever did).

Im trying to get the audio on same tab at mobile in iOS. Is there any way to do so?

Any help appreciated

Link to post
  • 0

I have the same content scenario - audio block with text and images, but when the audio is iniated on mobile, the iOS player takes over the screen.

 

Hoping for a workaround.

On 8/24/2018 at 11:29 PM, Global1570048496 said:

Sadly, this is not working for me.... is there a solution?

Re: MobileEssentially, I have a written article on the webpage for which there is an audio file. I want the user to be able to play the audio and read the article at the same time.

It seems to be possible on the desktop, but not on mobile.

Please help, thank you so much!

 

Link to post
  • 0

Hey, for those who recently have ran into this issue. I found a fix!

 

<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>

 

inject the following code into the page settings that contains the audio blocks.

Found all the info on the matter here: https://www.squarewebsites.org/blog/prevent-squarespace-audio-blocks-open-in-player-on-ios-devices

 

Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment


×
×
  • Create New...