开发者

Javascript variable as property setting for jwplayer

HELP!! i need to use a variable for the property "file" but cant find any documentation on the proper syntax.

if i have:

var video="**URL TO MY VIDEO**";

then i need something like this:

jwplayer("movieContainer").setup({
autostart: true,
flashplayer: "jwplayer/player.swf开发者_开发百科",
skin: "jwplayer/lulu.zip",
height: 270,
width: 480,
file: **video** *<<<< I NEED VAR VIDEO TO PRINT HERE*
});

please help!! THANK YOU SO MUCH!


It's actually very simple -- just put the variable where you'd put the string.

jwplayer("movieContainer").setup({
    autostart: true,
    flashplayer: "jwplayer/player.swf",
    skin: "jwplayer/lulu.zip",
    height: 270,
    width: 480,
    file: video
});


Use this code

jwplayer("movieContainer").setup({
    autostart: true,
    flashplayer: "jwplayer/player.swf",
    skin: "jwplayer/lulu.zip",
    height: 270,
    width: 480,
    file: video,
});
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜