Skip to content

Commit

Permalink
remove trailing whitespace
Browse files Browse the repository at this point in the history
  • Loading branch information
marcobiedermann committed Jun 4, 2017
1 parent c4193e8 commit c24c8fc
Show file tree
Hide file tree
Showing 9 changed files with 203 additions and 203 deletions.
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ _MediaElementPlayer: HTML5 `<video>` and `<audio>` player_

A complete HTML/CSS audio/video player built on top `MediaElement.js`. Many great HTML5 players have a completely separate Flash UI in fallback mode, but MediaElementPlayer.js uses the same HTML/CSS for all players.

`MediaElement.js` is a set of custom Flash plugins that mimic the HTML5 MediaElement API for browsers that don't support HTML5 or don't support the media codecs you're using.
`MediaElement.js` is a set of custom Flash plugins that mimic the HTML5 MediaElement API for browsers that don't support HTML5 or don't support the media codecs you're using.
Instead of using Flash as a _fallback_, Flash is used to make the browser seem HTML5 compliant and enable codecs like H.264 (via Flash) on all browsers.

In general, `MediaElement.js` supports **IE9+, MS Edge, Chrome, Firefox, Safari, iOS 8+** and **Android 4.0+**.
Expand All @@ -52,7 +52,7 @@ In order to successfully install `3.x` in an existing setup, you must consider t
2. By default, `MediaElement` has bundled native renderers, such as HLS, M(PEG)-DASH and FLV, as well as YouTube and Flash shims. **If you want to use any other renderer, you MUST refer to the `build/renderers` folder and add as many as you want**. Check `demo/index.html` for a better reference.

3. You **must** set up now the path for the Flash shims if they are not in the same folder as the JS files. To do this, set the path via the `pluginPath` configuration. In the same topic, if you need to support browsers with Javascript disabled, you **must** reference the correct Flash shim, since in `2.x` there was only a single Flash shim and in `3.x` it was split to target specific media types. Check the [Browsers with JavaScript disabled](docs/installation.md#disabled-javascript) section for more details.

4. If you want to use Flash shims from a CDN, do the change related to `pluginPath` setting the CDN's URL, and also setting `shimScriptAccess` configuration as **`always`**.

5. If you need to force the Flash shim, the way to do it in `3.x` version is to use the `renderers` configuration and list them in an array.
Expand All @@ -64,9 +64,9 @@ $('video, audio').mediaelementplayer({
// Configuration
success: function(media) {
var isNative = /html5|native/i.test(media.rendererName);

var isYoutube = ~media.rendererName.indexOf('youtube');

// etc.
}
});
Expand All @@ -85,7 +85,7 @@ Additional features can be found at https://github.com/mediaelement/mediaelement

<a id="api"></a>
## API and Configuration

`MediaElement.js` has many options that you can take advantage from. Visit [API and Configuration](docs/api.md) for more details.

Also, a `Utilities/Features` guide is available for development. Visit [Utilities/Features](docs/utils.md) for more details.
Expand All @@ -111,6 +111,6 @@ Changes available at [Change Log](changelog.md).
<a id="todo"></a>
## TODO list

**IMPORTANT:** Before posting an issue, it is strongly encouraged to read the whole documentation since it covers the majority of scenarios exposed in prior issues.
**IMPORTANT:** Before posting an issue, it is strongly encouraged to read the whole documentation since it covers the majority of scenarios exposed in prior issues.

New features and pending bugs can be found at [TODO list](TODO.md).
2 changes: 1 addition & 1 deletion TODO.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@

### Any features/issues related to elements in controlbar or additional

*All items listed in https://github.com/mediaelement/mediaelement-plugins/issues*
*All items listed in https://github.com/mediaelement/mediaelement-plugins/issues*
78 changes: 39 additions & 39 deletions changelog.md

Large diffs are not rendered by default.

36 changes: 18 additions & 18 deletions docs/api.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ height | Sets the height of the video player in pixels; you can also indicate pe
loop | Specifies that the video will start over again, every time it is finished
muted | Specifies that the audio output of the video should be muted
poster | Specifies an image to be shown while the video is downloading, or until the user hits the play button. Generally, a PNG or JPEG image. If not specified, the player will use the background color specified in the style sheet
preload | Specifies if and how the author thinks the video should be loaded when the page loads; possible values: `auto`, `metadata` or `none` (recommended)
preload | Specifies if and how the author thinks the video should be loaded when the page loads; possible values: `auto`, `metadata` or `none` (recommended)
src | Specifies the URL of the video file; this value can also be indicated with `source` tags (refer to the [Multiple Codecs](installation.md#multi-codecs) section for more information)
style | Specifies an inline CSS style for an element
tabindex | Specifies the tabbing order of an element. To avoid the keyboard to focus on this element, use `-1`; otherwise, `0`
Expand All @@ -34,9 +34,9 @@ width | Sets the width of the video player in pixels; you can also indicate perc

The following markup displays all the attributes listed above for more clarity:
```html
<video autoplay controls class="player" id="player1" height="360"
width="100%" loop muted poster="/path/to/poster.jpg"
preload="none" src="/path/to/media.mp4"
<video autoplay controls class="player" id="player1" height="360"
width="100%" loop muted poster="/path/to/poster.jpg"
preload="none" src="/path/to/media.mp4"
style="max-width: 100%" tabindex="0" title="MediaElement">
</video>
```
Expand Down Expand Up @@ -65,7 +65,7 @@ flv | object | | See [Documentation](https://github.com/Bilibili/flv.js/blob/mas
hls | object | | See [Documentation](https://github.com/dailymotion/hls.js/blob/master/API.md#fine-tuning) (and a custom `path` parameter to indicate where to load library)
youtube | object | | See [Documentation](https://developers.google.com/youtube/player_parameters#Parameters) (and a custom `nocookie` parameter to switch to YouTube's no-cookie URL)

**Notes**
**Notes**
1. Vimeo and Soundcloud don't need any configuration for now since they are pretty straight forward.
2. To use DRM with M(PEG)-DASH, make sure CORS are configured correctly, and also your site **MUST** be using SSL.
3. `success` and `error` will be available for both `MediaElement` and `MediaElementPlayer`; however, when using `MediaElementPlayer`, a third argument is passed: `instance`, which gives access to the methods associated to the `MediaElementPlayer` class.
Expand Down Expand Up @@ -125,7 +125,7 @@ enableProgressTooltip | boolean | `true` | Enable/disable tooltip that shows tim
useSmoothHover | boolean | `true` | Enable smooth behavior when hovering progress bar (like YouTube's)
audioVolume | string | `horizontal` | Position of volume slider on audio element
videoVolume | string | `vertical` | Position of volume slider on video element
usePluginFullScreen | boolean | `true` | Flag to activate detection of Pointer events when on fullscreen mode
usePluginFullScreen | boolean | `true` | Flag to activate detection of Pointer events when on fullscreen mode
tracksAriaLive | boolean | `false` | By default, no WAI-ARIA live region - don't make a screen reader speak captions over an audio track.
hideCaptionsButtonWhenEmpty | boolean | `true` | Option to remove the `[cc]` button when no `<track kind="subtitles">` are present
toggleCaptionsButtonWhenOnlyOne | boolean | `false` | If true and we only have one track, change captions to popup
Expand All @@ -148,20 +148,20 @@ MediaElementPlayer is a complete audio and video player, but you can also use ju

<a id="properties"></a>
### Properties
Property | Description | GET | SET
Property | Description | GET | SET
-------- | ----------- | --- | ---
autoplay | Set or return whether the audio/video should start playing as soon as it is loaded | X | X
buffered | Return a TimeRanges object representing the buffered parts of the audio/video | X |
buffered | Return a TimeRanges object representing the buffered parts of the audio/video | X |
controls | Set or return whether the audio/video should display controls (like play/pause etc.) | X | X
currentSrc | Return the URL of the current audio/video | X |
currentSrc | Return the URL of the current audio/video | X |
currentTime | Set or return the current playback position in the audio/video (in seconds) | X | X
duration | Return the length of the current audio/video (in seconds); to determine it without playing media, `preload="auto"` must be set | X |
ended | Return whether the playback of the audio/video has ended or not | X |
error | Return a MediaError object representing the error state of the audio/video | X |
duration | Return the length of the current audio/video (in seconds); to determine it without playing media, `preload="auto"` must be set | X |
ended | Return whether the playback of the audio/video has ended or not | X |
error | Return a MediaError object representing the error state of the audio/video | X |
loop | Set or return whether the audio/video should start over again when finished | X | X
muted | Set or returns whether the audio/video is muted or not | X | X
paused | Return whether the audio/video is paused or not | X |
readyState | Return the current ready state of the audio/video | X |
paused | Return whether the audio/video is paused or not | X |
readyState | Return the current ready state of the audio/video | X |
seeking | Return whether the user is currently seeking in the audio/video | X |
src | Set or return the current source of the audio/video element | X | X
volume | Set or return the volume of the audio/video | X | X
Expand All @@ -176,11 +176,11 @@ play() | Start playing the audio/video
pause() | Halt (pauses) the currently playing audio or video
stop() | **Only** present to support Flash RTMP streaming in MediaElementPlayer. The equivalent for other scenarios is `pause`
remove() | Destroy the video/audio player instance
canPlayType(type) | Determine whether current player can/cannot play a specific media type; `type` is MIME type and each renderer has a whitelist of them
canPlayType(type) | Determine whether current player can/cannot play a specific media type; `type` is MIME type and each renderer has a whitelist of them
setPlayerSize (width, height) | Set player's `width` and `height` also considering the `stretching` configuration
setPoster (url) | Add a `image` tag with the poster's `url` inside the player's layer
setPoster (url) | Add a `image` tag with the poster's `url` inside the player's layer
setMuted (muted) | Mute/unmute the player; `muted` is a boolean value
setCurrentTime (time) | Set a new current time for the player; `time` is either an integer or float number, and if negative, it will start from zero.
setCurrentTime (time) | Set a new current time for the player; `time` is either an integer or float number, and if negative, it will start from zero.
getCurrentTime () | Retrieve the current time of the media being played
setVolume (volume) | Set a volume level for the player; `volume` is a number between `0` and `1`
getVolume () | Retrieve the current volume level of the media being played
Expand All @@ -191,7 +191,7 @@ getSrc () | Retrieve the media URL/path currently being played; each renderer ha
### Events

Event | Action(s) executed when...
----- | -----------
----- | -----------
loadedmetadata | Meta data (like dimensions and duration) are loaded
progress | Browser is in the process of getting the media data
timeupdate | The playing position has changed (like when the user fast forwards to a different point in the media)
Expand Down
Loading

0 comments on commit c24c8fc

Please sign in to comment.