且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

静音***的声音在德尔福TWebBrowser

更新时间:2022-06-27 00:41:12

试着拨打TWebBrowser的的 OnDocumentComplete 事件。当文件里面满载此事件被激发,所以对象,如果它希望在那里,是已经下载并为present。如果没有你的JavaScript code的展示,我不能告诉你更多。

Try to call your code in TWebBrowser's OnDocumentComplete event. This event is fired when the document inside is fully loaded, so the object, if it's expected to be there, is already downloaded and is present. Without showing of your JavaScript code I can't tell you more.

不过,我会做不同的看法。我将执行code一样的这个直接进入您的导航网页。它可以立即关闭声音在 on***PlayerReady 的事件处理程序是什么指时立即***播放器满载。它比调用函数以后,因为它可能会产生由于TWebBrowser的导航完成和您的code的执行之间有一些延迟一短声一阵更好。

But I would do it differently. I would implement code like this one directly into your navigated web page. It can mute the sound immediately in the on***PlayerReady event handler what means immediately when the *** player is fully loaded. It's better than call the function later on because it may produce a short sound burst because of some delay between the TWebBrowser's navigation completion and execution of your code.