Closed joemidi closed 6 years ago
You get the following error:
Uncaught TypeError: Cannot read property 'appendChild' of undefined
when video sources are being added to the SmartObject
sources
SmartObject
We could move
if (this.options.sources) { const sources = this.options.sources; const fragment = document.createDocumentFragment(); for (let i = 0; i < sources.length; i++) { const sourceTag = document.createElement('source'); sourceTag.src = sources[i].url; sourceTag.type = sources[i].type; fragment.appendChild(sourceTag); } this.element.appendChild(fragment); }
into the applySettings() method.
applySettings()
You get the following error:
when video
sources
are being added to theSmartObject
We could move
into the
applySettings()
method.