我有一个Vimeo播放器API的示例。我已经通过npm安装了视频播放器api。当我调用它并使用一些JavaScript与API通讯时,出现以下错误:Line 15: 'Vimeo' is not defined
我正在从节点模块中导入vimeo文件夹。这是我所拥有的:
import React, { Component } from 'react';
import axios from 'axios';
import player from '@vimeo/player';
var options = {
id: 28028960,
width: 640,
loop: false
};
var player = new Vimeo.Player('mainPlayer', options);
player.setVolume(0);
player.on('play', function() {
console.log('played the video!');
});
我在这里想念东西吗?