Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
427 views
in Technique[技术] by (71.8m points)

jwplayer7 - How to add an additional button to the controlbar with jwplayer 7

I am interested in adding a download video button, similar to the one here -- http://support.jwplayer.com/customer/portal/articles/1436999-example-adding-a-download-button. However, I would like to add it within the control bar (a download arrow to the far right).

How would I add in additional buttons to the controlbar in jwplayer 7?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

For JW Player 7.3 you can do this via JS

    playerInstance.onReady(function(){
            var myLogo = document.createElement("div");
            myLogo.id = "myTestLogo";
            myLogo.setAttribute('style',"color: red; padding-left: 5px; margin-right: 5px; margin-top: 10px; background-image: url('/icon_dir.png');background-repeat: no-repeat;");
            myLogo.setAttribute('class','jw-icon jw-icon-inline jw-button-color jw-reset jw-icon-logo');
            myLogo.setAttribute('onclick','window.location="http://jwplayer.com"');
            document.getElementsByClassName('jw-controlbar-right-group')[0].appendChild(myLogo);
    });

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...