mediaelement / mediaelement-plugins

Plugins for the main mediaelement project
406 stars 138 forks source link

blocking Global Options drop down menu #39

Closed mzen1 closed 7 years ago

mzen1 commented 7 years ago

how to get rid of Global Options drop down menu without deleting audioplayer styles? for multiple players on page.

rafa8626 commented 7 years ago

Can you expand on this? What drop down menu are you talking about?

mzen1 commented 7 years ago

this: http://zenonedesign.com/HTML5/demo/index.html i want multiple players on a page, but when I try to delete the Global Options dropdown section i lose all styling and conditional stopping/playing. the var "lang" is tied into all the styling?i just want the audioplays with no drop down, like almost here: http://zenonedesign.com/HTML5/demo/indexMZ2.html

rafa8626 commented 7 years ago

Yes you just need this piece of code, rather that the entire content of demo.js file:

document.addEventListener('DOMContentLoaded', function () {
    var mediaElements = document.querySelectorAll('video, audio'), i, total = mediaElements.length;

    for (i = 0; i < total; i++) {
        new MediaElementPlayer(mediaElements[i], {
            pluginPath: '../build/',
        });
    }
});
rafa8626 commented 7 years ago

Let me know if it works for you

mzen1 commented 7 years ago

yes! thank you so much Raphael!!

rafa8626 commented 7 years ago

Glad it worked for you. Please star us at https://github.com/mediaelement/mediaelement and https://github.com/mediaelement/mediaelement-plugins to continue improving the package and giving it more popularity; also tell your friends/coworkers/etc. to support the project, if you don't mind.It would be greatly appreciated it

mzen1 commented 7 years ago

okay, will do. thanks again!