diff options
author | Sam Potts <me@sampotts.me> | 2015-05-23 19:58:53 +1000 |
---|---|---|
committer | Sam Potts <me@sampotts.me> | 2015-05-23 19:58:53 +1000 |
commit | 398815857f05dad8c0b2d6b1d58c40eb90df2d11 (patch) | |
tree | bc072ec5158ff5e9ea7794e9e43ca221c6288b85 /src/js/plyr.youtube.js | |
parent | 4c5020a396ddeb9839a7ce5b51f46897420d9817 (diff) | |
parent | 3d1a586314c14fcb5c78060f14efe9f9774ce8dd (diff) | |
download | plyr-398815857f05dad8c0b2d6b1d58c40eb90df2d11.tar.lz plyr-398815857f05dad8c0b2d6b1d58c40eb90df2d11.tar.xz plyr-398815857f05dad8c0b2d6b1d58c40eb90df2d11.zip |
Merge branch 'develop' of github.com:selz/plyr into develop
# Conflicts:
# .gitignore
Diffstat (limited to 'src/js/plyr.youtube.js')
-rw-r--r-- | src/js/plyr.youtube.js | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/src/js/plyr.youtube.js b/src/js/plyr.youtube.js new file mode 100644 index 00000000..0b28460a --- /dev/null +++ b/src/js/plyr.youtube.js @@ -0,0 +1,32 @@ +// ========================================================================== +// Plyr +// plyr.youtube.js v1.1.4 +// https://github.com/selz/plyr +// License: The MIT License (MIT) +// ========================================================================== + +(function (api) { + "use strict"; + + api.youtube = { + setup: function() { + console.log("Setup youtube"); + console.log(this); + + var player = this; + + // Find child <source> elements + var sources = player.media.querySelectorAll("source"); + + // Remove each + for (var i = sources.length - 1; i >= 0; i--) { + var source = sources[i]; + + if(source.type == "video/youtube") { + console.log(source.src); + } + } + } + }; + +}(this.plyr.plugins = this.plyr.plugins || {}));
\ No newline at end of file |