Sujet fermé
Note de ce sujet :
  • Moyenne : 0 (0 vote(s))
  • 1
  • 2
  • 3
  • 4
  • 5

[Résolu]Problème HostedVideoAlbums avec 1.11
#5

Le second est plus complexe, je n'ai modifié que pour viméo.
Gabarit de vidéo -> Gabarit à utiliser pour imbriquer (embed) une video : embed et concerne les thumbnails de viméo.
Code :
[== Indéfini ==]
{assign var="width" value=""}
{assign var="swidth" value=""}
{if $item->width!="0"}
    {assign var="width"  value="width='`$item->width`'"}
    {assign var="swidth" value="width:`$item->width`px;"}
{/if}
{assign var="height" value=""}
{assign var="sheight" value=""}
{if $item->height!="0"}    
    {assign var="height"  value="height='`$item->height`'"}
    {assign var="sheight" value="height:`$item->height`px;"}
{/if}
<div id="hva_div" style="{$swidth} {$sheight} margin-left:auto; margin-right:auto;">
{if $item->site_namevalue=="local.divx"} {* local divx, avi & mkv videos *}
    <object id="{$item->alias}"
        classid="clsid:67DABFBF-D0AB-41fa-9C46-CC0F21721616"  
        {$width} {$height}
        codebase="http://go.divx.com/plugin/DivXBrowserPlugin.cab">  
        <param name="src" value="{root_url|regex_replace:"%/[^/]+$%":""}{$item->videoid}"/>
        <param name="autoPlay" value="{$item->autoplay}">
        <embed type="video/divx" src="{root_url|regex_replace:"%/[^/]+$%":""}{$item->videoid}"  
            {$width} {$height}
            pluginspage="http://go.divx.com/plugin/download/"
            autoPlay="{$item->autoplay}" name="{$item->alias}" >  
        </embed>  
    </object>
{elseif $item->site_namevalue=="local.ogv"} {* local ogv videos are played either with the video tag for browsers supporting html 5 or with the cortado applet*}
    {if $item->autoplay=="true"}{assign var="autoplay" value="autoplay"}
    {else}{assign var="autoplay" value=""}{/if}
    <video src="{$item->videoid}" controls="true" {$autoplay} {$width} {$height}>  
        <object type="application/x-java-applet"  
           {$width} {$height}>  
            <param name="archive" value="./modules/HostedVideoAlbums/cortado.jar">  
            <param name="code" value="com.fluendo.player.Cortado">  
            <param name="url" value="{$item->videoid}">  
            <param name="autoPlay" value="{$item->autoplay}">
            <p>You need to install Java to play this file.</p>  
        </object>  
    </video>
{elseif $item->site_namevalue=="local.silverlight"} {* silverlight player *}
    <object data="data:application/x-silverlight-2," type="application/x-silverlight-2"
        {$width} {$height}>
        <param name="source" value="./modules/HostedVideoAlbums/VideoPlayer.xap"/>
        <param name="background" value="white" />
        <param name="initParams" value="m={root_url|regex_replace:"%/[^/]+$%":""}{$item->videoid},autostart={$item->autoplay}" />
        <param name="minruntimeversion" value="2.0.31005.0" />
        <a href="http://go.microsoft.com/fwlink/?LinkId=124807" style="text-decoration: none;">
            <img src="http://go.microsoft.com/fwlink/?LinkId=108181" alt="Get Microsoft Silverlight" style="border-style: none"/>
        </a>
    </object>
{elseif $item->site_namevalue=="local.wmv"} {* local windows media videos *}
    <object id="{$item->alias}"
        classid="CLSID:22D6F312-B0F6-11D0-94AB-0080C74C7E95"
        {$width} {$height}
        codebase="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=6,4,5,715"
        standby="Loading..."
        type="application/x-oleobject">
        <param name="FileName" value="{$item->videoid}">
        <param name="AutoStart" value="{$item->autoplay}">
        <embed type="application/x-mplayer2"
            pluginspage = "http://www.microsoft.com/Windows/MediaPlayer/"
            src="{$item->videoid}"
            name="{$item->alias}" AutoStart="{$item->autoplay}"
            {$width} {$height}>
        </embed>
    </object>
{elseif $item->site_namevalue=="local.mov"} {* local quicktime .mov videos *}
    <embed type="video/quicktime" src="{root_url|regex_replace:"%/[^/]+$%":""}{$item->videoid}"  
        name="{$item->alias}"
        {$width} {$height}
        pluginspage="http://www.apple.com/quicktime/download/" autoplay="{$item->autoplay}" controller="true">  
    </embed>  
{elseif $item->site_namevalue=="local.rm"} {* local real media videos (not functional ?) *}
    <object id="{$item->alias}"  classid="clsid:CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA"
        {$width} {$height}
        <param name="console" value="video">
        <param name="controls" value="ImageWindow">
        <param name="autostart" value="{$item->autoplay}">
        <param name="src" value="{$item->videoid}">
        <embed type="audio/x-pn-realaudio-plugin" src="{$item->videoid}"  
            name="{$item->alias}"
            {$width} {$height}
            controls="ImageWindow" console="video"
            autostart="{$item->autoplay}">
        </embed>  
    </object>
{else} {* hosted or local flash videos *}
    {if $item->site_namevalue=="youtube"}
        {assign var="movie" value="http://www.youtube.com/v/`$item->videoid`&hl=`$item->lang`&fs=`$item->fullscreen_int`&rel=0&color1=`$item->color1`&color2=`$item->color2`&border=1&autoplay=`$item->autoplay`"}
    {elseif $item->site_namevalue=="google videos"}
        {if $item->autoplay=="true"}{assign var="autoplay" value="&autoPlay=true"}
        {else}{assign var="autoplay" value=""}{/if}
        {assign var="movie" value="http://video.google.com/googleplayer.swf?hl=`$item->lang`&fs=`$item->fullscreen`&docid=`$item->videoid`$autoplay"}
    {elseif $item->site_namevalue=="dailymotion"}
        {assign var="movie" value="http://www.dailymotion.com/swf/`$item->videoid`&related=0&hl=`$item->lang`"}
    {elseif $item->site_namevalue=="yahoo videos"}
        {assign var="id" value="`$item->videoid`"}
        {assign var="yvid" value=$id|regex_replace:"#[0-9]+/#":""}
        {assign var="movie" value="http://d.yimg.com/static.video.yahoo.com/yep/YV_YEP.swf?ver=2.2.46&id=$yvid&lang=`$item->lang`&embed=1&autoPlay=`$item->autoplay_int`"}    
    {elseif $item->site_namevalue=="veoh"}
        {assign var="movie" value="http://www.veoh.com/static/swf/webplayer/WebPlayer.swf?version=AFrontend.5.4.9.1006&permalinkId=`$item->videoid`&hl=`$item->lang`&player=videodetailsembedded&videoAutoPlay=`$item->autoplay_int`&id=anonymous"}
    {elseif $item->site_namevalue=="msn video"}
    {assign var="movie" value="http://images.video.msn.com/flash/soapbox1_1.swf?c=v&amp;v=`$item->videoid`&amp;ifs=`$item->fullscreen`&amp;fr=shared&amp;mkt=`$item->lang`&ap=`$item->autoplay`"}
    {elseif $item->site_namevalue=="metacafe"}
        {if $item->autoplay=="true"}{assign var="autoplay" value="playerVars=autoPlay=yes"}
        {else}{assign var="autoplay" value=""}{/if}
        {assign var="movie" value="http://www.metacafe.com/fplayer/`$item->videoid`/movie.swf$autoplay"}
    {elseif $item->site_namevalue=="myspace"}
        {assign var="movie" value="http://mediaservices.myspace.com/services/media/embed.aspx/m=`$item->videoid`,t=1,mt=video,ap=`$item->autoplay_int`,searchID=,primarycolor=`$item->color1`,secondarycolor=`$item->color2`"}
    {elseif $item->site_namevalue=="vimeo"}
        {assign var="movie" value="http://vimeo.com/moogaloop.swf?clip_id=`$item->videoid`&amp;server=vimeo.com&amp;show_title=true&amp;show_byline=1&amp;color=`$item->color1`&amp;fullscreen=`$item->fullscreen_int`&autoplay=`$item->autoplay_int`"}
    {elseif $item->site_namevalue=="local.flv"}
        {assign var="movie" value="modules/HostedVideoAlbums/JarisFLVPlayer.swf?source=`$item->videoid`&type=video&streamtype=file&autostart=`$item->autoplay`&brightcolor=`$item->color1`&darkcolor=`$item->color2`&poster=`$item->thumbnail`"}
    {/if}
    <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
        id="{$item->alias}"
        codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=10,0,0,0"
        {$width} {$height}>  
        <param name="allowFullScreen" value="{$item->fullscreen}"></param>
        <param name="allowScriptAccess" value="{$item->scriptaccess}"></param>
        <param name="movie" value="{$movie}"></param>
        <param name="quality" value="high">
        <param name="scale" value="autoscale">
        <param name="wmode" value="opaque">
        <param name="bgcolor" value="{$item->color2}">
        <embed name="{$item->alias}" src="{$movie}" type="application/x-shockwave-flash" allowscriptaccess="{$item->scriptaccess}" allowfullscreen="{$item->fullscreen}"{$width} {$height} bgcolor="{$item->color2}" scale="autoscale" wmode="opaque" pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash"></embed>
    </object>

{/if}
</div>
Mais il te faut également une udt : vimeothumb
Code :
[== Indéfini ==]
$id = $params['id'];
$data = file_get_contents("http://vimeo.com/api/v2/video/$id.json");
$data = json_decode($data);
return $data[0]->thumbnail_small;
Sujet fermé


Messages dans ce sujet

Atteindre :


Utilisateur(s) parcourant ce sujet : 1 visiteur(s)