Player.js: programmatically changing iframe source

Created on 25 Apr 2017  路  2Comments  路  Source: vimeo/player.js

In order to load a new video, I am programmatically changing the src of the iframe. This successfully loads the appropriate video, but event emitters cease to fire (I'm listening specifically for timeupdate). This happens whether or not I create a new instance of Vimeo.Player wrapping the iframe (and even happens if I don't change the src programmatically, but rather set that attribute of the iframe via JavaScript from the beginning). Not sure how to avoid this so that events will continue to emit properly?

Most helpful comment

Don't change src of the iframe, use player.loadVideo(videoId)

All 2 comments

Don't change src of the iframe, use player.loadVideo(videoId)

This is somewhat related to #126, but yes, the proper solution here is to use loadVideo().

Was this page helpful?
0 / 5 - 0 ratings

Related issues

simpson77 picture simpson77  路  6Comments

mitchtabian picture mitchtabian  路  3Comments

macliems picture macliems  路  7Comments

jswebrjl picture jswebrjl  路  5Comments

tmaximini picture tmaximini  路  4Comments