src/core/a-assets.js
function fixUpMediaElement (mediaEl) {
  // Cross-origin.
  var newMediaEl = setCrossOrigin(mediaEl);

  // Plays inline for mobile.
  if (newMediaEl.tagName && newMediaEl.tagName.toLowerCase() === 'video') {
    newMediaEl.setAttribute('playsinline', '');
    newMediaEl.setAttribute('webkit-playsinline', '');
  }

  if (newMediaEl !== mediaEl) {
    mediaEl.parentNode.appendChild(newMediaEl);
    mediaEl.parentNode.removeChild(mediaEl);
  }
  return newMediaEl;
}
function fixUpMediaElement (mediaEl) {
  // Cross-origin.
  var newMediaEl = setCrossOrigin(mediaEl);

  // Plays inline for mobile.
  if (newMediaEl.tagName && newMediaEl.tagName.toLowerCase() === 'video') {
    newMediaEl.setAttribute('playsinline', '');
    newMediaEl.setAttribute('webkit-playsinline', '');
  }

  if (newMediaEl !== mediaEl) {
    mediaEl.parentNode.appendChild(newMediaEl);
    mediaEl.parentNode.removeChild(mediaEl);
  }
  return newMediaEl;
}
function fixUpMediaElement ( mediaEl ) { // Cross-origin. var newMediaEl = setCrossOrigin ( mediaEl ) ; // Plays inline for mobile. if ( newMediaEl . tagName && newMediaEl . tagName . toLowerCase ( ) === 'video' ) { newMediaEl . setAttribute ( 'playsinline' , '' ) ; newMediaEl . setAttribute ( 'webkit-playsinline' , '' ) ; } if ( newMediaEl !== mediaEl ) { mediaEl . parentNode . appendChild ( newMediaEl ) ; mediaEl . parentNode . removeChild ( mediaEl ) ; } return newMediaEl ; }
Automatically add attributes to media elements where convenient.
crossorigin, playsinline.
Automatically add attributes to media elements where convenient . crossorigin playsinline .