2016-10-15 1 views
0

Video.jsプレーヤーの上にModalDialogコンポーネントを追加し、DOMノードなどからカスタムHTMLを入力したいとします。私はその内容を生のテキストにしか設定できません。Video.jsのコンポーネント

let modal = player.addChild('ModalDialog')

modal.content('hello')

modal.fill()

modal.open()

私は公式videojsドキュメント上でこれをやって上の任意のintructionsを見つけることができませんでした。

答えて

0

後でそれを取得するために別々のダイアログHTMLを追加します。

<div id="feedback-dialog"> 
</div> 

その後

let el = videojs.createEl('ModalDialog', { 
    innerHTML: $('#feedback-dialog').html() 
}) 

let modal = player.addChild('ModalDialog', { 
    'el': el 
}) 
との対話を構築
関連する問題