各位大大!!
我是life type的初學者
近期一直在鑽研之中
有時真的都快被搞昏了
至於本專題所述的影音檔案支援方面
我以經弄差不多都可支援
現在就卡在 js 方面的配合調用
因為不知道life type有關於
我將參數寫一寫
依照現行resource.template檔內
相關音訊及視訊部位插入
在life type1.1測試都可以支援
就之前所講卡在 js 撰寫互動上
所以現在會變成上傳某個檔案
點擊開啟後會變成
四種格式Windows Media Player -- Real Player -- QuickTime -- flashplayer都顯示
只要媒體程式能支援的
都回同時播放該檔案
不知大大們有沒有辦法....
下面是我寫在resource.template裡面四種播放程式的參數
{include file="$blogtemplate/header.template"}
{assign var=metadata value=$resource->getMetadataReader()}
{assign var=updated value=$resource->getTimestamp()}
<div id="content">
<div class="post">
<h2>{$resource->getFileName()}</h2>
<br/>
<div id="Resource-Desc">
<a href="{$url->resourceDownloadLink($resource)}">{$locale->tr("download")}</a>
({$metadata->getRoundedSize()}) | {$locale->tr("created")} {$locale->formatDate($updated,"%d %B, %Y")}
<div id="album">
<p>{$resource->getDescription()}</p>
{if $resource->isImage()}
<img src="{$url->resourceMediumSizePreviewLink($resource)}" alt="{$resource->getFileName()}, {$metadata->getRoundedSize()}" />
{else}
<a href="{$url->resourceDownloadLink($resource)}">
{* show some information about the file *}
{if $resource->isSound()}
<img alt="Sound" src="{$url->getUrl("/imgs/sound.gif")}" height="64" width="64" style="border:0px;" /><br/>
<!-- 音訊支援參數開始--!><!-- 支援QuickTime--!> <object classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B" width="320" height="240" codebase="
http://www.apple.com/qtactivex/qtplugin.cab#version=6,0,2,0">\
<param name="type" value="{$url->resourceDownloadLink($resource)}" />
<param name="autoplay" value="QuickTime Audio" />
<param name="target" value="myself" />
<param name="src" value="{$url->resourceDownloadLink($resource)}" />
<param name="href" value="{$url->resourceDownloadLink($resource)}" />
<param name="pluginspage" value="
http://www.apple.com/quicktime/download/indext.html" />
<param name="ShowControls" value="1" />
<param name="ShowStatusBar" value="1" />
<param name="showdisplay" value="0" />
<embed
width="320"
height="240"
src="{$url->resourceDownloadLink($resource)}"
href="{$url->resourceDownloadLink($resource)}"
type="video/quicktime"
target="myself"
border="0"
showcontrols="1"
showdisplay="0"
showstatusbar="1"
autoplay="QuickTime Audio"
pluginspage="
http://www.apple.com/quicktime/download/indext.html">
</embed>
</object>
<!-- 支援Real Player--!> <object id="RVOCX" classid="clsid:CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA" width="320" height="240">
<param name="src" value="{$url->resourceDownloadLink($resource)}" />
<param name="autostart" value="Real Player Audio" />
<param name="controls" value="all" />
<param name="console" value="audio" />
<embed
type="audio/x-pn-realaudio-plugin"
src="{$url->resourceDownloadLink($resource)}"
width="320"
height="240"
autostart="Real Player Audio"
controls="all"
console="audio">
</embed>
</object>
</OBJECT>
<!-- 支援Windows Media Player--!> <object id="MediaPlayer1" classid="CLSID:22d6f312-b0f6-11d0-94ab-0080c74c7e95" codebase="
http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab# Version=5,1,52,701" standby="Loading Microsoft Windows?Media Player components..." type="application/x-oleobject" width="320" height="240">
<param name="fileName" value="{$url->resourceDownloadLink($resource)}" />
<param name="animationatStart" value="true" />
<param name="transparentatStart" value="true" />
<param name="autoStart" value="Windows Media Player Audio" />
<param name="showControls" value="true" />
<param name="Volume" value="-300" />
<embed
type="application/x-mplayer2"
pluginspage="
http://www.microsoft.com/Windows/MediaPlayer/"
src="{$url->resourceDownloadLink($resource)}"
name="MediaPlayer1"
width="320"
height="240"
autostart="Windows Media Player Audio"
showcontrols="1" volume="-300">
</embed>
</object>
<!-- 音訊支援參數結束--!>{$resource->getFileName()}
</a><br/>
{$locale->tr("format")}: {$metadata->getFormat()|upper}<br/>
{$locale->tr("length")}: {$metadata->getLengthString()}<br/>
{$locale->tr("sample_rate")}: {$metadata->getSampleRate()} Khz
{elseif $resource->isVideo()}
<img alt="Sound" src="{$url->getUrl("/imgs/video.gif")}" height="64" width="64" style="border:0px;" /><br/>
<!-- 視訊支援參數開始--!><!-- 支援flash--!> <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="
http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" height="240" width="320">
<param name="movie" value="{$url->resourceDownloadLink($resource)}" />
<param name="quality" value="best" />
<param name="play" value="flash" />
<embed
height="240"
pluginspage="
http://www.macromedia.com/go/getflashplayer"
src="{$url->resourceDownloadLink($resource)}"
type="application/x-shockwave-flash"
width="320"
quality="best"
play="{$url->resourceDownloadLink($resource)}" />
</embed>
</object>
<!-- 支援QuickTime--!> <OBJECT CLASSID="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B"
WIDTH="320"
HEIGHT="240"
CODEBASE="
http://www.apple.com/qtactivex/qtplugin.cab">
<PARAM name="SRC" VALUE="{$url->resourceDownloadLink($resource)}" />
<PARAM name="AUTOPLAY" VALUE="false" />
<PARAM name="CONTROLLER" VALUE="true" />
<EMBED SRC="{$url->resourceDownloadLink($resource)}"
WIDTH="320"
HEIGHT="240"
AUTOPLAY="QuickTime Movie"
CONTROLLER="true"
PLUGINSPAGE="
http://www.apple.com/quicktime/download/">
</EMBED>
</object>
<!-- 支援Real Player--!> <object id="RVOCX" classid="clsid:CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA" width="320" height="240">
<param name="src" value="{$url->resourceDownloadLink($resource)}" />
<param name="autostart" value="Real Player Video" />
<param name="controls" value="imagewindow,all" />
<param name="console" value="video" />
<embed
type="audio/x-pn-realaudio-plugin"
src="{$url->resourceDownloadLink($resource)}"
width="320"
height="240"
autostart="Real Player Video"
controls="imagewindow,all"
console="video">
</embed>
</object>
<!-- 支援Windows Media Player--!> <object id="MediaPlayer" width="320" height="240" classid="CLSID:22D6F312-B0F6-11D0-94AB-0080C74C7E95" standby="Loading Windows Media Player components..." type="application/x-oleobject">
<param name="FileName" value="{$url->resourceDownloadLink($resource)}" valuetype="ref" ref />
<param name="AudioStream" value="1" />
<param name="AutoSize" value="0" />
<param name="AutoStart" value="Windows Media Player Movie" />
<param name="AnimationAtStart" value="0" />
<param name="AllowScan" value="-1" />
<param name="AllowChangeDisplaySize" value="-1" />
<param name="AutoRewind" value="0" />
<param name="Balance" value="0" />
<param name="BaseURL" value />
<param name="BufferingTime" value="5" />
<param name="CaptioningID" value />
<param name="ClickToPlay" value="-1" />
<param name="CursorType" value="0" />
<param name="CurrentPosition" value="-1" />
<param name="CurrentMarker" value="0" />
<param name="DefaultFrame" value />
<param name="DisplayBackColor" value="0" />
<param name="DisplayForeColor" value="16777215" />
<param name="DisplayMode" value="1" />
<param name="DisplaySize" value="2" />
<param name="Enabled" value="-1" />
<param name="EnableContextMenu" value="-1" />
<param name="EnablePositionControls" value="-1" />
<param name="EnableFullScreenControls" value="-1" />
<param name="EnableTracker" value="-1" />
<param name="InvokeURLs" value="-1" />
<param name="Language" value="-1" />
<param name="Mute" value="0" />
<param name="PlayCount" value="1" />
<param name="PreviewMode" value="0" />
<param name="Rate" value="1" />
<param name="SAMILang" value />
<param name="SAMIStyle" value />
<param name="SAMIFileName" value />
<param name="SelectionStart" value="-1" />
<param name="SelectionEnd" value="-1" />
<param name="SendOpenStateChangeEvents" value="-1" />
<param name="SendWarningEvents" value="-1" />
<param name="SendErrorEvents" value="-1" />
<param name="SendKeyboardEvents" value="0" />
<param name="SendMouseClickEvents" value="0" />
<param name="SendMouseMoveEvents" value="0" />
<param name="SendPlayStateChangeEvents" value="-1" />
<param name="ShowCaptioning" value="0" />
<param name="ShowControls" value="-1" />
<param name="ShowAudioControls" value="-1" />
<param name="ShowDisplay" value="-1" />
<param name="ShowGotoBar" value="0" />
<param name="ShowPositionControls" value="0" />
<param name="ShowStatusBar" value="-1" />
<param name="ShowTracker" value="-1" />
<param name="TransparentAtStart" value="0" />
<param name="VideoBorderWidth" value="5" />
<param name="VideoBorderColor" value="333333" />
<param name="VideoBorder3D" value="-1" />
<param name="Volume" value="-1" />
<param name="WindowlessVideo" value="-1" />
<embed
type="application/x-mplayer2"
pluginspage="
http://www.microsoft.com/windows/mediaplayer/"
width="320"
height="240"
src="{$url->resourceDownloadLink($resource)}"
name="player"
autostart="Windows Media Player Movie"
showcontrols="1"
showstatusbar="1"
showdisplay="1">
</embed>
</object>
<!-- 視訊支援參數結束--!>{$resource->getFileName()}
</a><br/>
.................
希望各位大大們教教我一下