-
Author
-
January 3, 2017 at 05:25 #148566superminimalParticipant
Hi!
How do I get the media element player to display the current time? In the Dashboard Media Library the player displays the current time properly (mejs-currenttime) but in the theme front-end it does not.
I also had some trouble displaying the hours in the total duration – It was only showing minutes until the file started playing. To fix this I had to hack the core and edit wp-includes/js/mediaelement/mediaelement-and-player.min.js and change: timeFormat:”” to timeFormat:”hh:mm:ss”, but I’m sure there’s a better way!
Thanks for your time and for a great theme!
January 4, 2017 at 09:32 #148692LauraModeratorHello, will assign the ticket to a higher support level who can help and advise you in your query.
Thanks! ?Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionLaura Solanes - Graphic Designer and Web Designer
Please be patient as I try to answer each topic as fast as i can.
If you like the theme or the support you've received please consider leaving us a review on Themeforest!
Always happy to help you 🙂
January 6, 2017 at 15:20 #149073RaduModeratorHi,
There is no quick solution for that, please take a look here : http://stackoverflow.com/questions/4993097/html5-display-audio-currenttime
Or you can use your solution but on every wp update to modify that file.
Cheers
R.Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionJanuary 6, 2017 at 17:06 #149081superminimalParticipantHi and thanks for getting back to me.
I was just referring to showing the current time WITHIN the media player, and the default WP media player successfully shows the current time ticking over so that’s not really the problem, it’s just that it’s missing from the Kleo version.
If you use the built in [audio] shortcode in a post the player shows the current time (even when using the Kleo theme), but if you use the Kleo ‘media’ tab with the ‘audio’ field it doesn’t show, so it definitely seems like a theme issue.
I have solved this by using ACF to add an ‘audio_file’ field to posts, and then in content_audio.php I’ve used the wp_audio_shortcode() function to play the audio_file with the media player (and removed the Kleo audio player code).
https://developer.wordpress.org/reference/functions/wp_audio_shortcode/
Also note to others: if you use the option preload=auto it will show the total duration BEFORE you press play (which is much better than showing 00:00:00 until the user presses play).
Thanks again!
January 9, 2017 at 19:44 #149291RaduModeratorHi,
Nice if you have solved and thanks you for sharing your solution with the rest of the members
Have a nice day
Cheers
R.Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution -
AuthorPosts
The forum ‘Bugs & Issues’ is closed to new topics and replies.