A K*_*Kel 0 javascript html5 instagram
我创建了一个Instagram提要,该提要使用#标签提取图像和视频。我知道在手机上查看Instagram的形式是视频已被拉入我使用JavaScript做到了这一点,因此有可能在不打开另一个窗口的情况下播放我网站上的视频,谢谢
更新资料
到目前为止我的JavaScript
var feed = new Instafeed({
clientId: '467ede5a6b9b48ae8e03f4e2582aeeb3',
limit: 16,
get: 'tagged',
tagName: 'teamRousey',
sortBy: 'most-recent',
after: function () {
var images = $("#instafeed").find('a');
$.each(images, function(index, image) {
var delay = (index * 75) + 'ms';
$(image).css('-webkit-animation-delay', delay);
$(image).css('-moz-animation-delay', delay);
$(image).css('-ms-animation-delay', delay);
$(image).css('-o-animation-delay', delay);
$(image).css('animation-delay', delay);
$(image).addClass('animated flipInX');
});
},
template: '<video controls ><source src="{{video}}embed/" type="video/mp4"></video>"<div class="likes">♥ {{likes}}</div>'
});
feed.run();
Run Code Online (Sandbox Code Playgroud)
开始了。
jQuery(function($){
var feed = new Instafeed({
clientId: '467ede5a6b9b48ae8e03f4e2582aeeb3',
limit: 16,
get: 'tagged',
tagName: 'teamRousey',
sortBy: 'most-recent',
after: function () {
},
resolution: 'standard_resolution',
filter: function(image) {
if (image.type == 'image') {
image.template = '<img src="' + image.images.standard_resolution.url + '" />';
} else {
image.template = '<video width="100%" controls loop><source src="' + image.videos.standard_resolution.url + '" type="video/mp4"/></video>';
}
return true;
},
template: '<header>{{model.template}}</header><footer><a href="http://instagram.com/{{model.user.username}}">@{{model.user.username}}</a><br>{{caption}}</footer>',
});
feed.run();
});Run Code Online (Sandbox Code Playgroud)
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<script src="https://jsonp.afeld.me/?url=http%3A%2F%2Finstafeedjs.com%2Fjs%2Finstafeed.min.js"></script>
<div id="instafeed"></div>Run Code Online (Sandbox Code Playgroud)