我正在JW播放器上工作,并希望使用word metabox动态添加播放列表。我面临的问题使用php之间javascriptPHP之间javascript
我使用的JW播放器和播放列表代码,你可以在这里找到..http://www.longtailvideo.com/support/jw-player/jw-player-for -flash-v5/16006/javascript-playlist-in-the-jw-embedder
我没有得到任何输出,如果我在'播放列表'之间使用php:[...这里...] - 其实我要使用PHP,使其所以加入影片箱,用户可以添加多个视频进行播放列表
<script type="text/javascript">
jwplayer("mediaplayer").setup({
'flashplayer': '<?php bloginfo('stylesheet_directory'); ?>/jw/player.swf',
'id': 'playerID',
'width': 640,
'height': 540,
//'skin': '<?php bloginfo('stylesheet_directory'); ?>/jw/skins/bekle/bekle.zip',
<?php if ($custom_metabox->get_the_value('video_playlist')) { ?>
//playlist starts
'playlist.position': '<?php echo $custom_metabox->get_the_value('plposition') ?>',
'playlist.size': '180',
'playlist': [
<?php while($custom_metabox->have_fields('playlistvideos'))
{ ?>
{
'file': '<?php echo $custom_metabox->the_value('videourl'); ?>',
'title': '<?php echo $custom_metabox->the_value('videotitle'); ?>',
'image': '<?php echo $custom_metabox->the_value('videoimage'); ?>',
'duration': '<?php echo $custom_metabox->the_value('videoduration'); ?>',
'description': '<?php echo $custom_metabox->the_value('videodescription'); ?>'
},
<?php } ?>
],
<?php } ?>
'file': '<?php echo $custom_metabox->the_value('selfhosted'); ?>',
'image':'<?php echo $custom_metabox->the_value('selfhost_image'); ?>',
});
</script>
任何人都可以请指导我。在这里我想用这个做克隆
那么,什么是你的问题代替? – genesis 2012-02-29 17:04:59
是获得评估的字符串中的<?php echo ..'我认为你不能这样做? – dm03514 2012-02-29 17:05:27
你的问题*是什么?请解释一下 – footy 2012-02-29 17:05:29