mediaelement / mediaelement-plugins

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

Help needed: Using markers with ads plugin #145

Open gorankrgovic opened 5 years ago

gorankrgovic commented 5 years ago

Hi all, Since I can't find it anywhere, can somebody help me out to set up ads plugin to work with markers plugin if it's possible? Since I want to have pre-roll, mid-roll and post-roll ads implemented at a certain time, the only way I can think of achieving this is with using markers.

I'm trying to do something like...

 markerCallback: function (media, time) {
                    media.options.adsPrerollMediaUrl = ['https://path.to/add.mp4'];
                    media.options.adsPrerollAdUrl = ['https://clicktrack.example'];
                    media.options.adsPrerollAdEnableSkip = true;
                    media.options.adsPrerollAdSkipSeconds = 4;
                    media.options.indexPreroll = 0;
                    // and then somehow to init this ad...
                },

Thanks

hriad commented 5 years ago

I also have the same use case and I'm evaluating feasibility using mediaelement. Did you get anywhere with this @gorankrgovic

amiranmelia commented 5 years ago

@gorankrgovic @hriad any update on this ?