Is this API code still valid?

For questions and discussion that is NOT (I repeat NOT) specific to a certain Operating System.
mlapl1
Blank Cone
Blank Cone
Posts: 19
Joined: 13 Sep 2008 16:50

Is this API code still valid?

Postby mlapl1 » 17 Oct 2009 05:41

Hello

I am working on a PC with windows XP Pro - SP3 installed. I have not played with VLC for about a year and recently upgraded from version 0.9.4 to version 1.0.2. I also installed the Firefox web plugin v. 1.0.2.

I have a web page served by an apache server on a remote linux box which contains the code at the end of this message. The purpose of the code is to play a segment of an mpg file stored on the PC, not the server, from one point to another point. I try to do this by setting start-time and stop-time with vlc_controls.options.set.

The playback is started automatically with the following command when the html page is loaded:

Code: Select all

<body onload="init()">
When I run the code below on a system with VLC 0.9.4 it works more or less correctly (the first, automatic, playback actually does not start at the correct start-time but once I stop the playback manually it plays correctly between the start and stop times). On the upgraded VLC system (v. 1.0.2), however, nothing happens. When I click on the Play button in the control bar, VLC complains that it has nothing in the playlist. This happens in both FF and IE. In IE, however, the debugger reports an error as follows:

Code: Select all

VLCcontrols.prototype.updateStatusText = function() { var status = VLC_status[0]; if (this.target.input) status = VLC_status[this.target.input.state]; @@@@@@@@@@@@@@@@@@@@@@ This is where the error is reported if (status) { document.getElementById("infosStatus").innerHTML = status; if (VLC_controller_last_status != status) this.debug("status : " + status); VLC_controller_last_status = status; } if (VLC_controller.onStatusChangedCallback) VLC_controller.onStatusChangedCallback(status); }
I am not very strong in Javascript and cannot find the appropriate VLC documentation though I have looked in the wiki. would appreciate any comments or advice as I really need this functionality.

Also I have not uploaded any new files to the server - I do not quite know where to find them.

Thank you

Now below is my code

Code: Select all

function init() { // load plugin myvlc = new VLCObject("mymovie", "800", "600", "0.8.6"); myvlc.write("vlccontent"); // load controls APL vlc_controls = new VLCcontrols(myvlc); // necessary - gives controls at base of player // APL sets start-time and end-time start_code=gup('start'); vlc_controls.options.set("start-time", start_code); // alert('Start_code set at: '+start_code); //this is set correctly stop_code=gup('stop'); // alert('Stop_code set at: '+stop_code); // this is set correctly vlc_controls.options.set("stop-time", stop_code); vlc_controls.onready = function () { vlc_controls.play("c:/blabla/blabla.mpg"); // plays a local file vlc_controls.options.set("start-time", start_code); vlc_controls.options.set("stop-time", stop_code); } waitControlsLoaded(); } // init

Return to “General VLC media player Troubleshooting”

Who is online

Users browsing this forum: No registered users and 28 guests