Answer the question
In order to leave comments, you need to log in
How to get a list of all downloaded VIMEO videos?
JSON returns only the 20 most recently uploaded video files.
https://vimeo.com/api/v2/user1666688/all_videos.json
Answer the question
In order to leave comments, you need to log in
Collect by page
page int No The page number to show.
per_page int No Number of items to show on each page. Max 50.
function getRandom(num){
var my_num = Math.floor(Math.random()*num);
return my_num;
}
var ids =[];
function randomVideo(){
var randomID = getRandom(ids.length);
var src = 'https://player.vimeo.com/video/'+ ids[randomID] +'?api=1&player_id=player1';
$('#player1').attr('src', src);
}
$(function() {
var iframe = $('#player1')[0];
var player = $f(iframe);
// When the player is ready, add listeners for pause, finish, and playProgress
player.addEvent('ready', function() {
player.addEvent('finish', onFinish);
player.api("play");
});
function onFinish(id) {
randomVideo();
}
});
$.getJSON('https://vimeo.com/api/v2/user1666688/all_videos.json', function(data) {
$.each(data, function(index, el) {
id = el.id;
ids.push(id)
});
randomVideo();
});
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question