Can VLC and the Slider be separated using VLCcontrols.js
Posted: 20 Mar 2009 09:31
Hi,
I am using VLCcontrols and SimpleSlider.js for developing a web application.
I am using FireFox3.0.5, VLC 0.9.8a and windows OS.
I have tried a simpleSlider example. It displays slider only. but if I want to associate this slider with the vlc player,how to do that.
Code below:
function init()
{
var myvlc = new VLCObject("mymovie", "400", "200", "0.8.6");
myvlc.write("vlccontent");
(1) vlc_controls = new VLCcontrols(myvlc);
vlc_controls.options.set("ffmpeg-pp-q", 6);
//vlc_controls.options.set("start-time", 60);
vlc_controls.onready = function () {
vlc_controls.play("videos/abc.wmv");
}
(2) var myslider = new Slider("slider1", 400, 10, bgcolor="silver", fgcolor="#666666");
myslider.onNewPosition = function()
{
document.getElementById("slider1_label").innerHTML = parseInt(myslider.position * 100 * 100) / 100;
}
}
if i comment (1) and uncomment (2) ,o/p displays vlc player with the slider but with no buttons.
if Uncomment(1) and comment (2), o/p displayes vlc player with all the functionality.
What I need is to separate Vlc and slider and add all the functionality(like play,pause etc).
How can we do this?
I am using VLCcontrols and SimpleSlider.js for developing a web application.
I am using FireFox3.0.5, VLC 0.9.8a and windows OS.
I have tried a simpleSlider example. It displays slider only. but if I want to associate this slider with the vlc player,how to do that.
Code below:
function init()
{
var myvlc = new VLCObject("mymovie", "400", "200", "0.8.6");
myvlc.write("vlccontent");
(1) vlc_controls = new VLCcontrols(myvlc);
vlc_controls.options.set("ffmpeg-pp-q", 6);
//vlc_controls.options.set("start-time", 60);
vlc_controls.onready = function () {
vlc_controls.play("videos/abc.wmv");
}
(2) var myslider = new Slider("slider1", 400, 10, bgcolor="silver", fgcolor="#666666");
myslider.onNewPosition = function()
{
document.getElementById("slider1_label").innerHTML = parseInt(myslider.position * 100 * 100) / 100;
}
}
if i comment (1) and uncomment (2) ,o/p displays vlc player with the slider but with no buttons.
if Uncomment(1) and comment (2), o/p displayes vlc player with all the functionality.
What I need is to separate Vlc and slider and add all the functionality(like play,pause etc).
How can we do this?