문제

My question is simple. Can you change the embed options (e.g., hide the title, your avatar, etc) on a vimeo video that is being played via Popcorn.js?

도움이 되었습니까?

해결책

Yes, as long as you use the new Vimeo "wrapper." (The original player modules are being deprecated as of Popcorn 1.4.)

The wrapper is here:

https://github.com/mozilla/popcorn-js/blob/master/wrappers/vimeo/popcorn.HTMLVimeoVideoElement.js

You also need to include this file first.

By default, the Vimeo wrapper disables the title, byline and portrait.

Edit: You just need three scripts from the popcorn-js repo, and include them in script tags in this order:

  1. popcorn.js
  2. popcorn._MediaElementProto.js
  3. HTMLVimeoVideoElement.js

Create a container element in which to put the video:

<div id="video"></div>

Instantiate the video wrapper and popcorn:

var video = Popcorn.HTMLVimeoVideoElement('#video');
video.src = 'vimeo url goes here';
var popcorn = Popcorn(video);
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top