video open in javascript

Asked

Viewed 721 times

0

Personal I am layman in this area. I would like to know how I can this playing this url https://ns5001921.ip-192-99-16.net/Uploads/Animes/1/2x2-shinobuden/01.mp4

in this javascript file

// SISTEMA HD
videohd.click(function(){
var videoID = $(this).attr('data-videoID');
var videos = $('<div class="meuVideo"> <video  width="100%" controls="controls" autoplay="true" src="'+ videoID +'" type="video/mp4"></video> </div>');

$('.meuVideo, .nowPlaying').remove();
$(this).parents().eq(2).append(videos);
$('<i class="nowPlaying">? Reproduzindo ...</i>').insertAfter(this);
});

EX BLOGGER

// HTML5 Video
html5bgvideo.click(function(){
 $(this).closest('li').addClass('visitado');
      var videoID = $(this).attr('data-videoID');
      Visitados(videoID);
var videoID = $(this).attr('data-videoID');
var videos = $('<div class="meuVideo" > <video  width="100%" controls="controls" autoplay="true" src="http://www.blogger.com/video-play.mp4?contentId='+ videoID +'" type="video/mp4"></video> </div>');

$('.meuVideo, .nowPlaying').remove();
$(this).parents().eq(2).append(videos);
$('<i class="nowPlaying">Reproduzindo ...</i>').insertAfter(this);
});

I’ve tried several ways and it didn’t work out. if anyone can help I’m grateful.. it will look just like this on my test blog

NOTE: click on the episode to watch the video

http://novoblogprograme.blogspot.com.br/2018/03/blog-post_31.html

can only do with videos from YT, BLOGGER AND UOL. but this not getting someone help me please

1 answer

0


I put in data-videoid the direct url data-videoid="https://www.blogger.com/video-play.mp4?contentId=%20d8530485a7861c37" in the first javascript and it worked

    var videohd=$(".videohtml5");
        
    videohd.click(function(){
    var videoID = $(this).attr('data-videoid');
    var videos = $('<div class="meuVideo"> <video  width="100%" controls="controls" autoplay="true" src="'+ videoID +'" type="video/mp4"></video> </div>');

    $('.meuVideo, .nowPlaying').remove();
    $(this).parents().eq(2).append(videos);
    $('<i class="nowPlaying">? Reproduzindo ...</i>').insertAfter(this);
    });
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>

<div class="videoGallery" style="background-color: #f7f7f7; color: #333333; font-family: &quot;PT Sans Narrow&quot;; font-size: 18px; margin-bottom: 2px;">
   <ul style="background: rgb(210, 52, 61); border-radius: 1px; border: 2px solid rgb(0, 0, 0); color: white; cursor: pointer; font-family: tahoma; font-size: 10px; font-weight: bold; list-style: none; margin: 0px; padding: 2px; width: 782.094px;">
        <li style="background-color: initial; border: 0px solid steelblue; display: inline-block; font-size: 12px; letter-spacing: -1px; padding: 4px 10px;"><span class="videohtml5" data-videoid="https://ns5001921.ip-192-99-16.net/Uploads/Animes/1/2x2-shinobuden/01.mp4" style="cursor: pointer;">('-' ) -2x2-shinobuden-\\- 01.mp4</span></li>
        &nbsp;
        <li style="background-color: initial; border: 0px solid steelblue; display: inline-block; font-size: 12px; letter-spacing: -1px; padding: 4px 10px;"><span class="close" style="background: rgb(0, 0, 0); border-radius: 1px; border: 1px solid rgb(255, 255, 255); cursor: pointer; padding-bottom: 1px; padding-left: 3px; padding-right: 4px;">X</span>&nbsp;&#9996;</li>
     </ul>
 </div>
        
 <div class="videoGallery" style="background-color: #f7f7f7; color: #333333; font-family: &quot;PT Sans Narrow&quot;; font-size: 18px; margin-bottom: 2px;">
    <ul style="background: rgb(210, 52, 61); border-radius: 1px; border: 2px solid rgb(0, 0, 0); color: white; cursor: pointer; font-family: tahoma; font-size: 10px; font-weight: bold; list-style: none; margin: 0px; padding: 2px; width: 782.094px;">
        <li style="background-color: initial; border: 0px solid steelblue; display: inline-block; font-size: 12px; letter-spacing: -1px; padding: 4px 10px;"><span class="videohtml5" data-videoid="https://www.blogger.com/video-play.mp4?contentId=%20d8530485a7861c37" style="cursor: pointer;">('-' ) -Naruto_Imagem-\\- Episódio 01</span></li>
        &nbsp;
        <li style="background-color: initial; border: 0px solid steelblue; display: inline-block; font-size: 12px; letter-spacing: -1px; padding: 4px 10px;"><span class="close" style="background: rgb(0, 0, 0); border-radius: 1px; border: 1px solid rgb(255, 255, 255); cursor: pointer; padding-bottom: 1px; padding-left: 3px; padding-right: 4px;">X</span>&nbsp;&#9996;</li>
     </ul>
  </div>

  • BRO..,,,,

  • @Andrielson marks the answer as a solution, to close the question

Browser other questions tagged

You are not signed in. Login or sign up in order to post.