How to change media player default volume?

Home Forums Legacy Support Support queries How-to & Troubleshooting How to change media player default volume?

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #73266
    pacworks
    Spectator
    I am using a custom audio player with WPLMS. I was having an issue where the WPLMS audio player was conflicting with the styling of my custom audio player. I was able to fix those issues, but it seems as thought the default volume for the WPLMS audio player is conflicting with the default volume of my custom audio player. Is there a way I can disable or change the default volume on the WPLMS audio player?
    #73390
    H.K. Latiyan
    Participant
    Can you please share some screenshot of the issue ?  
    #73429
    pacworks
    Spectator
    This reply has been marked as private.
    #73504
    H.K. Latiyan
    Participant
    This reply has been marked as private.
    #73586
    pacworks
    Spectator
    Thank you for your reply. I apologize for the confusion. My issue isn't with the way the player looks. I had a previous issue with that, but was able to get it resolved on a different post in this forum. In that post, it so happened that the styles for the default audio player in WPLMS was interfering with the styles of my custom player. The issue I am having now is that I believe the default audio volume for the default WPLMS audio player may be conflicting with the default volume I have set for my custom player. For instance. I have set the default volume for my custom player at 20% volume. It loads at 20% volume for all pages except when I start a unit. Once I start a unit, the volume jumps to around 100%. Basically, I just want to know I can disable the default volume for the WPLMS audio player or at least change it to about 20% volume so that my custom player loads at 20% volume by default. It may be better for me if I can disable the entire WPLMS audio player. I will not be using it for any of my courses and it will probably help avoid any further interference with my custom player. Is this possible?
    #73588
    pacworks
    Spectator
    After doing a little more digging around, it seems as though the WPLMS audio player is the same audio player that loads with WordPress by default. Is that correct? I couldn't find any files within the WPLMS theme that pertained to an audio or media player. However, in wp-includes/js I found mediaelement-and-player.min.js and changed startVolume: .8 to startVolume: .2 and that seems to have fixed the jump in volume on my custom media player when navigating form one of my regular pages to an LMS page (unit, quiz, etc.). This isn't really a desired fix because I will have to change this every time WordPress updates. What I am having a hard time figuring out is why the default volume for my custom player loads fine outside of LMS pages. The only thing I can think of is, even though I am not using the WPLMS audio player, it is still loading settings from mediaelement-and-player.min.js and overriding the default volume I have set for my custom player. Is there a way I can prevent the WPLMS audio player from loading?  
    #73637
    H.K. Latiyan
    Participant
    Yes that is correct. The WPLMS uses the same audio players as defined in the wordpress. In the ajax call for the units the audio player is re-initialised which may have been the root cause of this issue. As a quick fix, all you need to do is re-initiate your custom player at the unit ajax call. Since we're triggering a custom event on the ajax unit load, you can use this to detect and re-initiate the custom audio player calls. $('.unit_content').on('unit_traverse',function(){ // Initiate your audio player call. });   p.s : Also try disabling ajax in unit load from lms settings.
Viewing 7 posts - 1 through 7 (of 7 total)
  • The topic ‘How to change media player default volume?’ is closed to new replies.