因为这是一个播放器的生成格式,所以我需要在后台用datalist动态的去绑定每一个url的值,请问这么将这一段携程在厚爱的一段string值?<a style="display: block; width: 90px; height: 70px" id="playerVideo"></a>
<!-- this will install flowplayer inside previous A- tag. -->
<script type="text/javascript"> flowplayer("playerVideo", "/_layouts/NCS.OCP.Resource/scripts/flowplayer-3.2.7.swf", { onLoad: function () { // called when player has finished loading
this.setVolume(30); // set volume property
},
playlist: [ {
url: '/album_03.jpg',
scaling: 'orig'
},
{
autoPlay: false,
autoBuffering: true,
url: 'TestMedia/Kenxin.flv'
} ],
onMouseOver: function () { this.play(); },
onMouseOut: function () {
this.stop();
}
}); </script>
我要在后台写的方法:
private string VideoPlayerGeneration(string playerId, string videoUrl, string previewUrl)
{// 求高手帮忙!在线等!}
<!-- this will install flowplayer inside previous A- tag. -->
<script type="text/javascript"> flowplayer("playerVideo", "/_layouts/NCS.OCP.Resource/scripts/flowplayer-3.2.7.swf", { onLoad: function () { // called when player has finished loading
this.setVolume(30); // set volume property
},
playlist: [ {
url: '/album_03.jpg',
scaling: 'orig'
},
{
autoPlay: false,
autoBuffering: true,
url: 'TestMedia/Kenxin.flv'
} ],
onMouseOver: function () { this.play(); },
onMouseOut: function () {
this.stop();
}
}); </script>
我要在后台写的方法:
private string VideoPlayerGeneration(string playerId, string videoUrl, string previewUrl)
{// 求高手帮忙!在线等!}
用Page.ClientScript.RegisterStartupScript注册这段JS到前台
记得在注册这个方法时外面加个function比如: ///你的这两个参数具体要传哪你自己改,这个我不知道你的这两个参数对应的方法体中哪两个URLfunction Abc(videoUrl,previewUrl)
{
flowplayer("playerVideo", "/_layouts/NCS.OCP.Resource/scripts/flowplayer-3.2.7.swf", { onLoad: function () { // called when player has finished loading
this.setVolume(30); // set volume property
},
playlist: [ {
url: '/album_03.jpg',
scaling: 'orig'
},
{
autoPlay: false,
autoBuffering: true,
url: 'TestMedia/Kenxin.flv'
} ],
onMouseOver: function () { this.play(); },
onMouseOut: function () {
this.stop();
}
});
}
因为我这这个是从数据库里面取出一个播放的ul,然后就要去天台去把它显示成一个播放器了
所以我是用datalist动态的去绑定值,这个目前想到的只要拼字符串好难