()
| 18 | } |
| 19 | |
| 20 | createMedia() { |
| 21 | //Transform URL for Dropbox |
| 22 | var url = transformMediaURL(this.data.url), |
| 23 | self = this; |
| 24 | |
| 25 | var self = this, |
| 26 | audio_class = "tl-media-item tl-media-audio tl-media-shadow"; |
| 27 | |
| 28 | this._el.content_item = this.domCreate("audio", audio_class, this._el.content); |
| 29 | |
| 30 | this._el.content_item.controls = true; |
| 31 | this._el.source_item = this.domCreate("source", "", this._el.content_item); |
| 32 | |
| 33 | // Media Loaded Event |
| 34 | this._el.content_item.addEventListener('load', function(e) { |
| 35 | self.onMediaLoaded(); |
| 36 | }); |
| 37 | |
| 38 | this._el.source_item.src = url; |
| 39 | this._el.source_item.type = this._getType(this.data.url, this.data.mediatype.match_str); |
| 40 | this._el.content_item.innerHTML += "Your browser doesn't support HTML5 audio with " + this._el.source_item.type; |
| 41 | this.player_element = this._el.content_item |
| 42 | } |
| 43 | |
| 44 | _updateMediaDisplay(layout) { |
| 45 | if (Browser.firefox) { |
no test coverage detected