remettre "sortir script de figure dans modeles/video"
This commit is contained in:
parent
53e811016e
commit
3901ab6e07
54
squelettes/modeles/video.html
Normal file
54
squelettes/modeles/video.html
Normal file
@ -0,0 +1,54 @@
|
|||||||
|
<BOUCLE_video(DOCUMENTS types_documents) {media=video} {id_document=#ENV{id,#ENV{id_document}}} {inclus=embed} {tout}>[
|
||||||
|
(#REM) on trouvera plusieurs variable de hauteur/largeur
|
||||||
|
- les balises #HAUTEUR et #LARGEUR
|
||||||
|
- #ENV{hauteur} et {largeur} correspondant <emb|hauteur=xx...>
|
||||||
|
- #GET{hauteur} et #GET{largeur} correspondent prioritairement a #ENV,
|
||||||
|
puis #LARGEUR/HAUTEUR sauf si il y a un controleur
|
||||||
|
]
|
||||||
|
[(#SET{legende,#INCLURE{fond=modeles/document_legende, env}|trim})]
|
||||||
|
#SET{largeur,#ENV{largeur, #LARGEUR|?{#LARGEUR,480}}|max{120}}
|
||||||
|
#SET{hauteur,#ENV{hauteur, #HAUTEUR|?{#HAUTEUR,300}}|max{75}}
|
||||||
|
#SET{duree,#ENV{duree,#DUREE}}[(#SET{duree,[(#GET{duree}|intval|?{[(#GET{duree}|intval)],''})]})]
|
||||||
|
<div
|
||||||
|
class="[(#ID_DOCUMENT|medias_modele_document_standard_classes{video})]"[
|
||||||
|
(#ID_DOCUMENT|medias_modele_document_standard_attributs{video})
|
||||||
|
]>
|
||||||
|
<figure class="spip_doc_inner">
|
||||||
|
<div class="video-intrinsic-wrapper" style='height:0;width:#GET{largeur}px;max-width:100%;padding-bottom:[(#GET{hauteur}|div{#GET{largeur}}|mult{100}|round{2})]%;position:relative;'>
|
||||||
|
<div class="video-wrapper" style="position: absolute;top:0;left:0;width:100%;height:100%;">
|
||||||
|
<video class="mejs mejs-#ID_DOCUMENT[ mejs-(#ENV{skin})]"
|
||||||
|
data-id="[(#VAL{mejs-#ID_DOCUMENT}|concat{#ENV{skin}}|md5)]"
|
||||||
|
data-mejsoptions='{"alwaysShowControls": true,"pluginPath":"[(#CHEMIN{lib/mejs/mediaelement-flash-video.swf}|dirname)/]"[,"loop":(#ENV{loop}|?{true,false})],"videoWidth":"100%","videoHeight":"100%"[,"startVolume":"(#ENV{volume})"][,"duration":(#GET{duree})]}'
|
||||||
|
width="100%"
|
||||||
|
height="100%"[
|
||||||
|
poster="(#LOGO_DOCUMENT{vignette}|image_reduire{#GET{largeur},0}|extraire_attribut{src})"]
|
||||||
|
controls="controls"
|
||||||
|
preload="none"[
|
||||||
|
autoplay="autoplay"(#ENV{autoplay}|oui)]
|
||||||
|
>
|
||||||
|
<source type="[(#EXTENSION|in_array{#LISTE{mp4,webm,ogv}}|?{[(#MIME_TYPE|replace{application/,video/})],#MIME_TYPE})]" src="#URL_DOCUMENT" />
|
||||||
|
[(#REM)
|
||||||
|
|
||||||
|
Flash fallback for non-HTML5 browsers without JavaScript
|
||||||
|
|
||||||
|
]<object width="#GET{largeur}" height="#GET{hauteur}" type="application/x-shockwave-flash" data="#CHEMIN{lib/mejs/mediaelement-flash-video.swf}">
|
||||||
|
<param name="movie" value="#CHEMIN{lib/mejs/mediaelement-flash-video.swf}" />
|
||||||
|
<param name="flashvars" value="controls=true&file=#FICHIER" />
|
||||||
|
[(#REM)
|
||||||
|
|
||||||
|
Image as a last resort
|
||||||
|
|
||||||
|
][(#LOGO_DOCUMENT|image_reduire{#GET{largeur},0}|vider_attribut{class}|inserer_attribut{alt,'Impossible de lire la video'})]
|
||||||
|
</object>
|
||||||
|
</video>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
[(#GET{legende})
|
||||||
|
]
|
||||||
|
</figure>[<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}|url_absolue_css})</style>]]
|
||||||
|
</div>
|
||||||
|
</BOUCLE_video>
|
||||||
|
<INCLURE{fond=modeles/file,env} />
|
||||||
|
<//B_video>
|
Loading…
Reference in New Issue
Block a user