我想打印从" ajax"在jwplayer javascript中。帮助我,我是javascript的新手。请帮我!抱歉我的英语不好。
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
<script src="/a/jwplayer.js" type="text/javascript"></script>
<script type="text/javascript">jwplayer.key="key";</script>
<div id="my-video">Loading ...</div>
<script>
function loadPlayer(link){
var data = 'zing=' + link;
$.ajax({
type: "POST",
url: "http://localhost/a/zing.php",
data: data,
success: function (getlink){jwplayer("my-video").setup({
getlink,
image: "http://content.jwplatform.com/thumbs/Wf8BfcSt-640.jpg",
width: "580",
height: "370",
primary: "html5",
advertising: {
client: "vast",
schedule: {"myAds":{"offset":"15","tag":"http://www.adotube.com/php/services/player/OMLService.php?avpid=oRYYzvQ&platform_version=vast20&ad_type=linear&groupbypass=1&HTTP_REFERER=http://www.longtailvideo.com&video_identifier=longtailvideo.com,test"}}
}
});}
});
}
</script>
<script>loadPlayer('http://tv.zing.vn/video/Date-a-Live-II-Tap-10-END/IWZA7BIW.html');</script>
答案 0 :(得分:0)
您的问题就在您传递给init
的{{1}}的对象中:
jwPlayer.setup
可能,这是你在找什么?
success: function (getlink){
jwplayer("my-video").setup({
getlink, // This is wrong. There must be some name of the parameter.