IP.Board Tutorials

Default Volume For Profile Songs

Submitted by luxor, , Thread ID: 123350

Thread Closed
luxor
Novice
Level:
0
Reputation:
0
Posts:
26
Likes:
5
Credits:
77
03-03-2019, 10:09 PM
#1
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

Code:
{{$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:

Code:
{{$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!)
[Image: 76561198335533142.png][Image: AddFriend.png]

Users browsing this thread: 1 Guest(s)