src/systems/material.js
function createVideoEl (src, width, height) {
  var videoEl = document.createElement('video');
  videoEl.width = width;
  videoEl.height = height;
  // Support inline videos for iOS webviews.
  videoEl.setAttribute('playsinline', '');
  videoEl.setAttribute('webkit-playsinline', '');
  videoEl.autoplay = true;
  videoEl.loop = true;
  videoEl.crossOrigin = 'anonymous';
  videoEl.addEventListener('error', function () {
    warn('`$s` is not a valid video', src);
  }, true);
  videoEl.src = src;
  return videoEl;
}
function createVideoEl (src, width, height) {
  var videoEl = document.createElement('video');
  videoEl.width = width;
  videoEl.height = height;
  // Support inline videos for iOS webviews.
  videoEl.setAttribute('playsinline', '');
  videoEl.setAttribute('webkit-playsinline', '');
  videoEl.autoplay = true;
  videoEl.loop = true;
  videoEl.crossOrigin = 'anonymous';
  videoEl.addEventListener('error', function () {
    warn('`$s` is not a valid video', src);
  }, true);
  videoEl.src = src;
  return videoEl;
}
function createVideoEl ( src , width , height ) { var videoEl = document . createElement ( 'video' ) ; videoEl . width = width ; videoEl . height = height ; // Support inline videos for iOS webviews. videoEl . setAttribute ( 'playsinline' , '' ) ; videoEl . setAttribute ( 'webkit-playsinline' , '' ) ; videoEl . autoplay = true ; videoEl . loop = true ; videoEl . crossOrigin = 'anonymous' ; videoEl . addEventListener ( 'error' , function ( ) { warn ( '`$s` is not a valid video' , src ) ; } , true ) ; videoEl . src = src ; return videoEl ; }
Create video element to be used as a texture.

@param {string} src - Url to a video file.
@param {number} width - Width of the video.
@param {number} height - Height of the video.
@returns {Element} Video element.
Create video element to be used as a texture .