Pekka
3rd of October 2006 (Tue), 14:07
In viewerstyle editor you have a viewerstyle:
114228
This viewerstyle has several variables which the embedded object can use. The variable names can be anything as long as they are unique and do not contain other than plain ASCII letters, underscore is also ok. The viewerstyle is coupled with actual viewerstyle template which is the embedded object code. You add your variables to this template:
<?php
// EE WINDOWS MEDIA VIEWER
if (isset($photo)) {
?><object id="mediaPlayer"
width="<?php print $VAR_player_width; ?>"
height="<?php print $VAR_player_height; ?>"
classid="CLSID:22d6f312-b0f6-11d0-94ab-0080c74c7e95"
codebase="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=6,4,7,1112"
standby="Loading Microsoft Windows Media Player components..."
type="application/x-oleobject"
>
<param name="FileName" value="<?php print $url; ?>">
<param name="AnimationatStart" value="<?php print $VAR_animationatStart; ?>">
<param name="TransparentatStart" value="<?php print $VAR_transparentatStart; ?>">
<param name="AutoStart" value="<?php print $VAR_autoStart; ?>">
<param name="ShowControls" value="<?php print $VAR_showControls; ?>">
<param name="Loop" value="<?php print $VAR_loop; ?>">
<param name="ClickToPlay" value="<?php print $VAR_clicktoplay; ?>">
<param name="AutoRewind" value="<?php print $VAR_autorewind; ?>">
<param name="PlayCount" value="<?php print $VAR_playcount; ?>">
<embed
type="application/x-mplayer2"
pluginspage="http://microsoft.com/windows/mediaplayer/en/download/"
id="<?php print $VAR_id; ?>"
name="<?php print $VAR_name; ?>"
DisplaySize="<?php print $VAR_displaysize; ?>"
AutoSize="<?php print $VAR_autosize; ?>"
Bgcolor="<?php print $VAR_bgcolor; ?>"
ShowControls="<?php print $VAR_showControls; ?>"
ShowTracker="<?php print $VAR_showtracker; ?>"
ShowDisplay="<?php print $VAR_showdisplay; ?>"
ShowStatusbar="<?php print $VAR_showstatusbar; ?>"
Videoborder3d="<?php print $VAR_videoborder3d; ?>"
width="<?php print $VAR_player_width; ?>"
height="<?php print $VAR_player_height; ?>"
Autostart="<?php print $VAR_autoStart; ?>"
Loop="<?php print $VAR_loop; ?>"
PlayCount="<?php print $VAR_playcount; ?>"
AutoRewind="<?php print $VAR_autorewind; ?>"
src="<?php print $url; ?>"
>
</embed>
</object><?php
}
?>
Now you can control the object from EE, and each photo can have separate variables: some autoloop, width and height can be altered, statusbar can be set on or off etc.
You assign the viewerstyle to a photo in photo editor:
114231
In above editor you can upload the media file (choose resize method NONE for non-image content), set custom variable usage on/off and give values specific only to this photo to them.
There are tons of file formats to embed out there and more coming, and with this system you can use them with ease and flexibility.
114228
This viewerstyle has several variables which the embedded object can use. The variable names can be anything as long as they are unique and do not contain other than plain ASCII letters, underscore is also ok. The viewerstyle is coupled with actual viewerstyle template which is the embedded object code. You add your variables to this template:
<?php
// EE WINDOWS MEDIA VIEWER
if (isset($photo)) {
?><object id="mediaPlayer"
width="<?php print $VAR_player_width; ?>"
height="<?php print $VAR_player_height; ?>"
classid="CLSID:22d6f312-b0f6-11d0-94ab-0080c74c7e95"
codebase="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=6,4,7,1112"
standby="Loading Microsoft Windows Media Player components..."
type="application/x-oleobject"
>
<param name="FileName" value="<?php print $url; ?>">
<param name="AnimationatStart" value="<?php print $VAR_animationatStart; ?>">
<param name="TransparentatStart" value="<?php print $VAR_transparentatStart; ?>">
<param name="AutoStart" value="<?php print $VAR_autoStart; ?>">
<param name="ShowControls" value="<?php print $VAR_showControls; ?>">
<param name="Loop" value="<?php print $VAR_loop; ?>">
<param name="ClickToPlay" value="<?php print $VAR_clicktoplay; ?>">
<param name="AutoRewind" value="<?php print $VAR_autorewind; ?>">
<param name="PlayCount" value="<?php print $VAR_playcount; ?>">
<embed
type="application/x-mplayer2"
pluginspage="http://microsoft.com/windows/mediaplayer/en/download/"
id="<?php print $VAR_id; ?>"
name="<?php print $VAR_name; ?>"
DisplaySize="<?php print $VAR_displaysize; ?>"
AutoSize="<?php print $VAR_autosize; ?>"
Bgcolor="<?php print $VAR_bgcolor; ?>"
ShowControls="<?php print $VAR_showControls; ?>"
ShowTracker="<?php print $VAR_showtracker; ?>"
ShowDisplay="<?php print $VAR_showdisplay; ?>"
ShowStatusbar="<?php print $VAR_showstatusbar; ?>"
Videoborder3d="<?php print $VAR_videoborder3d; ?>"
width="<?php print $VAR_player_width; ?>"
height="<?php print $VAR_player_height; ?>"
Autostart="<?php print $VAR_autoStart; ?>"
Loop="<?php print $VAR_loop; ?>"
PlayCount="<?php print $VAR_playcount; ?>"
AutoRewind="<?php print $VAR_autorewind; ?>"
src="<?php print $url; ?>"
>
</embed>
</object><?php
}
?>
Now you can control the object from EE, and each photo can have separate variables: some autoloop, width and height can be altered, statusbar can be set on or off etc.
You assign the viewerstyle to a photo in photo editor:
114231
In above editor you can upload the media file (choose resize method NONE for non-image content), set custom variable usage on/off and give values specific only to this photo to them.
There are tons of file formats to embed out there and more coming, and with this system you can use them with ease and flexibility.