You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

34 lines
2.0 KiB

[(#REM)
Modele pour les sons
Filtrer en acceptant uniquement les extensions jouables par le player ?
]<BOUCLE_audio(DOCUMENTS types_documents) {media=audio} {id_document=#ENV{id,#ENV{id_document}}} {inclus=embed} {tout}>
#SET{largeur,#ENV{largeur, #LARGEUR|?{#LARGEUR,400}}|max{120}}
#SET{duree,#ENV{duree,#DUREE}}[(#SET{duree,[(#GET{duree}|intval|?{[(#GET{duree}|intval)],''})]})]
<figure class='spip_document_#ID_DOCUMENT spip_documents spip_document_audio[ spip_documents_(#ENV{align})]'[ style='width:(#GET{largeur})px;']>
[(#LOGO_DOCUMENT{vignette}|image_reduire{#GET{largeur},0}|vider_attribut{class})]
<div class="audio-wrapper"[ style='width:(#GET{largeur})px;max-width:100%;']>
<audio class="mejs mejs-#ID_DOCUMENT [ mejs-(#ENV{skin})]"
data-id="[(#VAL{mejs-#ID_DOCUMENT}|concat{#ENV{skin}}|md5)]"
src="#FICHIER"
type="#MIME_TYPE"
preload="none"
data-mejsoptions='{"alwaysShowControls": true[,"loop":(#ENV{loop}|?{true,false})],"audioWidth":"100%"[,"audioHeight":"(#ENV{hauteur})"][,"startVolume":"(#ENV{volume})"][,"duration":(#GET{duree})]}'
controls="controls"
[autoplay="autoplay"(#ENV{autoplay}|oui)]></audio>
</div>
[(#TITRE|trim|sinon{#DESCRIPTIF|trim}|sinon{#CREDITS|trim}|oui)
<figcaption class='spip_doc_legende'>
[<div class='spip_doc_titre #EDIT{titre}'><strong>(#TITRE|propre|ptobr)</strong></div>]
[<div class='spip_doc_descriptif #EDIT{descriptif}'>(#DESCRIPTIF|propre|PtoBR)[(#NOTES|PtoBR)]</div>]
[<div class='spip_doc_credits #EDIT{credits}'>(#CREDITS|propre|PtoBR)</div>]
</figcaption>
]
[<script>/*<!\[CDATA\[*/var mejspath='[(#CHEMIN{lib/mejs/mediaelement-and-player.min.js}|timestamp)]',mejscss='[(#CHEMIN{lib/mejs/mediaelementplayer.min.css}|timestamp)]';
(#INCLURE{javascript/mejs-init.min.js})/*\]\]>*/</script>]
[(#ENV{skin}|oui)[<style>(#INCLURE{#CHEMIN{css/mejs-skin-#ENV{skin}.css}|sinon{#CHEMIN{lib/mejs/mejs-skins.css}}|url_absolue_css})</style>]]
</figure>
</BOUCLE_audio>
<INCLURE{fond=modeles/file,env} />
<//B_audio>