Ignore:
Timestamp:
08/08/12 19:06:31 (8 years ago)
Author:
kent1
Message:

Amélioration du code d'embed de flowplayer

Location:
plugins_spip/html5/trunk
Files:
1 added
1 edited

Legend:

Unmodified
Added
Removed
  • plugins_spip/html5/trunk/flowplayer_embed.js.html

    r6109 r6861  
    11#CACHE{24*3600}
    2 #HTTP_HEADER{Content-Type: text/javascript; charset=iso-8859-15}
     2#HTTP_HEADER{Content-Type: application/json; charset=iso-8859-15}
    33#HTTP_HEADER{Vary: Accept-Encoding}
    44<BOUCLE_document(DOCUMENTS){id_document}{extension IN flv,mp3,mp4}>
    5 {
    6         'playlist':['[(#LOGO_DOCUMENT|extraire_attribut{src}|url_absolue)]',{'url':'[(#URL_DOCUMENT|url_absolue)]','autoPlay':false}],
    7         'canvas':{'backgroundColor':'[(#ENV{backgroundcolor,#000000})]','backgroundGradient':'none'},
    8         'plugins': {
    9                 'controls':{
    10                         [(#EXTENSION|=={mp3}|oui)'autoHide': false,'fullscreen':false,'mute':false,]
    11                         'tooltips':{
    12                                 'buttons': true
    13                         }
    14                 }
    15         }
    16 }
     5
     6[(#SET{plugins,[(#ARRAY{controls,
     7        [(#ARRAY{
     8                autoHide,[(#EXTENSION|=={mp3}|?{fullscreen,true})],
     9                fullscreen,[(#EXTENSION|=={mp3}|?{false,true})],
     10                tooltips,[(#ARRAY{
     11                        buttons,true,
     12                        play,<:mediaspip_player:bouton_lire:>,
     13                        fullscreen,<:mediaspip_player:bouton_fullscreen:>,
     14                        fullscreenExit,<:mediaspip_player:bouton_fullscreen_full:>,
     15                        mute,<:mediaspip_player:bouton_mute:>,
     16                        unmute,<:mediaspip_player:bouton_unmute:>,
     17                        pause,<:mediaspip_player:bouton_pause:>})]})]})]})]
     18
     19[(#SET{plugins,[(#GET{plugins}|array_merge{[(#ARRAY{title,
     20[(#ARRAY{
     21        url,[(#CHEMIN{flash/flowplayer.content.swf}|url_absolue)],
     22        top,0,
     23        left,0,
     24        height,35,
     25        padding,5,
     26        width,100%,
     27        background,#000000,
     28        border,0px,
     29        backgroundGradient,none,
     30        borderRadius,0,
     31        opacity,0.9,
     32        stylesheet,[(#CHEMIN{css/flowplayer_content-plugin.css}|url_absolue)],
     33        html,[(#VAL{<span class="title">[(#TITRE|sinon{[(#FICHIER|basename)]}|replace{"'",'"'})]</span>}|concat{[ - <span class="desc">(#CREDITS|replace{"'",'"'}|liens_absolus|replace{'<a ','<a target="_blank" '})</span>]}|concat{[ - <span class="url"><a href="#URL_SITE_SPIP" target="_blank">(#NOM_SITE_SPIP|replace{"'",'"'})</a></span>]})]})],
     34logo,[(#ARRAY{
     35        url,[(#CHEMIN{flash/flowplayer.content.swf}|url_absolue)],
     36        top,10,
     37        left,10,
     38        width,60,
     39        height,60,
     40        padding,0,
     41        background,transparent,
     42        backgroundGradient,none,
     43        border,0px,
     44        borderRadius,0,
     45        opacity,1,
     46        html,[(#VAL{[(#_document:LOGO_DOCUMENT|image_reduire{60,60}|inserer_attribut{vspace,0}|inserer_attribut{hspace,0}|inserer_attribut{align,left}|liens_absolus|replace{"'",'"'})]})]})]})]})]})]
     47
     48[(#SET{canvas,[(#ARRAY{
     49                                backgroundColor,[(#ENV{backgroundcolor,#000000})],
     50                                backgroundGradient,none})]})]
     51
     52[(#SET{playlist,[(#ARRAY{0,[(#LOGO_DOCUMENT|extraire_attribut{src}|url_absolue)],1,[(#ARRAY{url,[(#URL_DOCUMENT|url_absolue)],autoPlay,false})]})]})]
     53#SET{json,#ARRAY{playlist,#GET{playlist},canvas,#GET{canvas},plugins,#GET{plugins}}}
     54[(#SET{json,[(#PIPELINE{mediaspip_player_flowjs,[(#ARRAY{args,[(#ENV*|unserialize)],data,#GET{json}})]})]})]
     55[(#GET{json}|json_encode|replace{'"true"','true'}|replace{'"false"','false'})]
    1756</BOUCLE_document>
    1857#FILTRE{trim}
Note: See TracChangeset for help on using the changeset viewer.