Replies: 2 comments 1 reply
-
I think I can get round it by creating a function that destroys the existing player, creates a new one and at the same time sets up the behaviour I need rather than creating functionality that will apply across a number of existing players. But would still appreciate feedback if there is something I'm missing in relation to custom variables - whether that's functionality within the Vimeo SDK or clever ways that any of you clever people have found to do something similar! :-) |
Beta Was this translation helpful? Give feedback.
-
@trscairns have a look at this issue for preventing forward seek #61 there is no special API for setting data on the iframe or player object. when the Vimeo player iframe is inserted in the DOM the data attributes could be used for storing data or they could even be set on the wrapping div. https://developer.mozilla.org/en-US/docs/Learn/HTML/Howto/Use_data_attributes |
Beta Was this translation helpful? Give feedback.
-
Hiya. I'm trying to roll my own script to deal with training videos where we want to know that people have watched a video from start to finish. I therefore want to log where they have reached in a video and prevent them from skipping ahead of this point, though they should be free to skip forward and backwards through the bits they have previously watched. I'm pretty confident I should be able to use the 'timeupdate' event to log their maximum time reached while in play mode, and then run a check against this when the 'seek' event fires - my challenge is getting and setting data points for a) whether their time should be logged/restricted for a particular video; and b) how far they have reached, given this might have been in an earlier session. I'd naturally keep a browser version of these variables in the data for the iframe (and then log the maxTime back to our server on pause, stop or every 5 seconds during play), but there doesn't seem to be access to this in the SDK. Is there any way within a player.on('timeupdate') function to get/set data that belongs to the parent iframe? Or alternatively a way of getting/setting custom variables in the player object?
Beta Was this translation helpful? Give feedback.
All reactions