I have a popup which will gets called when a button clicked and it contains the video from external link.
<object style="width: 696px; height: 360px;;display:block;"
id="educational-info-video-widget"
name="educational-info-video-widget" data="https_URL" type="application/x-shockwave-flash">
<param name="movie" value="https_URL">
<param name="flashvars" value="&autoPlay=false">
<param name="wmode" value="transparent">
<param name="allowFullScreen" value="true">
<param name="allowNetworking" value="all">
<param name="allowScriptAccess" value="always">
<param name="bgcolor" value="#000000">
</object>
what i am trying to do is attaching play and pause events to it, to do so i saw that it needs to implemented in load event from this link.
How to add event listeners to objects in a svg?
I wrote this in my .js file
constructor() {
this.handleBodyClick = function() {
alert()
};
}
attached() {
document.getElementById("educational-info-video-widget").addEventListener("load", this.handleBodyClick);
}
but load event is not being fired. i don't know what i am doing wrong.
Any help is greatly appreciated.