Jump to content

Recommended Posts

Posted

Add UniHtmlFrame to form.

 

Put this  to Unihtmlframe.html.text

<!DOCTYPE html>
<html>
<body>

<video width="400" controls>
  <source src="files/mov_bbb.mp4" type="video/mp4">
</video>

</body>
</html>
Posted

Ok. Thanks to  Hayri Aslan and Delphi Developer.

 

And how to control the end of the video.

 

I'm trying to show a video in my app, with the typical button "skip video", and starts auto.

 

This is ok.

 

But I don't know how to control the end of the video to show the mainform when the video is finished.

 

Thanks.

Posted

But I don't know how to control the end of the video to show the mainform when the video is finished.

 

Hi,

 

Can you try this?!

For example:

<video src="video.ogv" id="myVideo">
    video not supported
</video>

<script type='text/javascript'>
    document.getElementById('myVideo').addEventListener('ended',myHandler,false);
    function myHandler(e) {
         // What you want to do after the event
         // ajaxRequest(...);
    }
</script>

http://stackoverflow.com/questions/2741493/detect-when-an-html5-video-finishes

 

Best regards.

Posted

I want to set a panel visible to false, but I don't know how to put the code inside the script.

function myHandler(e) {
    MainForm.UniPanel1.setVisible(false);
    // or MainForm.UniPanel1.hide();
    // or use ajaxRequest
}
Posted

Sorry, dont' works.

 

This is my html sting of the htmlframe for the video:

 

<!DOCTYPE html>
<html>
<body>

<video controls autoplay>
  <source src="files/traza.mp4" type="video/mp4" id="myVideo">
</video>

<script type='text/javascript'>
    document.getElementById('myVideo').addEventListener('ended',myHandler,false);
    function myHandler(e) {
         MainForm.panelvideo.setVisible(false);
         
         // What you want to do after the event
         // ajaxRequest(...);
    }
</script>

</body>
</html>
 

Posted

<video controls autoplay>
  <source src="files/traza.mp4" type="video/mp4" id="myVideo">
</video>

 

Correct:

<video id="myVideo" controls autoplay>
  <source src="files/traza.mp4" type="video/mp4">
</video
Posted

Some help  with differents video formats?

 

In mp4 format I can't see it in an android device or iexplorer.

 

I'll need to have the same video in differents formats, but I don't know witch formats I need.

 

Some experience with this?

 

One solution could be to have a video in youtube? If yes, I don't know how to show a youtube video inside a unigui app, and control the starts and the end of the video.

 

Some help will be wellcome.

 

Thanks.

Posted

with this in the html string of the unihtmlpanel, works, but don't detect the end of the video.

 

<!DOCTYPE html>
<html>
<body>

<iframe id="myVideo"  width="100%" height="100%"
  src="https://www.youtube.com/embed/XXXXXXXXXXXXXXX?autoplay=1&rel=0"allowfullscreen
</iframe>

<script type='text/javascript'>
    document.getElementById('myVideo').addEventListener('ended',myHandler,false);
    function myHandler(e) {
         MainForm.panelvideo.setVisible(false);
         MainForm.panelchart.setVisible(true);
         MainForm.panelchart.collapse();
    }
</script>

</body>
</html>
 

  • 1 month later...
Posted

Hello

 

I try with

<video id="myVideo" controls autoplay>
  <source src="files/traza.mp4" type="video/mp4">
</video

and show video ok.

 

But, if try with position time trackbar, don't advance or rewind.

 

How do i change video time position?

 

Thank's in advance

  • 2 weeks later...
Posted

Hello:

 

I try to play  wmv video with this code, but not show in Chrome or Firefox:

 

<!DOCTYPE html>
<html>
<body>

<video width="400" controls autoplay>
  <source src="media/2.wmv" type="video/x-ms-wmv">
  
</video>

</body>
</html>

Thank's

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...