Changeset 103216 in spip-zone


Ignore:
Timestamp:
Mar 10, 2017, 3:35:55 PM (3 years ago)
Author:
cedric@…
Message:

On peut passer 2 arguments async et autoplay aux modeles oembed :
<embXX|async=non> permet de debrayer le chargement async de l'iframe
<embXX|async=non|autoplay=oui> permet de forcer la lecture en autoplay

Ca a surtout un interet pour generer du html masque qu'on va afficher en mediabox et dont on veut qu'il se joue directement a l'ouverture de la box

Location:
_plugins_/oembed
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • _plugins_/oembed/modeles/oembed_rich.html

    r98590 r103216  
    11#SET{thumbnail,#ENV{data/thumbnail_url}|sinon{#ENV{data/image}}}
    2 #SET{async,#GET{thumbnail}|et{#ENV*{data/html}|match{'<iframe'}}|oui}
     2#SET{async,#ENV{async}|=={non}|non|et{#GET{thumbnail}|et{#ENV*{data/html}|match{'<iframe'}}|oui}}
    33<div class="oembed oe-rich[(#GET{async}|oui)async] clearfix[ (#ENV{align})]" style="max-width:#ENV{data/width}px;">
    44        <div class="rwd-rich-container[(#GET{async}|oui)oe-play-button]"
     
    88             ]>
    99                         [(#GET{async}|oui) <button onclick="jQuery(this).parent().trigger('click');">Play</button>]
    10              [(#GET{async}|non) [(#ENV*{data/html}|sinon{#ENV{url}})] ]
     10                         [(#GET{async}|non) [(#ENV*{data/html}|et{#ENV{autoplay}}|?{[(#ENV*{data/html}|oembed_force_video_autoplay)],#ENV*{data/html}|sinon{#ENV{url}}})] ]
    1111        </div>
    1212        <style><!--/**/.oe-rich .loading {background-image:url("#CHEMIN_IMAGE{searching.gif}")!important;background-size:auto !important;}/**/--></style>
  • _plugins_/oembed/modeles/oembed_video.html

    r98590 r103216  
    11#SET{thumbnail,#ENV{data/thumbnail_url}|sinon{#ENV{data/image}}}
    2 #SET{async,#GET{thumbnail}|et{#ENV*{data/html}|match{'<iframe'}}|oui}
     2#SET{async,#ENV{async}|=={non}|non|et{#GET{thumbnail}|et{#ENV*{data/html}|match{'<iframe'}}|oui}}
    33<div class="oembed oe-video[(#GET{async}|oui)async] clearfix[ (#ENV{align})]" style="max-width:#ENV{data/width}px;">
    44        <div class="rwd-video-container[(#GET{async}|oui)oe-play-button]"
     
    88                ]>
    99                        [(#GET{async}|oui) <button onclick="jQuery(this).parent().trigger('click');">Play</button>]
    10                         [(#GET{async}|non) [(#ENV*{data/html}|sinon{#ENV{url}})] ]
     10                        [(#GET{async}|non) [(#ENV*{data/html}|et{#ENV{autoplay}}|?{[(#ENV*{data/html}|oembed_force_video_autoplay)],#ENV*{data/html}|sinon{#ENV{url}}})] ]
    1111        </div>
    1212        <style><!--/**/.oe-video .loading {background-image:url("#CHEMIN_IMAGE{searching.gif}")!important;background-size:auto !important;}/**/--></style>
  • _plugins_/oembed/modeles/text_oembed.html

    r86713 r103216  
    1212]
    1313<div class='spip_documents spip_documents_center ressource oembed[ oembed_(#GET{data}|table_valeur{type})][ oembed_(#GET{data}|table_valeur{media}|replace{sound,audio})][ oembed_(#GET{data}|table_valeur{provider_name}|strtolower|replace{'\W','_'})]'>
    14         [(#INCLURE{fond=modeles/oembed_[(#GET{data}|table_valeur{type,link})],data=#GET{data},url=#OEMBED,align})]
     14        [(#INCLURE{fond=modeles/oembed_[(#GET{data}|table_valeur{type,link})],data=#GET{data},url=#OEMBED,align,async,autoplay})]
    1515        [<div class="spip_doc_titre oembed-source">(#OEMBED|echappe_retour)</div>]
    1616</div>
  • _plugins_/oembed/paquet.xml

    r103150 r103216  
    22        prefix="oembed"
    33        categorie="multimedia"
    4         version="1.6.10"
     4        version="1.6.11"
    55        etat="stable"
    66        compatibilite="[3.0.0;3.1.*]"
Note: See TracChangeset for help on using the changeset viewer.