mirror of https://github.com/calzoneman/sync.git
Add fullscreen button
This commit is contained in:
parent
a6ddebbec3
commit
c0f76bcf00
|
@ -76,6 +76,8 @@ html(lang="en")
|
||||||
#videocontrols.btn-group.pull-right
|
#videocontrols.btn-group.pull-right
|
||||||
button#mediarefresh.btn.btn-sm.btn-default(title="Reload the video player")
|
button#mediarefresh.btn.btn-sm.btn-default(title="Reload the video player")
|
||||||
span.glyphicon.glyphicon-retweet
|
span.glyphicon.glyphicon-retweet
|
||||||
|
button#fullscreenbtn.btn.btn-sm.btn-default(title="Make the video player fullscreen")
|
||||||
|
span.glyphicon.glyphicon-fullscreen
|
||||||
button#getplaylist.btn.btn-sm.btn-default(title="Retrieve playlist links")
|
button#getplaylist.btn.btn-sm.btn-default(title="Retrieve playlist links")
|
||||||
span.glyphicon.glyphicon-link
|
span.glyphicon.glyphicon-link
|
||||||
button#voteskip.btn.btn-sm.btn-default(title="Voteskip")
|
button#voteskip.btn.btn-sm.btn-default(title="Voteskip")
|
||||||
|
|
13
www/js/ui.js
13
www/js/ui.js
|
@ -792,3 +792,16 @@ $("#emotelist-alphabetical").change(function () {
|
||||||
EMOTELIST.handleChange();
|
EMOTELIST.handleChange();
|
||||||
EMOTELIST.loadPage(0);
|
EMOTELIST.loadPage(0);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
$("#fullscreenbtn").click(function () {
|
||||||
|
var elem = document.querySelector("#videowrap .embed-responsive");
|
||||||
|
// this shit is why frontend web development sucks
|
||||||
|
var fn = elem.requestFullscreen ||
|
||||||
|
elem.mozRequestFullScreen || // Mozilla has to be different and use a capital 'S'
|
||||||
|
elem.webkitRequestFullscreen ||
|
||||||
|
elem.msRequestFullscreen;
|
||||||
|
|
||||||
|
if (fn) {
|
||||||
|
fn.call(elem);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
Loading…
Reference in New Issue