react-player
Advanced tools
Comparing version 0.24.5 to 0.24.6
@@ -7,2 +7,8 @@ # Change Log | ||
#### [v0.24.6](https://github.com/CookPete/react-player/compare/v0.24.5...v0.24.6) | ||
> 28 September 2017 | ||
* Make getInternalPlayer more flexible [`#238`](https://github.com/CookPete/react-player/issues/238) | ||
#### [v0.24.5](https://github.com/CookPete/react-player/compare/v0.24.4...v0.24.5) | ||
@@ -9,0 +15,0 @@ > 16 September 2017 |
@@ -162,5 +162,5 @@ 'use strict'; | ||
(0, _utils.getSDK)(DASH_SDK_URL, DASH_GLOBAL).then(function (dashjs) { | ||
var player = dashjs.MediaPlayer().create(); | ||
player.initialize(_this2.player, url, true); | ||
player.getDebug().setLogToBrowserConsole(false); | ||
_this2.dash = dashjs.MediaPlayer().create(); | ||
_this2.dash.initialize(_this2.player, url, true); | ||
_this2.dash.getDebug().setLogToBrowserConsole(false); | ||
}); | ||
@@ -167,0 +167,0 @@ } |
@@ -94,4 +94,6 @@ 'use strict'; | ||
}, _this.getInternalPlayer = function () { | ||
var key = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'player'; | ||
if (!_this.player) return null; | ||
return _this.player.player; | ||
return _this.player[key]; | ||
}, _this.progress = function () { | ||
@@ -98,0 +100,0 @@ if (_this.props.url && _this.player && _this.player.isReady) { |
{ | ||
"name": "react-player", | ||
"version": "0.24.5", | ||
"version": "0.24.6", | ||
"description": "A react component for playing a variety of URLs, including file paths, YouTube, Facebook, SoundCloud, Streamable, Vidme, Vimeo and Wistia", | ||
@@ -5,0 +5,0 @@ "main": "lib/ReactPlayer.js", |
@@ -212,3 +212,3 @@ ReactPlayer | ||
`getDuration()` | Returns the duration (in seconds) of the currently playing media<br /> ◦ Returns `null` if duration is unavailable | ||
`getInternalPlayer()` | Returns the internal player of whatever is currently playing<br /> ◦ eg the [YouTube player instance](https://developers.google.com/youtube/iframe_api_reference#Loading_a_Video_Player), or the [`<video>`](https://developer.mozilla.org/en/docs/Web/HTML/Element/video) element when playing a video file | ||
`getInternalPlayer()` | Returns the internal player of whatever is currently playing<br /> ◦ eg the [YouTube player instance](https://developers.google.com/youtube/iframe_api_reference#Loading_a_Video_Player), or the [`<video>`](https://developer.mozilla.org/en/docs/Web/HTML/Element/video) element when playing a video file<br /> ◦ Use `getInternalPlayer('hls')` to get the [hls.js](https://github.com/video-dev/hls.js) player<br /> ◦ Use `getInternalPlayer('dash')` to get the [dash.js](https://github.com/Dash-Industry-Forum/dash.js) player | ||
@@ -215,0 +215,0 @@ ### Supported media |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
1469986
32
3093