Page 1 of 1

IE always hang ??? [fixed]

Posted: 07 Jan 2009 10:49
by 5kinman
I am using the IE 7.0, and VLC 0.9.8a

I don't know why the html page will crash the IE ...

(the JS file VLCobject is downloaded from revolunet )

Code: Select all

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML> <HEAD> <TITLE> Streaming Client </TITLE> </HEAD> <BODY> <center> <div id="vlccontents"> Player loading... </div> <script type="text/javascript" src="VLCobject.js"></script> <script type="text/javascript"> var so = new VLCObject("clientOutput", "600", "350"); so.write("vlccontents"); </script> <br><br> <script type="text/javascript"> var vout_state = false; var subtitle_index = 0; var audio_track_index = 1; var vlc_state = 0; function vlcOperation(opCode) { var vlc = document.getElementById("clientOutput"); if (opCode == 0) { vlc.playlist.items.clear(); while (vlc.playlist.items.count != 0) { } vlc.playlist.add("udp://@224.0.0.40:1234", "", " :vout-filter=deinterlace :deinterlace-mode=linear"); vlc.playlist.play(); vlc.video.subtitle = subtitle_index; vlc.audio.track = audio_track_index; vlc.audio.volume = 200; } else if (opCode == 1) { vout_state = vlc.input.hasVout; } }; function handleVLC() { if (vlc_state == 0) { vlcOperation(0); vlc_state = 1; } else if (vlc_state == 1) { vlcOperation(1); if (vout_state == true) { vlc_state = 2; } else { vlc_state = 0; } } else if (vlc_state == 2) { clearInterval(handleVLCIntervalId); } else { vlc_state = 0; } }; </script> <script type="text/javascript"> handleVLCIntervalId = setInterval('handleVLC()', 500); </script> </center> </BODY> </HTML>
Does VLC support IE 7.0?

Re: IE always hang ???

Posted: 07 Jan 2009 21:09
by Anatoly_B
while (vlc.playlist.items.count != 0) {}
- :(
The delay 250ms minimum after vlc.playlist.items.clear() is required before any next operation with VLC Plugin (including check vlc.playlist.items.count)

Re: IE always hang ???

Posted: 08 Jan 2009 03:41
by 5kinman
Thx for the reply.

I've try to do other vlc operation after 500ms. But the IE hang up and require to close with the following:

Code: Select all

AppName: iexplore.exe AppVer: 7.0.6000.16762 ModName: libvlc.dll ModVer: 0.0.0.0 Offset: 00004d00

Re: IE always hang ???

Posted: 08 Jan 2009 20:27
by Anatoly_B
vlc.playlist.items.clear(); while (vlc.playlist.items.count != 0) { };
- This causes crash...
vlc.playlist.items.clear() ---> 250ms ---> anyVar=vlc.playlist.items.count
- Waiting in an empty cycle is undesirable (it causes heavy CPU loading and will increase necessary delays), preferably periodic inquiry:
functon TestPlayListState(){ if(vlc.playlist.items.count!=0){setTimeout("TestPlayListState()",250)}else{PlayStart()} }
vlc.playlist.items.clear(); setTimeout("TestPlayListState()",250);

Re: IE always hang ???

Posted: 12 Jan 2009 10:43
by revolunet
yes it can work with IE7

But... theres a bug in 0.9.8 plugin playlist management

the clear() function doesnt seem to work anymore, so heres a workaround :

Code: Select all

var itemid = vlc.playlist.add(myitemuri); vlc.playlist.playItem(itemid)
the playlist will never be cleared but you can play the last item...

hope this helps :)

Re: IE always hang ???

Posted: 12 Jan 2009 11:28
by 5kinman
Thanks for the reply.

I'll try to run VLC on the IE with other html codings to solve the problem.