2017-07-27 26 views
0

我使用的Video.js播放視頻,我想,當視頻在角4如何當視頻在角4

+0

使用上端事​​件,示例代碼可以發現https://stackoverflow.com/questions/39229933/angular2 -with視頻-JS-錯誤不兼容-S wece/40391350#40391350 –

回答

0

完成打開模型完成整合的Video.js和開放的模式,您可以聽上下面端事件見例如:

videojs(el, {}, function() { 
    this.on('ended', function() { 
     // Call to open model here 
    }); 
}); 
+0

任何方式將HTML設置爲內容模型? –

+0

您可以向您的問題添加代碼示例,然後我可以提供幫助。 –

+0

我必須在模型中顯示html ....如果我使用this.createModel(

你好

).....它顯示爲

你好

...我想只顯示你好 –

0
this.player.on('ended', function() { 
    const options = { 
    content:'<button>Hello World</button>', 
    label:'the label', 
    uncloseable:true 
    }; 
    const ModalDialog = videojs.getComponent('ModalDialog'); 
    const modal = new ModalDialog(this, options); 
    this.addChild(modal); 
    modal.open(); 
    modal.on('modalclose', function() { 
    console.log('model closed'); 
    }); 
}); 

我想在模型disaplay按鈕