开发者

Dynamically added video object to page, how to get plugin player to recognize it?

I've used javascript to dynamically add an object element of type video/mpeg to a web page, but the plugin that is to play the video doesn't handle the new object.

Other possibly relevant details: The web browser in use is Opera for Linux Devices, I can connect to Opera Dragonfly and see the new object being added to the DOM as a new child of the <body> tag. If I create a web page that contains the object and load that page, it plays properly, it's only when I add it to the DOM after loading that it's not playing.

Any ideas what I can do to make the handler plugin see the object?

function pickContentResults() {
    if (request.readyState == 4) {
        if (request.status == 200) {
            /* Get the response from the server */
            var results = request.responseXML;
            if(results != "") {
                //alert(resul开发者_运维问答ts);                 
                document.body.appendChild(results);
            } else {
                /* you might want to redirect to the guide again if it failed... */
            }
        } else {
            alert("Error! Request status is " + request.status);
        }
    }
}
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜