Skip to content
Alican Çubukçuoğlu edited this page Feb 2, 2015 · 4 revisions

Link to Example

<script src="path/to/embed.js"></script>
<script>
    //Configure
    mllembed.config('clientId', 'SomeCompany');
    mllembed.config('something', 'else');

    mllembed.ready(function (mllembed) {

        //Add a new iframe
        $('<iframe width="640" height="360" src="https://www.youtube.com/embed/zf_cb_Nw5zY?rel=0&amp;controls=0&amp;showinfo=0" frameborder="0" allowfullscreen></iframe>')
            .appendTo('body');

        //Run the automatic converter manually
        mllembed.run();

        //Add another
        var iframe = $('<iframe width="640" height="360" src="https://www.youtube-nocookie.com/embed/_cLvpJY2deo?showinfo=0" frameborder="0" allowfullscreen></iframe>')
            .appendTo('body');

        //Convert an element manually
        mllembed.convert(iframe[0]);

    });
</script>