0
我已經提到這個鏈接的視頻上傳和節點模塊https://github.com/vimeo/vimeo.js使用節點js中的vimeo api進行視頻上傳不起作用?
這是我的代碼片段上傳視頻
var Vimeo = require('vimeo-api').Vimeo;
CLIENT_ID = CLIENT_ID;
CLIENT_SECRET = CLIENT_SECRET;
console.log('1');
var lib = new Vimeo(CLIENT_ID, CLIENT_SECRET);
console.log('2');
lib.generateClientCredentials(scope, function (err, access_token) {
if (err) {
throw err;
}
console.log('3');
var token = access_token.access_token;
var scopes = access_token.scope;
});
lib.upload('youtube/test4.mp4', function (error, body, status_code, headers) {
if (err) {
throw err;
}
console.log('4');
lib.request(headers.location, function (error, body, status_code, headers) {
console.log(body);
});
});
}
它顯示一個錯誤,如對象不是一個函數。我已經使用的console.log
var lib = new Vimeo(CLIENT_ID, CLIENT_SECRET);
發現是一直在這一行此錯誤