wpse-playlist icon indicating copy to clipboard operation
wpse-playlist copied to clipboard

Feature Request: Adjustable volume for audio and video items

Open klanomath opened this issue 1 year ago • 3 comments

Hello birgire, is it possible to add a wpse volume tag to adjust the volumes of audio and video files in the playlist to get a more uniform sound volume in case the various files have some different intrinsic loudness?

klanomath avatar May 21 '24 10:05 klanomath

Hello @klanomath

I don't think there exists a specific volume tag attribute in the html5 audio/video standard:

https://developer.mozilla.org/en-US/docs/Web/HTML/Element/audio?#attributes

but I wonder if you can use workarounds suggested here

https://stackoverflow.com/questions/20618737/how-to-set-a-specific-starting-volume-for-audio-tag

birgire avatar May 21 '24 15:05 birgire

Thanx for your answer @birgire

Maybe tag was the wrong word. I meant shortcode. I'm using your WP-plugin to embed external audio & video files with very different volume levels in various playlists on an internal website. I already tried to add some volume shortcode in your PHP code, but I failed miserably. The idea was to add a shortcode to adjust the volume levels of the individual files in the audio or video playlist.

Something like

[_playlist]
   [_track title="Ain't Misbehavin'" SoundVolume=.75 src="//s.w.org/images/core/3.9/AintMisbehavin.mp3"]
   [_track title="Buddy Bolden's Blues" SoundVolume=.55 src="//s.w.org/images/core/3.9/JellyRollMorton-BuddyBoldensBlues.mp3"]
[/_playlist]

because JellyRollMorton-BuddyBoldensBlues.mp3 is so much louder than AintMisbehavin.mp3 (which isn't true, but to use the example in your ReadMe.

klanomath avatar May 21 '24 16:05 klanomath

Hi @klanomath

I understand the frustration regarding one song being louder than others, same problem with TV and e.g. injected commercials.

The plugin is a wrapper of the native WP playlist that uses audio/video html5 tags.

The audio/video html5 tags do not support volume attributes (only mute attribute).

It seems that adjusting volume of html5 audio/video in iOS is not possible via javascript.

https://stackoverflow.com/questions/27296391/is-there-any-possibility-to-control-html5-audio-volume-on-ios

birgire avatar May 24 '24 16:05 birgire