a barrage of video for meteor (meteor的一个弹幕视频插件)
this package has exsit on the meteor atmosphere
meteor add jquick:video-danmu
a barrage video named danketv, you can check some video to see the effect.
This site address: www.danketv.com
( More detail you can see the jquery.danmu.js which exsit on this package, it is pretty simple )
<div id="danmu"></div>
You may needn't init plugin with this api, cause plugin has some default parameters inside.
This api will customize your barrage as you want.
$("#player-container").danmu({ //"player-container" is the id of barrage playing area
left: 0, // offset of the left border
top: 0 , // offset of the right borde
height: 450, // height of barrage playing area
width: player_width, // width of barrage playing area
zindex :500, //div zindex
speed:5000, // speed of barrage element, millisecond
sumtime:65535, // total time of the barrage playing
danmuss:{}, // objects of the barrage, major content of barrage playing
default_font_color:"#FFFFFF", // font color
font_size_small:24, // small barrage font size
font_size_big:28, // big barrage font size
opacity:"0.7", //o pacity
top_botton_danmu_time:4000
});
var theTime = $('#danmu').data('nowtime') + 5;
$('#player-container').danmu("add_danmu",{"text":"test danmu" , "color":"white", "size":"1","position":"0","time":theTime ,"isnew":" "});
//I assign the time to the variable "theTime", this example will send the barrage content after 5 seconds.
$('#player-container').danmu('danmu_start');
$('#player-container').danmu('danmu_stop');
$('#player-container').danmu('danmu_stop');