Created
December 4, 2012 01:14
-
-
Save brandon-beacher/4199625 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
GPB.Controls.Stencil.Audio = function (stencil) { | |
var API = { constructor: GPB.Controls.Stencil.Audio } | |
API.maskTagName = 'div'; | |
API.findElements = function (doc) { | |
return doc.querySelectorAll('.audio-placeholder'); | |
} | |
API.fitMask = function (audioPlaceholder, audioMask) { | |
var audio = audioMask.dom.append("audio"); | |
audio.setAttribute('controls', audioPlaceholder.getAttribute('data-audio-controls')); | |
audio.setAttribute('preload', audioPlaceholder.getAttribute('data-audio-preload')); | |
audio.setAttribute('src', audioPlaceholder.getAttribute('data-audio-src')); | |
audio.setAttribute('type', audioPlaceholder.getAttribute('data-audio-type')); | |
var link = audioMask.dom.append("a"); | |
// set up link here | |
} | |
return API; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment