maestro-react-player
Advanced tools
Comparing version 1.11.0 to 1.11.1
@@ -165,3 +165,5 @@ 'use strict'; | ||
playsinline = _props.playsinline, | ||
onEnablePIP = _props.onEnablePIP; | ||
onEnablePIP = _props.onEnablePIP, | ||
onVolumeChange = _props.onVolumeChange, | ||
videoElementId = _props.videoElementId; | ||
@@ -176,2 +178,4 @@ this.player.addEventListener('canplay', onReady); | ||
this.player.addEventListener('error', onError); | ||
this.player.addEventListener('volumeChange', onVolumeChange); | ||
this.player.setAttribute('id', videoElementId); | ||
this.player.addEventListener('enterpictureinpicture', onEnablePIP); | ||
@@ -196,3 +200,4 @@ this.player.addEventListener('leavepictureinpicture', this.onDisablePIP); | ||
onError = _props2.onError, | ||
onEnablePIP = _props2.onEnablePIP; | ||
onEnablePIP = _props2.onEnablePIP, | ||
onVolumeChange = _props2.onVolumeChange; | ||
@@ -207,2 +212,3 @@ this.player.removeEventListener('canplay', onReady); | ||
this.player.removeEventListener('error', onError); | ||
this.player.removeEventListener('volumeChange', onVolumeChange); | ||
this.player.removeEventListener('enterpictureinpicture', onEnablePIP); | ||
@@ -209,0 +215,0 @@ this.player.removeEventListener('leavepictureinpicture', this.onDisablePIP); |
@@ -120,2 +120,12 @@ 'use strict'; | ||
}, { | ||
key: 'getVolume', | ||
value: function getVolume() { | ||
return this.callPlayer('getVolume'); | ||
} | ||
}, { | ||
key: 'getMuted', | ||
value: function getMuted() { | ||
return this.callPlayer('getMuted'); | ||
} | ||
}, { | ||
key: 'setVolume', | ||
@@ -122,0 +132,0 @@ value: function setVolume(fraction) { |
@@ -68,3 +68,3 @@ 'use strict'; | ||
if (!_this2.container) return; | ||
_this2.player = new Vimeo.Player(_this2.container, _extends({ | ||
_this2.player = new Vimeo.Player(_this2.container, _extends({}, _this2.props.config.vimeo.playerOptions, { | ||
url: url, | ||
@@ -75,3 +75,3 @@ autoplay: _this2.props.playing, | ||
playsinline: _this2.props.playsinline | ||
}, _this2.props.config.vimeo.playerOptions)); | ||
})); | ||
_this2.player.ready().then(function () { | ||
@@ -78,0 +78,0 @@ var iframe = _this2.container.querySelector('iframe'); |
@@ -91,2 +91,3 @@ 'use strict'; | ||
onProgress: func, | ||
onVolumeChange: func, | ||
onEnablePIP: func, | ||
@@ -186,2 +187,3 @@ onDisablePIP: func | ||
onSeek: function onSeek() {}, | ||
onVolumeChange: function onVolumeChange() {}, | ||
onProgress: function onProgress() {}, | ||
@@ -188,0 +190,0 @@ onEnablePIP: function onEnablePIP() {}, |
{ | ||
"name": "maestro-react-player", | ||
"version": "1.11.0", | ||
"version": "1.11.1", | ||
"description": "A React component for playing a variety of URLs, including file paths, YouTube, Facebook, Twitch, SoundCloud, Streamable, Vimeo, Wistia and DailyMotion", | ||
@@ -5,0 +5,0 @@ "main": "lib/ReactPlayer.js", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
1388347
60
5202