【发布时间】:2016-12-07 15:22:05
【问题描述】:
我正在播放器中加载一个新的 vimeo id 选项。 视频已加载并可在播放器内播放,但未使用选项(肖像、标题、..)。
这是用于创建播放器的代码(准备就绪)
var iframe = $('#vimeoContainer');
var options = {
id : 191611447,
portrait: 0,
title : 0,
byline: 0,
};
var player = new Vimeo.Player(iframe, options);
这是在此播放器中加载视频的代码
player.loadVideo(sl).then(function(id) {
// the video successfully loaded
}).catch(function(error) {
switch (error.name) {
case 'TypeError':
// the id was not a number
break;
case 'PasswordError':
// the video is password-protected and the viewer needs to enter the
// password first
break;
case 'PrivacyError':
// the video is password-protected or private
break;
default:
// some other error occurred
break;
}
});
感谢您的帮助和时间
【问题讨论】:
-
您将标题和署名设置为 0 (false),因此标题和署名不会显示,您会得到您所要求的形式。要解决此问题,请不要设置选项(删除它)或将其设置为 1。更多信息:developer.vimeo.com/player/sdk/embed
标签: javascript jquery vimeo-api vimeo-player