Question

I have extension for Chrome for seek a request and response headers. I am using webRequest.onSendHeaders, webRequest.onHeadersReceived and webRequest.onCompleted events for this. But i not see headers for load Flash. How i can do it?

Was it helpful?

Solution

Flash objects have PercentLoaded() method. Use it like this:

var testMovie = document.testMovie;

function waitUntilLoaded() 
{
    if(testMovie.PercentLoaded() == 100) {
        doSomething();//flash is loaded
    } else {
        setTimeout('waitUntilLoaded()',10);  
    }
}
waitUntilLoaded();

You will probably need a content script for this.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top