IE runtime error

All you've ever wanted to know about the ActiveX, Mozilla plugins, the web interface and various PHP extensions
eric.gl.CN
Blank Cone
Blank Cone
Posts: 51
Joined: 19 Mar 2009 03:18

IE runtime error

Postby eric.gl.CN » 29 Apr 2009 13:15

hi pals,
I have add a interface in axvlc.dll. it can flip the image of the vlc.(horizontal or vertical) but when click the button quickly, and it can run well, then I close the IE, IE throw a runtime error. in another way, if I click the button slowly, it can works well. I'm confused about this quertion.
this is my interfave
libvlc_video_Horizontal_flip(), it impletemen the function of updateFilterOptions() and updateFilters, update the config for the transform.

I think the problem maybe has relationship with the input event which is deal with by qt in VLC.exe. but in IE I can't impletement a standard event process.

can you guys know some about this problems or any proposal?

thanks a lot

Anatoly_B
Blank Cone
Blank Cone
Posts: 14
Joined: 20 Aug 2008 03:30

Re: IE runtime error

Postby Anatoly_B » 01 May 2009 03:37

This helps to avoid the events by VLC at the close of the browser window

Code: Select all

if(window.attachEvent)window.attachEvent("onbeforeunload", StopVLCs); if(window.onbeforeunload)window.onbeforeunload=StopVLCs; if(document.onbeforeunload)document.onbeforeunload=StopVLCs; if(body.onbeforeunload)body.onbeforeunload=StopVLCs; function StopVLCs(){ vlc1.playlist.stop(); if(vlc2)vlc2.playlist.stop(); // stupid waiting 0,7s - without exit from .onbeforeunload handler var tt; var tb=new Date(); var tbt=tb.getTime(); var tbc=tbt; tbt+=700; while(tbt>tbc){tt=new Date(); var tbc=tt.getTime()} }
This also helps to avoid hangs Safari when user go to another page or close the tab...

eric.gl.CN
Blank Cone
Blank Cone
Posts: 51
Joined: 19 Mar 2009 03:18

Re: IE runtime error

Postby eric.gl.CN » 18 May 2009 11:58

I have try your code , it works , thank you. and can you tell me the reason? I want to know why? thanks you a lot

revolunet
Big Cone-huna
Big Cone-huna
Posts: 515
Joined: 17 Oct 2007 13:16
VLC version: 0.9.8
Operating System: Vista
Location: Paris, France
Contact:

Re: IE runtime error

Postby revolunet » 18 May 2009 12:06

you have to stop and unload VLC before closing browser to prevent IE/FF crashing
VLC & web IT consulting - http://www.revolunet.com
Github : http://github.com/revolunet

eric.gl.CN
Blank Cone
Blank Cone
Posts: 51
Joined: 19 Mar 2009 03:18

Re: IE runtime error

Postby eric.gl.CN » 18 May 2009 12:11

e... sorry , maybe it don't works,
I add this statement if(body.onbeforeunload)body.onbeforeunload=StopVLCs; in the init function , it throw an error, i delete it , so like this , it doesn't work.
if(window.attachEvent)window.attachEvent("onbeforeunload", StopVLCs);
if(window.onbeforeunload)window.onbeforeunload=StopVLCs;
if(document.onbeforeunload)document.onbeforeunload=StopVLCs;


function StopVLCs(){
vlc1.playlist.stop();
if(vlc2)vlc2.playlist.stop();
// stupid waiting 0,7s - without exit from .onbeforeunload handler
var tt; var tb=new Date(); var tbt=tb.getTime();
var tbc=tbt; tbt+=700; while(tbt>tbc){tt=new Date(); var tbc=tt.getTime()}
}
can you tell me how to add your code into IE?

eric.gl.CN
Blank Cone
Blank Cone
Posts: 51
Joined: 19 Mar 2009 03:18

Re: IE runtime error

Postby eric.gl.CN » 19 May 2009 07:55

to revolunet
I have try you VLCobject.js and I see your code
if (!revolunet.unloadSet) {
revolunet.VLCObjectUtil.prepUnload = function() {
__vlc_unloadHandler = function(){};
__vlc_savedUnloadHandler = function(){};
window.attachEvent("onunload", revolunet.VLCObjectUtil.cleanupVLCs);
}
window.attachEvent("onbeforeunload", revolunet.VLCObjectUtil.prepUnload);
revolunet.unloadSet = true;
I think this is that you said to stop and unload vlc before exit IE,but when click flip button quickly, it also will produce an runtime error.

could you tell me how to stop and unload VLC before closing browser to prevent IE/FF crashing by using javascript?
thanks a lot!

eric.gl.CN
Blank Cone
Blank Cone
Posts: 51
Joined: 19 Mar 2009 03:18

Re: IE runtime error

Postby eric.gl.CN » 19 May 2009 08:28

to revolunet
also I found that when I click the play button or snapshot button to play music or take a snapshot, then at the same time or after a tiny time , I push the F5 key to fresh the IE. the problem is coming, the IE is dead.
I think when the axvlc.dll to do the play function, it will lock some source, and the fresh will produce a dead lock cause I didn't stop vlc and unload vlc before fresh IE.
you suggestion is right, so how can I stop vlc and unload vlc before fresh IE by javascript. I'm totally new in javascritp, can you give me some deamon. thanks a lot!!

revolunet
Big Cone-huna
Big Cone-huna
Posts: 515
Joined: 17 Oct 2007 13:16
VLC version: 0.9.8
Operating System: Vista
Location: Paris, France
Contact:

Re: IE runtime error

Postby revolunet » 19 May 2009 08:41

try this for IE :

Code: Select all

<body onbeforeunload="unloadstuff()">
VLC & web IT consulting - http://www.revolunet.com
Github : http://github.com/revolunet

eric.gl.CN
Blank Cone
Blank Cone
Posts: 51
Joined: 19 Mar 2009 03:18

Re: IE runtime error

Postby eric.gl.CN » 20 May 2009 03:12

thank you revolunet,
I try what you said, it does't work. I didn't find the definition of unloadstuff in your vlcobject.js and vlccontrol.js, it default use in javascript?

eric.gl.CN
Blank Cone
Blank Cone
Posts: 51
Joined: 19 Mar 2009 03:18

Re: IE runtime error

Postby eric.gl.CN » 20 May 2009 03:23

sorry, I try this code in the example.html. it looks like working. I will test it for some day. thank you very much.
by the way , I see some one want to use the js file to create multi object in one IE web, can your js file support this function now?

eric.gl.CN
Blank Cone
Blank Cone
Posts: 51
Joined: 19 Mar 2009 03:18

Re: IE runtime error

Postby eric.gl.CN » 20 May 2009 03:32

but the other problem it doesn't fix
the problem is : when I click the play button or snapshot button to play music or take a snapshot, then at the same time or after a tiny time , I push the F5 key to fresh the IE. the IE will stop and no response.

I think the reason has some relationship with VLC' lock mechanism in source code or I didn't clean up vlc object before fresh.
can you help me? how to clean vlc object before fresh IE?


Return to “Web and scripting”

Who is online

Users browsing this forum: No registered users and 5 guests