0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

Vimeoでオートプレイのローディング中にunloadを使用する

Posted at

現象

vimeoのAPIには、再生中のプレイヤーを初期化させるunloadというメソッドがある。
しかし、これは、オートプレイなどでプレイヤーがローディングしている間には呼び出すことができない。(再生されている状態では可能)

解決策

onイベント内にコールバックとして記述することで、ローディング後に再生が始まった瞬間に初期化することができる。

.php
player.on('play', function() {
  if (条件式)
      player.unload();
}

引用

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?