27 lines
829 B
JavaScript
27 lines
829 B
JavaScript
$(document).ready(function () {
|
|
if (window.location.pathname == "/") {
|
|
$.ajax({
|
|
type: "GET",
|
|
url: '//player.vimeo.com',
|
|
error: function(e) {
|
|
$('.homeVideo').hide();
|
|
$('.homeVideo').replaceWith($('<video/>', {
|
|
poster: '/assets/metamaps-intro-poster.webp',
|
|
width: '560',
|
|
height: '315',
|
|
class: 'homeVideo',
|
|
controls: ''
|
|
}));
|
|
$('.homeVideo').append($('<source/>', {
|
|
src: '//metamaps.cc/videos/metamaps-intro.mp4',
|
|
type: 'video/mp4'
|
|
}));
|
|
$('.homeVideo').append(
|
|
'<p>You can watch our instruction video at ' +
|
|
'<a href="https://metamaps.cc/videos/metamaps-intro.mp4">' +
|
|
'https://metamaps.cc/videos/metamaps-intro.mp4</a>.'
|
|
);
|
|
}
|
|
});
|
|
}//if
|
|
});
|