Jump to content

htmlframe icindeki video nesnesinden bilgi okumak


stgzkr

Recommended Posts

merhabalar htmlframe ile video gösterimini html video ile yapabiliyoruz. şunu yapabilirmiyiz. bu videonun iceriği toplam kaç saniye ve kullanıcı bunun ne kadarını izlemiş. bu verileri alıp label nesnesinde gösterebilirmiyiz.

aşağıdaki gibi bir kod buldum ama bunu uyarlayamadım. yardımlarınız icin simdiden tesekkürler.

<!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>

Link to comment
Share on other sites

On 12/30/2019 at 10:29 AM, stgzkr said:

merhabalar htmlframe ile video gösterimini html video ile yapabiliyoruz. şunu yapabilirmiyiz. bu videonun iceriği toplam kaç saniye ve kullanıcı bunun ne kadarını izlemiş. bu verileri alıp label nesnesinde gösterebilirmiyiz.

aşağıdaki gibi bir kod buldum ama bunu uyarlayamadım. yardımlarınız icin simdiden tesekkürler.

<!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>

merhaba yapmak istediğimi aşağıdaki kod blogu ile yapabildim. ilgilenen başka arkadaş olursa diye kodları paylaşıyorum.

<html>
  <head>
      
    <style type="text/css">
      #kutu
      {
        background:white;
        width :100%;
        height:100%;
        padding: 10px;
      }
      #myvideo
      {
        position: absolute; 
        display: block;
        margin-left: auto;
        margin-right: auto;
        border: 2px solid white; 

        margin-bottom: 5%;
       
        top: 1px;
        background:white;
        width :100%;
        height:100%;
       
      }
      
    </style>
 
    
  </head>
  <body>
    <div id="kutu">      
      <video id="myvideo"  controls=false oncontextmenu="return false" >
       
       
        <source src="files/hastamemnun.mp4" type="video/ogg">
      </video >  
    </div>
  </body>
     <script>
      var vid = document.getElementById("myvideo");
      vid.controls = false;

      setInterval(zamanGoster, 100);
      function zamanGoster () 
      {
       UniForm1.UniEdit2.setValue(vid.duration);
        UniForm1.UniEdit1.setValue(vid.currentTime);
      }
</script>     
</html>

  • Like 1
Link to comment
Share on other sites

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...