- Posts: 33
COMMUNITY FORUM
- Forum
- Free Joomla Extensions & Templates
- AllVideos
- HTML5? (Possible solution for HTML Audio submitted)
HTML5? (Possible solution for HTML Audio submitted)
- Sam Harney
-
Topic Author
- Offline
- Junior Member
Less
More
14 years 6 months ago - 14 years 6 months ago #36563
by Sam Harney
HTML5? (Possible solution for HTML Audio submitted) was created by Sam Harney
Any chance of getting this updated for HTML5 with fallback support via the current flash players? This would allow for support of mobile based devices like the iPod/iPhone and the Android based devices that support MP3 audio, and MP4 video but do not support Flash...?
Please Log in or Create an account to join the conversation.
- Sam Harney
-
Topic Author
- Offline
- Junior Member
Less
More
- Posts: 33
14 years 6 months ago #36564
by Sam Harney
Replied by Sam Harney on topic Re: HTML5?
So I decided to take matters into my own hands yesterday.
1. The following code should be added to the "/plugins/content/jw_allvideos/includes/sources.php" file. (I added this in the first section below the flvremote and above the mp3 section.)
2. Next we need to fix it so that the plugin recognizes the {audio} tag and selects the audio folder in joomla instead of the video folder. You will need to search "/plugins/content/jw_allvideos.php" for every instance of: "mp3"
(Include the "" around mp3 in your search.)
Everywhere you find: "mp3" in the file I added: "audio" in front of it.
For Example on line 193 I found:And I changed it to:
3. Now simply add {audio}filename{/audio} as you would for your other formats.
At present time this of course is only for Audio files (video will take a little more planning), and it requires you to upload a file in both MP3 and OGG format with the exact same name (except the extension) to the exact same audio location. Chrome and Safari (Desktop and iOS) should play the MP3 version, and newer versions of Firefox will use the OGG format, with the browsers built in support for these formats. Older versions of Firefox, IE6,7 & 8 should fail back to the flash player and mp3 format.
My whole reason for doing this is that this now allows me to use this plugin and still support iPhones/iPods and I believe Android based devices as well. My only regret is that Firefox does not support MP3 which forces me to make a separate file for Firefox users and upload it to the server.
Please consider adding this to the plugin as a standard feature.
1. The following code should be added to the "/plugins/content/jw_allvideos/includes/sources.php" file. (I added this in the first section below the flvremote and above the mp3 section.)
"audio" => "
<audio controls preload>
<source src={SITEURL}/{FOLDER}/{SOURCE}.mp3 type=audio/mp3; codecs=mp3>
<source src={SITEURL}/{FOLDER}/{SOURCE}.ogg type=audio/ogg; codecs=ogg>
<object type=\"application/x-shockwave-flash\" style=\"width:{WIDTH}px;height:{HEIGHT}px;\" data=\"{SITEURL}/plugins/content/jw_allvideos/includes/players/mediaplayer/player.swf\" title=\"Audio Video Player\">
<param name=\"movie\" value=\"{SITEURL}/plugins/content/jw_allvideos/includes/players/mediaplayer/player.swf\" />
<param name=\"quality\" value=\"high\" />
<param name=\"wmode\" value=\"{TRANSPARENCY}\" />
<param name=\"bgcolor\" value=\"{BACKGROUND}\" />
<param name=\"autoplay\" value=\"{AUTOPLAY}\" />
<param name=\"allowfullscreen\" value=\"false\" />
<param name=\"allowscriptaccess\" value=\"always\" />
<param name=\"flashvars\" value=\"file={SITEURL}/{FOLDER}/{SOURCE}.mp3&autostart={AUTOPLAY}\" />
</object></audio>
",
2. Next we need to fix it so that the plugin recognizes the {audio} tag and selects the audio folder in joomla instead of the video folder. You will need to search "/plugins/content/jw_allvideos.php" for every instance of: "mp3"
(Include the "" around mp3 in your search.)
Everywhere you find: "mp3" in the file I added: "audio" in front of it.
For Example on line 193 I found:
if(in_array($plg_tag, array("mp3","mp3remote","wma","wmaremote"))){
if(in_array($plg_tag, array("audio","mp3","mp3remote","wma","wmaremote"))){
3. Now simply add {audio}filename{/audio} as you would for your other formats.
At present time this of course is only for Audio files (video will take a little more planning), and it requires you to upload a file in both MP3 and OGG format with the exact same name (except the extension) to the exact same audio location. Chrome and Safari (Desktop and iOS) should play the MP3 version, and newer versions of Firefox will use the OGG format, with the browsers built in support for these formats. Older versions of Firefox, IE6,7 & 8 should fail back to the flash player and mp3 format.
My whole reason for doing this is that this now allows me to use this plugin and still support iPhones/iPods and I believe Android based devices as well. My only regret is that Firefox does not support MP3 which forces me to make a separate file for Firefox users and upload it to the server.
Please consider adding this to the plugin as a standard feature.
Please Log in or Create an account to join the conversation.
- Sam Harney
-
Topic Author
- Offline
- Junior Member
Less
More
- Posts: 33
14 years 6 months ago #36565
by Sam Harney
Replied by Sam Harney on topic Re: HTML5? (Possible solution for HTML Audio submitted)
Has anyone else tried this code? Is no one else interested in this?
Please Log in or Create an account to join the conversation.
- velozyrapthor
-
- Offline
- New Member
Less
More
- Posts: 1
14 years 6 months ago #36566
by velozyrapthor
Replied by velozyrapthor on topic Re: HTML5? (Possible solution for HTML Audio submitted)
samhnky thanks for the code, works fine.
Please Log in or Create an account to join the conversation.
- Forum
- Free Joomla Extensions & Templates
- AllVideos
- HTML5? (Possible solution for HTML Audio submitted)