API improvements

This commit is contained in:
Sam Potts
2015-03-22 11:05:28 +11:00
parent 388cb4df39
commit c61db87fd6
7 changed files with 134 additions and 73 deletions

View File

@ -6,7 +6,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- Docs styles -->
<link rel="stylesheet" href="//cdn.plyr.io/1.0.27/docs.css">
<link rel="stylesheet" href="//cdn.plyr.io/1.0.28/docs.css">
</head>
<body>
<main>

View File

@ -8,10 +8,10 @@
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- Styles -->
<link rel="stylesheet" href="//cdn.plyr.io/1.0.27/plyr.css">
<link rel="stylesheet" href="//cdn.plyr.io/1.0.28/plyr.css">
<!-- Docs styles -->
<link rel="stylesheet" href="//cdn.plyr.io/1.0.27/docs.css">
<link rel="stylesheet" href="//cdn.plyr.io/1.0.28/docs.css">
</head>
<body>
<header>
@ -67,13 +67,29 @@
<!-- Load SVG defs -->
<!-- You should bundle all SVG/Icons into one file using a build tool such as gulp and svg store -->
<script>
(function(d,p){var a=new XMLHttpRequest(),b=d.body;a.open("GET",p,!0);a.send();a.onload=function(){var c=d.createElement("div");c.style.display="none";c.innerHTML=a.responseText;b.insertBefore(c,b.childNodes[0])}})(document,"//cdn.plyr.io/1.0.27/sprite.svg");
(function(d, u){
var a = new XMLHttpRequest(),
b = d.body;
// Check for CORS support
// If you're loading from same domain, you can remove the if statement
if("withCredentials" in a) {
a.open("GET", u, true);
a.send();
a.onload = function(){
var c = d.createElement("div");
c.style.display="none";
c.innerHTML = a.responseText;
b.insertBefore(c, b.childNodes[0]);
}
}
})(document, "https://cdn.plyr.io/1.0.28/sprite.svg");
</script>
<!-- Plyr core script -->
<script src="//cdn.plyr.io/1.0.27/plyr.js"></script>
<script src="//cdn.plyr.io/1.0.28/plyr.js"></script>
<!-- Docs script -->
<script src="//cdn.plyr.io/1.0.27/docs.js"></script>
<script src="//cdn.plyr.io/1.0.28/docs.js"></script>
</body>
</html>