Jump to content
WebFlake

Default Volume For Profile Songs


Akkita

Recommended Posts

This is for the plugin as shown Here

Some say it does not work. I have installed it perfectly and had only one issue. When you view the profile it blasts the music at full volume. It works on a variety of themes even with friendly urls activated.

To fix the ear murder simply go to your ACP > Customize > Themes > (Theme you wish to edit) Edit HTML/CSS > Core/global/plugins/ps_display.

From here you want to open it and view the contents. It should show as 

 

{{$profileSong = $member->profileSong();}}
{{if $profileSong->file}}
  <div class='cProfileSidebarBlock ipsPad ipsBox ipsSpacer_bottom'>
    <h2 class='ipsType_sectionHead ipsType_reset'>Profile Song</h2>

    <div class='ipsType_center'>
      <p>
        <audio autoplay="" controls="" loop="" preload="" class="ps_audio">
          <source src="{$profileSong->file->url}"></source>
        </audio>
      </p>
    </div>
  </div>
{{endif}}

Now replace it all with -



{{$profileSong = $member->profileSong();}}
{{if $profileSong->file}}
  <div class='cProfileSidebarBlock ipsPad ipsBox ipsSpacer_bottom'>
    <h2 class='ipsType_sectionHead ipsType_reset'>Profile Song</h2>

    <div class='ipsType_center'>
      <p>
        <script>
       window.onload = function() {
    var backgroundAudio=document.getElementById("music");
    backgroundAudio.volume=0.09;
}
        </script>
        <audio id="music" autoplay="" controls="" loop="" preload="" class="ps_audio">
          <source src="{$profileSong->file->url}"></source>
        </audio>
      </p>
    </div>
  </div>
{{endif}}

 

Now you can freely change the default volume at which the music will play at when you visit a user's profile by changing <backgroundAudio.volume=0.09;> (Do note that .5 is 50% so i recommend .1 or lower!)

Edited by Curious Nezy
  • Thanks 1

REOdOXQ.jpg

Check out my Twitter!

Link to comment
Share on other sites

  • 1 month later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...