src/utils/src-loader.js
function validateSrc (src, isImageCb, isVideoCb) {
  checkIsImage(src, function isAnImageUrl (isImage) {
    if (isImage) {
      isImageCb(src);
      return;
    }
    isVideoCb(src);
  });
}
function validateSrc (src, isImageCb, isVideoCb) {
  checkIsImage(src, function isAnImageUrl (isImage) {
    if (isImage) {
      isImageCb(src);
      return;
    }
    isVideoCb(src);
  });
}
function validateSrc ( src , isImageCb , isVideoCb ) { checkIsImage ( src , function isAnImageUrl ( isImage ) { if ( isImage ) { isImageCb ( src ) ; return ; } isVideoCb ( src ) ; } ) ; }
Validate a texture, either as a selector or as a URL.
Detects whether `src` is pointing to an image or video and invokes the appropriate
callback.

`src` will be passed into the callback

@params {string|Element} src - URL or media element.
@params {function} isImageCb - callback if texture is an image.
@params {function} isVideoCb - callback if texture is a video.
Validate a texture either as a selector or as a URL . Detects whether src is pointing to an image or video and invokes the appropriate callback .