Pen Settings

HTML

CSS

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URL's added here will be added as <link>s in order, and before the CSS in the editor. You can use the CSS from another Pen by using it's URL and the proper URL extention.

+ add another resource

JavaScript

Babel includes JSX processing.

Add External Scripts/Pens

Any URL's added here will be added as <script>s in order, and run before the JavaScript in the editor. You can use the URL of any other Pen and it will include the JavaScript from that Pen.

+ add another resource

Packages

Add Packages

Search for and use JavaScript packages from npm here. By selecting a package, an import statement will be added to the top of the JavaScript editor for this package.

Behavior

Save Automatically?

If active, Pens will autosave every 30 seconds after being saved once.

Auto-Updating Preview

If enabled, the preview panel updates automatically as you code. If disabled, use the "Run" button to update.

Format on Save

If enabled, your code will be formatted when you actively save your Pen. Note: your code becomes un-folded during formatting.

Editor Settings

Code Indentation

Want to change your Syntax Highlighting theme, Fonts and more?

Visit your global Editor Settings.

HTML

              
                
<!--

https://drive.google.com/file/d/14EBZi8Y1IvvuqBbxNBueMZ_NazhTZD6R/view?usp=sharing

14EBZi8Y1IvvuqBbxNBueMZ_NazhTZD6R

https://drive.google.com/uc?export=view&id=14EBZi8Y1IvvuqBbxNBueMZ_NazhTZD6R

現在、このファイルを閲覧、ダウンロードできません。

最近このファイルを閲覧、ダウンロードしたユーザーの数が多すぎます。しばらくしてからファイルにアクセスしてください。アクセスしようとしているファイルのサイズが非常に大きい場合や、ファイルが多くのユーザーと共有されている場合は、ファイルを閲覧、ダウンロードできるようになるまで最大 24 時間かかることがあります。

-->


<div class="video-wrap">
<video controls playsinline muted autoplay preload="auto" width="100%" height="auto" poster=".jpg" onclick="this.play();return false;" class="video-main" data-video-id="video01">
<source src="https://drive.google.com/uc?export=view&id=14EBZi8Y1IvvuqBbxNBueMZ_NazhTZD6R"></p>
</video>
<div class="video-btn"></div>
</div>


<div class="video-wrap">
<video controls playsinline muted autoplay preload="auto" width="100%" height="auto" poster=".jpg" onclick="this.play();return false;" class="video-main" data-video-id="video02">
<source src="https://drive.google.com/uc?export=view&id=14EBZi8Y1IvvuqBbxNBueMZ_NazhTZD6R"></p>
</video>
<div class="video-btn"></div>
</div>
              
            
!

CSS

              
                .video-wrap {
  margin-bottom:1000px;
  width:200px;
  position: relative;
}
.video-btn {
  content: "";
  position: absolute;
  top:20%;
  left:0;
  right:0;
  bottom:30%;
  cursor: pointer;
  -webkit-tap-highlight-color:rgba(0,0,0,0);
}
              
            
!

JS

              
                $(function(){

  var videoWrap = $('.video-wrap');
  var videoMain = $('.video-main');
  var video_btn = $('.video-btn');

  videoMain.on('play',function(){
    var videoId = $(this).data('video-id');
    console.log(videoId + ',' + 'play');
  });

  videoMain.on('pause',function(){
    var videoId = $(this).data('video-id');
    var videoPauseNow = Math.round($(this).get(0).currentTime);
    var videoPauseAll = Math.round($(this).get(0).duration);
    if (videoPauseNow != videoPauseAll) {
      console.log(videoId + ',' + 'pause' + ',' + videoPauseNow + ' seconds passed');
    }
  });

  videoMain.on('ended',function(){
    var videoId = $(this).data('video-id');
    console.log(videoId + ',' + 'end');
    $(this).next(video_btn).removeClass('_playDone');
  });

  video_btn.on('click', function () {
    if ( !$(this).hasClass("_playDone") ){
      $(this).prev(video).get(0).pause();
      $(this).addClass('_playDone');
    } else {
      $(this).prev(video).get(0).play();
      $(this).removeClass('_playDone');
    }
  });

});
              
            
!
999px

Console