Sign in

Audio player – Embed

  • This topic has 4 replies, 3 voices, and was last updated 2 days, 1 hour ago by .
Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #8397
    Avatar photoKilian

    Hi,

    I hope this topic has not already been discussed.

    We’ve been using Publii for few weeks now and we’ve encountered some issues with the integration of an audio player such as Mixcloud, Podbean… When we paste the iframe code within the “Insert/edit media>Embed” tab, it appears in the draft but when we want to have a preview, the player won’t appear (it’s the same when the website is synchronised).

    This link, for example won’t appear : <iframe width=”100%” height=”120″ src=”https://www.mixcloud.com/widget/iframe/?hide_cover=1&light=1&hide_artwork=1&feed=%2FKuBwebmedia%2Fralentir-ep01-podcast%2F&#8221; frameborder=”0″ ></iframe>

    It only appears if we expands manually the size of “box” the audio player finds itself in. But doing so, even if the the audio player now appears on the website (preview and synchronised) the audio player is no more responsive. On a pc it doesn’t really matter however on a mobile phone, the audio player does not appear entirely.

    We are no expert in that field, so I don’t know wheter that’s clear, therefore, we would very appreciate some help if someone has a better understanding of this issue.

    Thank you

    #8399
    Avatar photokensquires

    Hello Folks,

    I remember helping one guy on here about embedding a video that he was hosting himself so let’s see if I can work my magic for this as well.

    I see what you mean I copy/paste the code and it’s not showing up…

    I have it solved and let me apologize right this moment this is going to be a long-winded answer

    So I took the code you supplied above and tested it, I got the same results you did. At which point I actually looked at the code. The code seemed fine to me as I’ve embedded a number of things before and all those codes seem rather standard to a certain degree. I then clicked on the link that got highlighted in your above post and it took me here: Mixcloud

    Now that seems like a very basic player but that’s fine, not knocking that so I tried to embed it directly from that page, but that too wasn’t working. I tried a few times thinking I did something wrong. Also got nowhere, so then I paid a closer bit of attention and under the share section, it had two things URL and Embed. So I went directly to the URL which took me here: https://www.mixcloud.com/KuBwebmedia/ralentir-ep01-podcast/

    From that page, I chose to share it from that as you can choose a player style like a classic player, etc. So I chose classic and got the link and things continued not to work so I continued to dick with the code and found the problem.

    Alright so here’s the long/skinny of it, the code you posted above is the same code I was using. But I found one thing wrong with it:
    iframe width=”100%”
    The first line of the code says that it turns out that Publii dislikes the percent sign and more or less says “huh?” so if you remove the percent sign “%” and just have an actual number your player will work just fine. For the record, I chose the number 300 in order for it to work on mine. Oh and in case you worried I resized my browser a few different times and each time the player would fit no matter how long I had the audio player

    #8412
    Avatar photoKilian

    Hi,

    I should first like to thank you for your time and consideration.

    So, I tried what you’ve done and it worked ! Thank you. That’s a first step, although I wish it dit work by itself and not have to “guess”.

    Now we have an other issue… There is a large empty space at the bottom of the player. Here a screenshot :  https://postimg.cc/sBfDm3f1

    There is no explanation. Here is the code.

    <p><iframe width="325" height="120" src="https://www.mixcloud.com/widget/iframe/?hide_cover=1&amp;light=1&amp;feed=%2FKuBwebmedia%2Fralentir-ep01-podcast%2F" frameborder="0"></iframe></p>
    <p>Avec Dominique Méda, sociologue spécialiste du travail, l<span style="color: var(--text-primary-color); font-family: var(--editor-font-family); font-size: inherit; font-weight: var(--font-weight-normal);">’équipe Orignal communication, </span><span class="s1">David Bernard, dirigeant d’AssessFirst. <br>Réalisation : Alicia Blancher (Kaizen magazine)<br></span></p>

    I don’t know if that you are aware of this “sudden margin” which, incidentally, does not appear in the draft.

    In any case, we’ll try to resolve it, whatever, it’s unfortunate it’s not that simpler.

    Thank you

     

    #8413
    Avatar photokensquires

    My personal advice is to teach yourself some HTML, I’m not trying to offend by saying that but this is just one of many problems with publii it inputs random bits of code like this for no reason. Forcing you to deal with any sort of random BS/changes that it chose to implement because that’s what they (the creators) feel is good for SEO when it’s truly clear that things like this hurt more than they help.

    I have since moved on from using such a program in which you are handcuffed to the ways of the creator and have very little that you can do about it just because of their own beliefs for what they see is the best method for sites when things like this make the site more ugly/unappealing than anything.

    #8414
    Avatar photoBob

    don’t know if that you are aware of this “sudden margin” which, incidentally, does not appear in the draft.

    To keep all iframes responsive, they are placed in an additional container with an aspect ratio calculated from the iframe’s width and height attributes.
    You only need to enter the correct value for these attributes. In your case, I propose to use the following: width=”537” height=”120

    You can also disable the aspect ratio by adding to your iframe the `data-responsive=”false”` attribute (More about it: https://getpublii.com/dev/how-the-post-content-is-modified-before-the-output/#make-iframes-responsive)

    --
    Do you appreciate the support you've received today? If so, consider donating to the Publii team by clicking here; we'll be sure to use your donation to make Publii even better!

Viewing 5 posts - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.