1

iframe を使用して JavaScript で作成されたポップアップ内に yahoo ビデオを表示しようとしています。ポップアップは完全に表示され、ビデオは iframe で再生できますが、ポップアップを閉じるとポップアップは閉じますが、ページを更新するまでビデオ画像は画面に残ります。次のコードを使用しています

<iframe width="280" height="190" frameborder="0" src="https://docs.google.com/file/d/filename/preview"></iframe>

私も試してみました

sandbox="allow-same-origin allow-scripts allow-popups allow-forms"

ただし、この画面の混乱の問題を使用すると解決されますが、ポップアップにビデオが表示されません。

ポップアップを作成する関数全体を以下に示します

function helpPopup(el) {
var height = (window.innerHeight ? (window.innerHeight) * 3 / 4 : 640);
var helpDialog = new YAHOO.widget.Dialog('help', {
        width: (window.innerWidth ? (window.innerWidth) / 2 : '480')+'px',
        height: height+'px',
        fixedcenter: true,
        effect: {
                effect: YAHOO.widget.ContainerEffect.FADE,
                duration: 0.25
        },
        modal: true,
        visible: false,
        draggable: true
});

helpDialog.setHeader("Help");
var content="";
content = '<div style="overflow: auto; height: '+(height-50)+'px">'+
'<table><tr><td>This is a help popup you can see the video below for demonstation purposes</td></tr></table>'+
'<br><br><br><p><iframe width="280" height="190" frameborder="0" src="https://docs.google.com/file/d/xxxxxxxxx/preview"></iframe></p>'+        
'</div>';
helpDialog.setBody(content);
helpDialog.cfg.queueProperty('keylisteners', new YAHOO.util.KeyListener(
        document,
        { keys : 27 },
        {
                fn: function() { this.hide(); },
                scope: helpDialog,
                correctScope:true
        }
));

helpDialog.render(document.body);
helpDialog.show();

}

ビデオの表示の問題を解決し、画面を台無しにすることなく終了するための助けをいただければ幸いです。

4

0 に答える 0