[ Index ]

PHP Cross Reference of WordPress Trunk (Updated Daily)

title

Body

[close]

/wp-includes/js/dist/ -> media-utils.js (summary)

(no description)

File Size: 1946 lines (65 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 50 functions

  __webpack_require__()
  getDefault()
  getModuleExports()
  _defineProperty()
  _defineProperties()
  _createClass()
  _classCallCheck()
  _possibleConstructorReturn()
  _getPrototypeOf()
  _setPrototypeOf()
  _inherits()
  _arrayWithoutHoles()
  _nonIterableSpread()
  _toConsumableArray()
  _iterableToArrayLimit()
  _slicedToArray()
  _iterableToArray()
  _typeof2()
  _typeof()
  MediaUpload()
  getMimeTypesArray()
  uploadMedia()
  _uploadMedia()
  createMediaFromFile()
  _arrayWithHoles()
  _nonIterableRest()
  asyncGeneratorStep()
  _asyncToGenerator()
  _next()
  _throw()
  wrap()
  tryCatch()
  Generator()
  GeneratorFunction()
  GeneratorFunctionPrototype()
  defineIteratorMethods()
  AsyncIterator()
  invoke()
  enqueue()
  callInvokeWithMethodAndArg()
  makeInvokeMethod()
  maybeInvokeDelegate()
  pushTryEntry()
  resetTryEntry()
  Context()
  values()
  doneResult()
  handle()
  _assertThisInitialized()
  _objectSpread()

Functions
Functions that are not part of a class:

__webpack_require__(moduleId)   X-Ref
No description

getDefault()   X-Ref
No description

getModuleExports()   X-Ref
No description

_defineProperty(obj, key, value)   X-Ref
No description

_defineProperties(target, props)   X-Ref
No description

_createClass(Constructor, protoProps, staticProps)   X-Ref
No description

_classCallCheck(instance, Constructor)   X-Ref
No description

_possibleConstructorReturn(self, call)   X-Ref
No description

_getPrototypeOf(o)   X-Ref
No description

_setPrototypeOf(o, p)   X-Ref
No description

_inherits(subClass, superClass)   X-Ref
No description

_arrayWithoutHoles(arr)   X-Ref
No description

_nonIterableSpread()   X-Ref
No description

_toConsumableArray(arr)   X-Ref
No description

_iterableToArrayLimit(arr, i)   X-Ref
No description

_slicedToArray(arr, i)   X-Ref
No description

_iterableToArray(iter)   X-Ref
No description

_typeof2(obj)   X-Ref
No description

_typeof(obj)   X-Ref
No description

MediaUpload(_ref)   X-Ref
No description

getMimeTypesArray(wpMimeTypesObject)   X-Ref
Browsers may use unexpected mime types, and they differ from browser to browser.
This function computes a flexible array of mime types from the mime type structured provided by the server.
Converts { jpg|jpeg|jpe: "image/jpeg" } into [ "image/jpeg", "image/jpg", "image/jpeg", "image/jpe" ]
The computation of this array instead of directly using the object,
solves the problem in chrome where mp3 files have audio/mp3 as mime type instead of audio/mpeg.
https://bugs.chromium.org/p/chromium/issues/detail?id=227004

param: {?Object} wpMimeTypesObject Mime type object received from the server.
return: {?Array} An array of mime types or the parameter passed if it was "falsy".

uploadMedia(_x)   X-Ref
Media Upload is used by audio, image, gallery, video, and file blocks to
handle uploading a media file when a file upload button is activated.

TODO: future enhancement to add an upload indicator.

param: {Object}   $0                    Parameters object passed to the function.
param: {?Array}   $0.allowedTypes       Array with the types of media that can be uploaded, if unset all types are allowed.
param: {?Object}  $0.additionalData     Additional data to include in the request.
param: {Array}    $0.filesList          List of files.
param: {?number}  $0.maxUploadFileSize  Maximum upload size in bytes allowed for the site.
param: {Function} $0.onError            Function called when an error happens.
param: {Function} $0.onFileChange       Function called each time a file or a temporary representation of the file is available.
param: {?Object}  $0.wpAllowedMimeTypes List of allowed mime types and file extensions.

_uploadMedia()   X-Ref

param: {File}    file           Media File to Save.
param: {?Object} additionalData Additional data to include in the request.
return: {Promise} Media Object Promise.

createMediaFromFile(file, additionalData)   X-Ref
No description

_arrayWithHoles(arr)   X-Ref
No description

_nonIterableRest()   X-Ref
No description

asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg)   X-Ref
No description

_asyncToGenerator(fn)   X-Ref
No description

_next(value)   X-Ref
No description

_throw(err)   X-Ref
No description

wrap(innerFn, outerFn, self, tryLocsList)   X-Ref
No description

tryCatch(fn, obj, arg)   X-Ref
No description

Generator()   X-Ref
No description

GeneratorFunction()   X-Ref
No description

GeneratorFunctionPrototype()   X-Ref
No description

defineIteratorMethods(prototype)   X-Ref
No description

AsyncIterator(generator)   X-Ref
No description

invoke(method, arg, resolve, reject)   X-Ref
No description

enqueue(method, arg)   X-Ref
No description

callInvokeWithMethodAndArg()   X-Ref
No description

makeInvokeMethod(innerFn, self, context)   X-Ref
No description

maybeInvokeDelegate(delegate, context)   X-Ref
No description

pushTryEntry(locs)   X-Ref
No description

resetTryEntry(entry)   X-Ref
No description

Context(tryLocsList)   X-Ref
No description

values(iterable)   X-Ref
No description

doneResult()   X-Ref
No description

handle(loc, caught)   X-Ref
No description

_assertThisInitialized(self)   X-Ref
No description

_objectSpread(target)   X-Ref
No description



Generated: Sat Nov 23 20:47:33 2019 Cross-referenced by PHPXref 0.7