mediaelement / mediaelement-plugins

Plugins for the main mediaelement project
405 stars 137 forks source link

Help in Ads plugin to run on specific event #214

Closed Ahmed-Elrayes closed 2 years ago

Ahmed-Elrayes commented 2 years ago

Hello, at first i wanna say that i'm not so good in javascript. the thing i'm asking for is, i wanna run a specific function on event such as run function when the ad started playing and run a function when the ad is being clicked on. Hope someone can show me an example of it. Thanks in advance

jaapmarcus commented 2 years ago

You can use the mejsprerollstarted and mejsprerolladsclicked to see when a ad has been played or been clicked

And then execute the function you want

Ahmed-Elrayes commented 2 years ago

so i would use them the same way we use success function, right?

jaapmarcus commented 2 years ago

Yes

Ahmed-Elrayes commented 2 years ago

i see, thanks a lot, i will try it later and give you my feedback

Ahmed-Elrayes commented 2 years ago

seems like it's not working, i tried to run the function and make a console.log to check it, but nothing appears.. check the image below Image 1

Ahmed-Elrayes commented 2 years ago

Is there anything you can help me with?

Ahmed-Elrayes commented 2 years ago

hey again, hope you can help me when you're here

Ahmed-Elrayes commented 2 years ago

@jaapmarcus hey, can you help me in this? :)

Ahmed-Elrayes commented 2 years ago

any body here can help?

Ahmed-Elrayes commented 2 years ago

since the support in here is kinda bad unfortunately i had to buy ultimate video player on code canyon, Thanks i will close this issue now.