tcoates Posted October 31, 2016 Posted October 31, 2016 I'm trying to play a video when a form opens. The issue I'm having is that, although the audio plays successfully, you cannot see the video component (you just get a black screen), until you click on the video itself. I found this link... https://www.sencha.com/forum/showthread.php?262705-Ext-Video-Plays-audio-but-no-video-until-the-video-is-clicked which includes... Ext.define('MyVideo', { extend : 'Ext.Video', xtype : 'myvideo', //hides poster, shows media onPlay : function() { this.callParent(arguments); if (!this.isInlineVideo) { this.ghost.hide(); this.media.show(); } }, //hides media, shows poster onEnd : function() { this.callParent(arguments); if (!this.isInlineVideo) { this.media.hide(); this.ghost.show(); } }}); How can I incorporate the above code into UnimVideo1 component? Thanks, Tim Quote
Sherzod Posted October 31, 2016 Posted October 31, 2016 Hi, For now you can use this, try: procedure TMainmForm.UnimVideo1Ended(Sender: TObject); begin UniSession.AddJS('var me=' + TUnimVideo(Sender).JSName + '; if (!me.isInlineVideo){me.media.hide();me.ghost.show()}'); end; procedure TMainmForm.UnimVideo1Play(Sender: TObject); begin UniSession.AddJS('var me=' + TUnimVideo(Sender).JSName + '; if (!me.isInlineVideo){me.ghost.hide();me.media.show()}'); end; Best regards. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.