After that it is just dynamic changing of the src of the audio tag with the correct mp3 URL. Otherwise try to find an open source/free flash player as a fallback.Īlso your m3u file can be parsed using JS to extract the mp3 URLs (m3u files are normally only referencing playlist of items). I would suggest you use a fallback for your case scenario as not all browsers are going to support m3u files.įor example m3u file does not appear in the supported media matrix for Android.ĮDIT: you can use JW player that supports m3u files for wider browser coverage. The Luna Radio Player is a powerfull and extrem customizable responsive HTML5 radio stream plugin with many diffrent audio visualizer effects for your website that can play following providers: shoutcast2, icecast2, radionomy, radiojar, & HLS and display the song title with artist and cover image. You need to check for audio/mpegURL and application/x-mpegURL and audio/mpeg before going ahead and deliver the m3u file. If (myAudio.canPlayType('audio/mpeg') != "") Var myAudio = document.createElement('audio') You need to check for browser support both for mp3 and m3u with the canPlayType method - example: var supportsMp3 = false Search or See in Common Block Category and select Html5 Audio Player. Click the plus button in the top left corner or in the body of the post/page. Go to your WordPress Admin interface and open a post or page editor. It should play on iOS: try to add mime-type audio/mpegURL or application/x-mpegURL to your server (if not already done) AND our source tag. This plugin add a Gutenberg Block Called Html5 Audio Player Under Common Category. I guess the support for m3u file format is going to be scattered in HTML5 media compatible browser.
0 Comments
Leave a Reply. |