javascript高手来帮我解释一下这段代码!
我是想采集某网站里的视频,网页源码中没有下载地址视频播放短的js代码是这个<scripttype="text/javascript">createVodPlayer("v...
我是想采集某网站里的视频,网页源码中没有下载地址
视频播放短的js代码是这个
<script type="text/javascript">createVodPlayer("video://vid:94af4d71bc7748c3bf15b7f511497d06")</script>
然后我对应的找到了他js中的这个方法,
对js不太懂,帮我看一下,是否用下面对方法 可以获取视频链接地址呢?
function createVodPlayer(url){
videoUrl = url;
var swfVersionStr = "10.2.0";
var xiSwfUrlStr = "playerProductInstall.swf";
var flashvars = {};
flashvars.url= url;
flashvars.host= "http://vmsbusc.sobeycache.com:8080/vmsbus2/JSONReceiver";
flashvars.mode= "letterbox";
flashvars.autoPlay=true;
flashvars.plugin=true;
flashvars.logging=true;
flashvars.encrypt=true;
flashvars.configable=true;//是否可配置(画面显示等配置)
flashvars.streamType="p2p";
flashvars.skin="http://mediac.sobeycache.com/hyw/media/player/skins/yellow.swf";
flashvars.seekParam="timecode=ms";
flashvars.isLive = 1;
var params = {};
params.quality = "high";
params.bgcolor = "#7d7d7d";
params.allowscriptaccess = "always";
params.allowfullscreen = "true";
params.wmode = "Opaque";
var attributes = {};
attributes.id = "MyVideoPlayer";
attributes.name = "MyVideoPlayer";
attributes.style="position:relative;z-index:2000;"
attributes.align = "middle";
swfobject.embedSWF(
"http://mediac.sobeycache.com/hyw/media/player/SoPlayer.swf", "aaca45b9ab1344a1b6701cf3d2ccf6d3",
"677", "503", "Opaque",
swfVersionStr, xiSwfUrlStr,
flashvars, params, attributes);
swfobject.createCSS("#aaca45b9ab1344a1b6701cf3d2ccf6d3", "display:block;text-align:left;");
} 展开
视频播放短的js代码是这个
<script type="text/javascript">createVodPlayer("video://vid:94af4d71bc7748c3bf15b7f511497d06")</script>
然后我对应的找到了他js中的这个方法,
对js不太懂,帮我看一下,是否用下面对方法 可以获取视频链接地址呢?
function createVodPlayer(url){
videoUrl = url;
var swfVersionStr = "10.2.0";
var xiSwfUrlStr = "playerProductInstall.swf";
var flashvars = {};
flashvars.url= url;
flashvars.host= "http://vmsbusc.sobeycache.com:8080/vmsbus2/JSONReceiver";
flashvars.mode= "letterbox";
flashvars.autoPlay=true;
flashvars.plugin=true;
flashvars.logging=true;
flashvars.encrypt=true;
flashvars.configable=true;//是否可配置(画面显示等配置)
flashvars.streamType="p2p";
flashvars.skin="http://mediac.sobeycache.com/hyw/media/player/skins/yellow.swf";
flashvars.seekParam="timecode=ms";
flashvars.isLive = 1;
var params = {};
params.quality = "high";
params.bgcolor = "#7d7d7d";
params.allowscriptaccess = "always";
params.allowfullscreen = "true";
params.wmode = "Opaque";
var attributes = {};
attributes.id = "MyVideoPlayer";
attributes.name = "MyVideoPlayer";
attributes.style="position:relative;z-index:2000;"
attributes.align = "middle";
swfobject.embedSWF(
"http://mediac.sobeycache.com/hyw/media/player/SoPlayer.swf", "aaca45b9ab1344a1b6701cf3d2ccf6d3",
"677", "503", "Opaque",
swfVersionStr, xiSwfUrlStr,
flashvars, params, attributes);
swfobject.createCSS("#aaca45b9ab1344a1b6701cf3d2ccf6d3", "display:block;text-align:left;");
} 展开
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询