From a4b986a60a4fe2c38be420d91e217f46e99d6351 Mon Sep 17 00:00:00 2001 From: Max Kremmel Date: Fri, 23 May 2008 19:35:15 +0000 Subject: add generic audio plugin. this will convert audio to mp3 and make it available as a stream from the website --- templates/admin_mime_audio.tpl | 108 ++++++++++++++++++++++++++++++++++++ templates/mime_audio_inline_inc.tpl | 7 +++ templates/mime_audio_player_inc.tpl | 29 ++++++++++ templates/mime_audio_view_inc.tpl | 78 ++++++++++++++++++++++++++ 4 files changed, 222 insertions(+) create mode 100644 templates/admin_mime_audio.tpl create mode 100644 templates/mime_audio_inline_inc.tpl create mode 100644 templates/mime_audio_player_inc.tpl create mode 100644 templates/mime_audio_view_inc.tpl (limited to 'templates') diff --git a/templates/admin_mime_audio.tpl b/templates/admin_mime_audio.tpl new file mode 100644 index 0000000..0649a57 --- /dev/null +++ b/templates/admin_mime_audio.tpl @@ -0,0 +1,108 @@ +{strip} +
+
+

{tr}Flashvideo Plugin Settings{/tr}

+
+ +
+ {form legend="Flashvideo specific settings"} +

+ You can find some information relating to this plugin on the TreasuryFlvPlugin plugin page at bitweaver.org. +

+ + {if !$gLibertySystem->isPluginActive( 'mimeaudio' )} + {formfeedback error="This plugins has not been enabled. All settings you change here will have no effect on uploaded videos unless you enable the plugin in the liberty plugins administration screen"} + {/if} + + {formfeedback hash=$feedback} +

{tr}You can spcify the path to either ffmpeg or mplayer and lame. If you have all applications installed, we will first try to convert audio files using ffmpeg and if that didn't work, we'll use mplayer and lame.{/tr}

+ +
+ {formlabel label="Path to ffmpeg" for="mime_audio_ffmpeg_path"} + {forminput} + + {formhelp note="If this path is not correct, please set the correct path to ffmpeg."} + {/forminput} +
+ +
+ {formlabel label="Path to mplayer" for="mime_audio_mplayer_path"} + {forminput} + + {formhelp note="If this path is not correct, please set the correct path to mplayer."} + {/forminput} +
+ +
+ {formlabel label="Path to lame" for="mime_audio_lame_path"} + {forminput} + + {formhelp note="If this path is not correct, please set the correct path to lame."} + {/forminput} +
+ +
+ {formlabel label="Lame options" for="mime_audio_lame_options"} + {forminput} + + {formhelp note="If you know your way around lame, you can insert your own options here to override the default settings."} + {/forminput} +
+ +
+ {formlabel label="Audio sample rate" for="mime_audio_samplerate"} + {forminput} + {html_options + options=$rates.audio_samplerate + values=$rates.audio_samplerate + name=mime_audio_samplerate + id=mime_audio_samplerate + selected=$gBitSystem->getConfig('mime_audio_samplerate')|default:22050} Hz + {formhelp note="Set the audio sample rate. The higher the bitrate the higher the quality but also the larger the file."} + {/forminput} +
+ +
+ {formlabel label="Audio bitrate" for="mime_audio_bitrate"} + {forminput} + {html_options + options=$rates.audio_bitrate + values=$rates.audio_bitrate + name=mime_audio_bitrate + id=mime_audio_bitrate + selected=$gBitSystem->getConfig('mime_audio_bitrate')|default:96000} kbits/s + {formhelp note="Set the audio bitrate. The higher the bitrate the higher the quality but also the larger the file."} + {/forminput} +
+ +
+ {formlabel label="Force encode" for="mime_audio_force_encode"} + {forminput} + isFeatureActive('mime_audio_force_encode')}checked="checked"{/if} /> + {formhelp note="When mp3 files are uploaded they can be used directly for streaming. If you enable this, the uploaded mp3 will be re-encoded usually reducing filesize for streaming. The originally uploaded file will still be available for download."} + {/forminput} +
+ +
+ {formlabel label="Foreground Colour" for="mime_audio_frontcolor"} + {forminput} + + {formhelp note="Foreground colour of the progress bar."} + {/forminput} +
+ +
+ {formlabel label="Background Colour" for="mime_audio_backcolor"} + {forminput} + + {formhelp note="Background colour of the progress bar."} + {/forminput} +
+ +
+ +
+ {/form} +
+
+{/strip} diff --git a/templates/mime_audio_inline_inc.tpl b/templates/mime_audio_inline_inc.tpl new file mode 100644 index 0000000..a866c7f --- /dev/null +++ b/templates/mime_audio_inline_inc.tpl @@ -0,0 +1,7 @@ +{strip} +{if $attachment.source_url} +
+ {include file="bitpackage:liberty/mime_audio_player_inc.tpl"} +
+{/if} +{/strip} diff --git a/templates/mime_audio_player_inc.tpl b/templates/mime_audio_player_inc.tpl new file mode 100644 index 0000000..b1c6029 --- /dev/null +++ b/templates/mime_audio_player_inc.tpl @@ -0,0 +1,29 @@ +{strip} +{if $attachment.audio_url} + {if $area eq "storage_thumbs"} + {assign var=width value=160} + {assign var=height value=140} + {else} + {assign var=width value=400} + {assign var=height value=320} + {/if} +
Get the Flash Player to see this video.
+ +{/if} + +{if $area eq "storage_thumbs"} + {if $attachment.meta.title}{$attachment.meta.title}
{/if} + {tr}Full Details{/tr} +{/if} +{/strip} diff --git a/templates/mime_audio_view_inc.tpl b/templates/mime_audio_view_inc.tpl new file mode 100644 index 0000000..549feab --- /dev/null +++ b/templates/mime_audio_view_inc.tpl @@ -0,0 +1,78 @@ +{strip} +{if $attachment.audio_url} +
+ {include file="bitpackage:liberty/mime_audio_player_inc.tpl"} +
+{/if} + +{if $attachment.meta.title} +
+ {formlabel label="Title" for=""} + {forminput} + {$attachment.meta.title} + {/forminput} +
+{/if} + +{if $attachment.meta.album} +
+ {formlabel label="Album" for=""} + {forminput} + {$attachment.meta.album} + {/forminput} +
+{/if} + +{if $attachment.meta.artist} +
+ {formlabel label="Artist" for=""} + {forminput} + {$attachment.meta.artist} + {/forminput} +
+{/if} + +{if $attachment.meta.year} +
+ {formlabel label="Year" for=""} + {forminput} + {$attachment.meta.year} + {/forminput} +
+{/if} + +{if $attachment.meta.playtime_string} +
+ {formlabel label="Duration" for=""} + {forminput} + {$attachment.meta.playtime_string} + {/forminput} +
+{/if} + +{if $attachment.download_url} +
+ {formlabel label="Filename" for=""} + {forminput} + {$attachment.filename|escape} +   ({$attachment.mime_type}) + {* TODO: get this to work if $gContent->hasEditPermission() && $attachment.flv_url} + {form ipackage=treasury ifile="plugins/form.flv.php"} + + + {formhelp note="This will remove the original file from the server. The falsh video will remain and you can still view the video but you cannot download the original anymore."} + {/form} + {/if*} + {/forminput} +
+ +
+ {formlabel label="Filesize" for=""} + {forminput} + {$attachment.file_size|display_bytes} + {/forminput} +
+{/if} + +{attachhelp legend=1 hash=$attachment} +{/strip} -- cgit v1.3