Перейти к содержанию
Авторизация  
AdmLisrer

Ребят Как Сделать Плеер Поменьше И Где Вообще Тут Размеры?

Рекомендуемые сообщения

{if $page == "detail"}

{if $video.video_player == "flvplayer"}

{literal}

<div id="Playerholder">

You need to have the <a href="http://www.macromedia.com/go/getflashplayer">Flash'>http://www.macromedia.com/go/getflashplayer">Flash'>http://www.macromedia.com/go/getflashplayer">Flash'>http://www.macromedia.com/go/getflashplayer">Flash'>http://www.macromedia.com/go/getflashplayer">Flash'>http://www.macromedia.com/go/getflashplayer">Flash'>http://www.macromedia.com/go/getflashplayer">Flash'>http://www.macromedia.com/go/getflashplayer">Flash'>http://www.macromedia.com/go/getflashplayer">Flash'>http://www.macromedia.com/go/getflashplayer">Flash Player</a> installed and

a browser with JavaScript support.

</div>

<script type="text/javascript">

 

var clips = "[ { name: 'ClickToPlay', overlayId: 'play' },";

{/literal}

{if $total_video_ads > 0}

{literal}

 

clips = clips + "{ name: 'Advertisment', url: '{/literal}{$smarty.const._URL2}/videoads.php?h={$video_ad_hash}{literal}', linkUrl: '{/literal}{$smarty.const._URL2}/videoads.php?h={$video_ad_hash}%26tz=t{literal}', linkWindow: '{/literal}{$video_ad_target}{literal}', controlEnabled: false, showOnLoadBegin: true },";

{/literal}

{/if}

{literal}

 

clips = clips + " { name: '{/literal}{$uniq_id}{literal}', url: '{/literal}{$smarty.const._URL2}/videos.php?vid={$uniq_id}{literal}' } ]";

 

var flashvars = {

config: "{ playList: " + clips + ", useSmoothing: true, baseURL: '', autoPlay: {/literal}{$smarty.const._AUTOPLAY}{literal}, autoBuffering: {/literal}{$smarty.const._AUTOBUFF}{literal}, startingBufferLength: 2, bufferLength: 5, loop: false,hideControls: false,initialScale: 'fit', showPlayListButtons: false, useNativeFullScreen: true,controlBarGloss: 'high', controlsOverVideo: 'locked', watermarkUrl: '{/literal}{$smarty.const._WATERMARKURL}{literal}', showWatermark: '{/literal}{$smarty.const._WATERMARKSHOW}{literal}', watermarkLinkUrl: '{/literal}{$smarty.const._WATERMARKLINK}{literal}', controlBarBackgroundColor: '0x{/literal}{$smarty.const._BGCOLOR}{literal}', progressBarColor1: '0xFFFFFF', progressBarColor2: '0x000000', timeDisplayFontColor: '0x{/literal}{$smarty.const._TIMECOLOR}{literal}', noVideoClip: { url: '{/literal}{$smarty.const._URL}/{$smarty.const._UPFOLDER}/notfound.jpg{literal}' }, menuItems: [ false, false, true, true, true, false, false ], showStopButton: true, useHwScaling: false, showOnLoadBegin: true }"

};

 

var params = {

allowfullscreen: "true",

allowScriptAccess: "always",

wmode: "window"

};

var attributes = {};

swfobject.embedSWF("{/literal}{$smarty.const._URL2}{literal}/player.swf", "Playerholder", "{/literal}{$smarty.const._PLAYER_W}{literal}", "{/literal}{$smarty.const._PLAYER_H}{literal}", "9.0.115", false, flashvars, params, attributes);

</script>

{/literal}

 

{elseif $video.video_player == "jwplayer"}

 

<div id="Playerholder">

You need to have the <a href="http://www.macromedia.com/go/getflashplayer">Flash Player</a> installed and

a browser with JavaScript support.

</div>

{literal}

<script type="text/javascript">

var flashvars = {

{/literal}

{if $video.source_id == 3}

{literal}

file: '{/literal}{$video.direct}{literal}',

{/literal}

{else}

{literal}

file: '{/literal}{$smarty.const._URL2}{literal}/videos.php?vid={/literal}{$video.uniq_id}{literal}',

type: 'video',

{/literal}

{/if}

{literal}

enablejs: 'true',

skin: '{/literal}{$smarty.const._URL2}{literal}/iskin.zip',

backcolor: '{/literal}{$smarty.const._BGCOLOR}{literal}',

frontcolor: '{/literal}{$smarty.const._TIMECOLOR}{literal}',

screencolor: '000000',

repeat: 'false',

autostart: '{/literal}{$smarty.const._AUTOPLAY}{literal}',

 

 

 

 

 

linktarget: '_blank',

link: '{/literal}{$smarty.const._WATERMARKLINK}{literal}',

image: '{/literal}{$video.preview_image}{literal}',

bufferlength: '5',

controlbar: 'over'

 

 

};

 

var params = {

wmode: 'window',

allowfullscreen: 'true',

allowscriptaccess: 'always',

allownetworking: 'all'

};

 

var attributes = {

name: '{/literal}{$video.uniq_id}{literal}',

id: '{/literal}{$video.uniq_id}{literal}'

};

 

swfobject.embedSWF('{/literal}{$smarty.const._URL2}{literal}/jwplayer.swf', 'Playerholder', '{/literal}{$smarty.const._PLAYER_W}{literal}', '{/literal}{$smarty.const._PLAYER_H}{literal}', '9.0.115', false, flashvars, params, attributes);

</script>

{/literal}

 

{elseif $video.video_player == "embed"}

 

{if $total_video_ads > 0}

{literal}

 

<script type="text/javascript">

var Player;

var embed_code = {/literal}'{$video.embed_code}'{literal};

 

function init() {

if (document.getElementById) {

Player = document.getElementById("Playerholder");

}

}

 

// wait for the page to fully load before initializing

window.onload = init;

 

function onClipDone(clip) {

if (clip.name == "Advertisment") {

Player.DoStop();

swfobject.removeSWF("Playerholder");

ajax_request("video", "do=request&vid={/literal}{$video.uniq_id}{literal}", "#embed_Playerholder", "html");

}

}

 

</script>

 

<div id="embed_Playerholder">

<div id="Playerholder">

You need to have the <a href="http://www.macromedia.com/go/getflashplayer">Flash Player</a> installed and

a browser with JavaScript support.

</div>

</div>

 

<script type="text/javascript">

var clips = "[ { name: 'ClickToPlay', overlayId: 'play' }, { name: 'Advertisment', url: '{/literal}{$smarty.const._URL2}/videoads.php?h={$video_ad_hash}{literal}', linkUrl: '{/literal}{$smarty.const._URL2}/videoads.php?h={$video_ad_hash}%26tz=t{literal}', linkWindow: '{/literal}{$video_ad_target}{literal}', controlEnabled: false, showOnLoadBegin: true } ]";

 

var flashvars = {

config: "{ playList: " + clips + ", useSmoothing: true, baseURL: '', autoPlay: {/literal}{$smarty.const._AUTOPLAY}{literal}, autoBuffering: {/literal}{$smarty.const._AUTOBUFF}{literal}, startingBufferLength: 2, bufferLength: 5, loop: false,hideControls: false,initialScale: 'fit', showPlayListButtons: false, useNativeFullScreen: true,controlBarGloss: 'high', controlsOverVideo: 'locked', watermarkUrl: '{/literal}{$smarty.const._WATERMARKURL}{literal}', showWatermark: '{/literal}{$smarty.const._WATERMARKSHOW}{literal}', watermarkLinkUrl: '{/literal}{$smarty.const._WATERMARKLINK}{literal}', controlBarBackgroundColor: '0x{/literal}{$smarty.const._BGCOLOR}{literal}', progressBarColor1: '0xFFFFFF', progressBarColor2: '0x000000', timeDisplayFontColor: '0x{/literal}{$smarty.const._TIMECOLOR}{literal}', noVideoClip: { url: '{/literal}{$smarty.const._URL}/{$smarty.const._UPFOLDER}/notfound.jpg{literal}' }, menuItems: [ false, false, true, true, true, false, false ], showStopButton: true, useHwScaling: false, showOnLoadBegin: true }"

};

 

var params = {

allowfullscreen: "true",

allowScriptAccess: "always",

wmode: "window"

};

var attributes = {};

 

swfobject.embedSWF("{/literal}{$smarty.const._URL2}{literal}/player.swf", "Playerholder", "{/literal}{$smarty.const._PLAYER_W}{literal}", "{/literal}{$smarty.const._PLAYER_H}{literal}", "9.0.115", false, flashvars, params, attributes);

</script>

{/literal}

{else}

<div id="Playerholder">

<noscript>

You need to have the <a href="http://www.macromedia.com/go/getflashplayer">Flash Player</a> installed and

a browser with JavaScript support.

</noscript>

{$video.embed_code}

</div>

{/if}

{/if}

{/if}

 

 

{if $page == "index"}

 

{if $video.video_player == "flvplayer"}

{literal}

<div id="Playerholder">

You need to have the <a href="http://www.macromedia.com/go/getflashplayer">Flash Player</a> installed and

a browser with JavaScript support.

</div>

 

<script type="text/javascript">

 

var clips = "[ { name: 'ClickToPlay', overlayId: 'play' }, { name: '', url: '{/literal}{$smarty.const._URL2}/videos.php?vid={$voth}{literal}' } ]";

 

var flashvars = {

config: "{ playList: " + clips + ", showPlayList: true,useSmoothing: true, baseURL: '', autoPlay: {/literal}{$smarty.const._AUTOPLAY}{literal}, autoBuffering: {/literal}{$smarty.const._AUTOBUFF}{literal}, startingBufferLength: 2, bufferLength: 5, loop: false,hideControls: false,initialScale: 'fit', showPlayListButtons: false, useNativeFullScreen: true,controlBarGloss: 'high', controlsOverVideo: 'ease', controlBarBackgroundColor: '0x{/literal}{$smarty.const._BGCOLOR}{literal}', progressBarColor1: '0xFFFFFF', progressBarColor2: '0x000000', timeDisplayFontColor: '0x{/literal}{$smarty.const._TIMECOLOR}{literal}', noVideoClip: { url: '{/literal}{$smarty.const._URL}/{$smarty.const._UPFOLDER}/notfound.jpg{literal}' }, useHwScaling: false,showMenu: false }"

};

var params = {

allowfullscreen: "true",

allowScriptAccess: "always",

wmode: "transparent"

};

var attributes = {};

swfobject.embedSWF("player.swf", "Playerholder", "{/literal}{$smarty.const._PLAYER_W_INDEX}{literal}", "{/literal}{$smarty.const._PLAYER_H_INDEX}{literal}", "9.0.115", false, flashvars, params, attributes);

</script>

{/literal}

 

{elseif $video.video_player == "jwplayer"}

 

<div id="Playerholder">

You need to have the <a href="http://www.macromedia.com/go/getflashplayer">Flash Player</a> installed and

a browser with JavaScript support.

</div>

{literal}

<script type="text/javascript">

var flashvars = {

{/literal}

{if $video.source_id == 3}

{literal}

file: '{/literal}{$video.direct}{literal}',

{/literal}

{else}

{literal}

file: '{/literal}{$smarty.const._URL2}{literal}/videos.php?vid={/literal}{$video.uniq_id}{literal}',

type: 'video',

{/literal}

{/if}

{literal}

 

enablejs: 'true',

skin: '{/literal}{$smarty.const._URL2}{literal}/iskin.zip',

backcolor: '{/literal}{$smarty.const._BGCOLOR}{literal}',

frontcolor: '{/literal}{$smarty.const._TIMECOLOR}{literal}',

screencolor: '000000',

repeat: 'false',

autostart: '{/literal}{$smarty.const._AUTOPLAY}{literal}',

logo: '{/literal}{$smarty.const._WATERMARKURL}{literal}',

 

linktarget: '_blank',

link: '{/literal}{$smarty.const._WATERMARKLINK}{literal}',

image: '{/literal}{$video.preview_image}{literal}',

bufferlength: '5',

controlbar: 'over'

};

 

var params = {

wmode: 'transparent',

allowfullscreen: 'true',

allowscriptaccess: 'always',

allownetworking: 'all'

};

 

var attributes = {};

 

swfobject.embedSWF('jwplayer.swf', 'Playerholder', '{/literal}{$smarty.const._PLAYER_W_INDEX}{literal}', '{/literal}{$smarty.const._PLAYER_H_INDEX}{literal}', '9.0.115', false, flashvars, params, attributes);

</script>

{/literal}

 

{elseif $video.video_player == "embed"}

<div id="Playerholder">

<noscript>

You need to have the <a href="http://www.macromedia.com/go/getflashplayer">Flash Player</a> installed and

a browser with JavaScript support.

</noscript>

{$video.embed_code}

</div>

{/if}

{/if}

 

{if $page == "favorites"}

 

{if $video.video_player == "flvplayer"}

<div class="playing">

<div id="embed_Playerholder">

<div id="Playerholder">

You need to have the <a href="http://www.macromedia.com/go/getflashplayer">Flash Player</a> installed and

a browser with JavaScript support.

</div>

</div>

{literal}

<script type="text/javascript">

 

var clips = "[ { name: '', url: '{/literal}{$smarty.const._URL2}/videos.php?vid={$video.uniq_id}{literal}' } ]";

 

var flashvars = {

config: "{ playList: " + clips + ", useSmoothing: true, baseURL: '', autoPlay: {/literal}{$smarty.const._AUTOPLAY}{literal}, autoBuffering: {/literal}{$smarty.const._AUTOBUFF}{literal}, startingBufferLength: 2, bufferLength: 5, loop: false,hideControls: false,initialScale: 'fit', showPlayListButtons: false, useNativeFullScreen: true,controlBarGloss: 'high', controlsOverVideo: 'locked', watermarkUrl: '{/literal}{$smarty.const._WATERMARKURL}{literal}', showWatermark: '{/literal}{$smarty.const._WATERMARKSHOW}{literal}', watermarkLinkUrl: '{/literal}{$smarty.const._WATERMARKLINK}{literal}', controlBarBackgroundColor: '0x{/literal}{$smarty.const._BGCOLOR}{literal}', progressBarColor1: '0xFFFFFF', progressBarColor2: '0x000000', timeDisplayFontColor: '0x{/literal}{$smarty.const._TIMECOLOR}{literal}', noVideoClip: { url: '{/literal}{$smarty.const._URL}/{$smarty.const._UPFOLDER}/notfound.jpg{literal}' }, menuItems: [ false, false, true, true, true, false, false ], showStopButton: true, useHwScaling: false, showOnLoadBegin: true }"

};

var params = {

allowfullscreen: "true",

allowScriptAccess: "always",

wmode: "transparent"

};

var attributes = {};

swfobject.embedSWF("{/literal}{$smarty.const._URL2}{literal}/player.swf", "Playerholder", "{/literal}{$smarty.const._PLAYER_W_FAVS}{literal}", "{/literal}{$smarty.const._PLAYER_H_FAVS}{literal}", "9.0.115", false, flashvars, params, attributes);

</script>

</div>

{/literal}

 

{elseif $video.video_player == "jwplayer"}

 

<div class="playing">

<div id="embed_Playerholder">

<div id="Playerholder">

You need to have the <a href="http://www.macromedia.com/go/getflashplayer">Flash Player</a> installed and

a browser with JavaScript support.

</div>

</div>

{literal}

<script type="text/javascript">

var flashvars = {

{/literal}

{if $video.source_id == 3}

{literal}

file: '{/literal}{$video.direct}{literal}',

{/literal}

{else}

{literal}

file: '{/literal}{$smarty.const._URL2}{literal}/videos.php?vid={/literal}{$video.uniq_id}{literal}',

type: 'video',

{/literal}

{/if}

{literal}

enablejs: 'true',

skin: '{/literal}{$smarty.const._URL2}{literal}/iskin.zip',

backcolor: '{/literal}{$smarty.const._BGCOLOR}{literal}',

frontcolor: '{/literal}{$smarty.const._TIMECOLOR}{literal}',

screencolor: '000000',

repeat: 'false',

autostart: '{/literal}{$smarty.const._AUTOPLAY}{literal}',

logo: '{/literal}{$smarty.const._WATERMARKURL}{literal}',

 

 

linktarget: '_blank',

link: '{/literal}{$smarty.const._WATERMARKLINK}{literal}',

image: '{/literal}{$video.preview_image}{literal}',

bufferlength: '5',

controlbar: 'over'

};

 

var params = {

wmode: 'transparent',

allowfullscreen: 'true',

allowscriptaccess: 'always',

allownetworking: 'all'

};

 

var attributes = {};

 

swfobject.embedSWF('{/literal}{$smarty.const._URL2}{literal}/jwplayer.swf', 'Playerholder', '{/literal}{$smarty.const._PLAYER_W_FAVS}{literal}', '{/literal}{$smarty.const._PLAYER_H_FAVS}{literal}', '9.0.115', false, flashvars, params, attributes);

</script>

</div>

{/literal}

 

{elseif $video.video_player == "embed"}

 

<div class="playing">

<div id="embed_Playerholder">

<div id="Playerholder">

<noscript>

You need to have the <a href="http://www.macromedia.com/go/getflashplayer">Flash Player</a> installed and

a browser with JavaScript support.

</noscript>

{$video.embed_code}

</div>

</div>

{/if}

{/if}

Изменено пользователем AdmLisrer

Поделиться сообщением


Ссылка на сообщение
Поделиться на другие сайты

Тебе нужно в файле css задавать размеры блока в котором он находится.

css подключен в шапке основного файла шаблона. Селектором блока в котором находится плеер является его ID.

Я не стал определять в каком тут блоке что находится и взял первый попавшийся на глаза ID

вот примерный стиль

#Playerholder{ /* Playerholder это id блока в котором находится плеер */
width:400px; /* Ширина в пикселях */
height:400px; /* Высота в пикселях */
}

Можно добавить в код стиль вот так:

<style>
#Playerholder{ /* Playerholder это id блока в котором находится плеер */
width:400px; /* Ширина в пикселях */
height:400px; /* Высота в пикселях */
}

</style>

 

Для тех кто не разбирается в коде:

Чтобы определить блок воспользуйтесь браузером Opera, зайдите на сайт и нажмите правой кнопкой в любом пустом месте сайта. Далее жмём "Проинспектировать элемент" и жмём на тот блок в котором плеер, либо на сам плеер и таким образом выделится его блок.

 

Так же для определения блока можно воспользоваться программой Firebug встраиваемов в Firefox. Но так как ей я не пользовался то и описать не смогу, тут вам поможет гугл)

Изменено пользователем AlexPS

Поделиться сообщением


Ссылка на сообщение
Поделиться на другие сайты

Для публикации сообщений создайте учётную запись или авторизуйтесь

Вы должны быть пользователем, чтобы оставить комментарий

Создать учетную запись

Зарегистрируйте новую учётную запись в нашем сообществе. Это очень просто!

Регистрация нового пользователя

Войти

Уже есть аккаунт? Войти в систему.

Войти
Авторизация  

  • Последние посетители   0 пользователей онлайн

    Ни одного зарегистрированного пользователя не просматривает данную страницу

×
×
  • Создать...