1
0
mirror of https://github.com/videojs/video.js.git synced 2025-02-04 11:43:27 +02:00

docs: Fix Player#src API documentation. (#4454)

This commit is contained in:
Pat O'Neill 2017-07-14 14:20:00 -04:00 committed by Gary Katsevman
parent 4f43616160
commit 7579fc1800

View File

@ -2247,17 +2247,19 @@ class Player extends Component {
}
/**
* The source function updates the video source
* There are three types of variables you can pass as the argument.
* **URL string**: A URL to the the video file. Use this method if you are sure
* the current playback technology (HTML5/Flash) can support the source you
* provide. Currently only MP4 files can be used in both HTML5 and Flash.
* Get or set the video source.
*
* @param {Tech~SourceObject|Tech~SourceObject[]} [source]
* One SourceObject or an array of SourceObjects
* @param {Tech~SourceObject|Tech~SourceObject[]|string} [source]
* A SourceObject, an array of SourceObjects, or a string referencing
* a URL to a media source. It is _highly recommended_ that an object
* or array of objects is used here, so that source selection
* algorithms can take the `type` into account.
*
* @return {string}
* The current video source when getting
* If not provided, this method acts as a getter.
*
* @return {string|undefined}
* If the `source` argument is missing, returns the current source
* URL. Otherwise, returns nothing/undefined.
*/
src(source) {
// getter usage