From 7579fc1800527c040b740b949d027bc5208709a8 Mon Sep 17 00:00:00 2001 From: Pat O'Neill Date: Fri, 14 Jul 2017 14:20:00 -0400 Subject: [PATCH] docs: Fix Player#src API documentation. (#4454) --- src/js/player.js | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/src/js/player.js b/src/js/player.js index bf734760c..f01c79b1a 100644 --- a/src/js/player.js +++ b/src/js/player.js @@ -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