Viewing 8 replies - 1 through 8 (of 8 total)
  • I also want to fix this problem, unfortunately, it conld’t be changed after a hard try with js code. really aweful….

    Ok, we could put the follow code in the theme’s footer.php for the high explorer compatibility.

    var video = document.getElementById('YourVideoID');
    video.volume = 0.2;
    Thread Starter trishahdee

    (@trishahdee)

    Thank you, wszf5560, for the information. I’m not sure what you mean by “high explorer compatibility”. I tried your code using FireFox and it did not work 🙁

    Hi, Trishah,
    I mean this code could support lots of current explorers, and I give you a example for application, even though I am a layman for js code:)
    Ok, this is the video link:
    [videojs <strong>id=custom</strong> mp4="url.mp4"]
    in the post Page.
    Unfortunately, the default volume is 1(100%), so, you could add this javascript code `<script>
    var video = document.getElementById(‘<strong>custom</strong>’);
    video.volume = 0.5;
    </script>`
    in your footer.php, and there is an order for the position of code, you could put it in front of the “</body>” or “<?php wp_footer(); ?>” depending on your theme style.
    Then refresh your explorer, the default volume of video will be changed to 0.5 (half volume).
    This way works well in several explorers including the one in mobile phones.
    Please enjoy it.

    Oh, I am sorry.
    This method couldn’t take a effect in the mobile phone which is controlled by the the global volume setting of your phone.

    It only works in the PC’s explorers.

    Thread Starter trishahdee

    (@trishahdee)

    Ah. I see what I did wrong! When your instruction said “YourVideoID” I used the ID from the video DIV and not the ID from the shortcode… silly me 😀

    And my other confusion was with your use of the word “explorer” which, from the context where you use the word, you seem to be using to mean “browser” and not specifically “Internet Explorer”. I think I’m clear now.

    When using the shortcode ID it does indeed work on my desktop browser 😀

    It would be good if the plugin itself had a setting for the video’s volume. But until then, your code will work for my application.

    Thank you for the explanation!

    Yes, it is “desktop browser”…., this description is more precise, thanks for your correction 🙂
    It’s a pity that the video.js plugin have been updated a long time, but current version is enough for the ordinary application, even in the last browser with the Html5 supported.

    Correct errors: ….plugin haven’t been updated…

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘How to set volume?’ is closed to new replies.