oTree Forum >

Event listener on YT iframe player doesn't change button visibility

#1 by AndyFM


I'm using a code I adapted from here (https://developers.google.com/youtube/iframe_api_reference) to write an event listener to display the oTree 'next' button after the embedded video ended.

However, the visibility of the button does not change in response to the event, and I can't figure out why.
The original code from the link above, however, works, so I am more than baffled.
My code is in attachment.

Any tips or pointers, anyone?


#2 by AndyFM

Figured it out: those <body>..</body> leftover bits of code were causing the problem.

Write a reply

Set forum username