Files
xrpl-dev-portal/content/static/js/video.js
mDuo13 e4ceb8b37b Temporary: move static files into content
During migration, while we launch Redocly with -d content, the static
files need to be in content. Eventually, when we stop using -d, we need
to move the files again.

Previously:
/assets : static assets used by templates
/img : images used in documentation (mostly)

Now:
/content/static : static assets used by templates
/img : images used in documentation (mostly)

Eventually:
/static : static assets used by templates
/docs/img : images used in documentation
2024-01-31 16:04:58 -08:00

28 lines
645 B
JavaScript

$(document).ready(()=> {
//top video. Show inline replacing image
$("#playvideo").click(function(event){
$("#playvideo").hide();
$("#video1").show();
$("#video1")[0].src += "?autoplay=1";
event.preventDefault()
});
//bottom 3. Show in overlay
$('.btn1').click(function(event) {
var src = $(this).attr("data-url");
$("#player").attr("src", src);
$('#video, #video-overlay').fadeIn('slow');
event.preventDefault()
});
});
$(document).on('touchend, mouseup', function(e) {
if (!$('#video').is(e.target)) {
$('#video, #video-overlay').fadeOut('slow');
$("#player").attr("src", '');
}
});