Socket
Socket
Sign inDemoInstall

react-player

Package Overview
Dependencies
Maintainers
1
Versions
162
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-player - npm Package Compare versions

Comparing version 2.3.1 to 2.4.0

21

lazy/players/FilePlayer.js

@@ -50,2 +50,4 @@ "use strict";

var MATCH_DROPBOX_URL = /www\.dropbox\.com\/.+/;
var MATCH_CLOUDFLARE_STREAM = /https:\/\/watch\.cloudflarestream\.com\/([a-z0-9]+)/;
var REPLACE_CLOUDFLARE_STREAM = 'https://videodelivery.net/{id}/manifest/video.m3u8';

@@ -263,3 +265,11 @@ var FilePlayer = /*#__PURE__*/function (_Component) {

value: function shouldUseHLS(url) {
return _patterns.HLS_EXTENSIONS.test(url) && !IOS || this.props.config.forceHLS;
if (this.props.config.forceHLS) {
return true;
}
if (IOS) {
return false;
}
return _patterns.HLS_EXTENSIONS.test(url) || MATCH_CLOUDFLARE_STREAM.test(url);
}

@@ -297,4 +307,11 @@ }, {

_this2.hls.loadSource(url);
if (MATCH_CLOUDFLARE_STREAM.test(url)) {
var id = url.match(MATCH_CLOUDFLARE_STREAM)[1];
console.log(REPLACE_CLOUDFLARE_STREAM.replace('{id}', id));
_this2.hls.loadSource(REPLACE_CLOUDFLARE_STREAM.replace('{id}', id));
} else {
_this2.hls.loadSource(url);
}
_this2.hls.attachMedia(_this2.player);

@@ -301,0 +318,0 @@ });

@@ -131,3 +131,10 @@ "use strict";

muted: muted,
controlsVisibleOnLoad: controls
controlsVisibleOnLoad: controls,
fullscreenButton: controls,
playbar: controls,
playbackRateControl: controls,
qualityControl: controls,
volumeControl: controls,
settingsControl: controls,
smallPlayButton: controls
}, config.options),

@@ -134,0 +141,0 @@ onReady: function onReady(player) {

6

lazy/props.js

@@ -72,3 +72,4 @@ "use strict";

wistia: shape({
options: object
options: object,
playerId: string
}),

@@ -174,3 +175,4 @@ mixcloud: shape({

wistia: {
options: {}
options: {},
playerId: null
},

@@ -177,0 +179,0 @@ mixcloud: {

@@ -50,2 +50,4 @@ "use strict";

var MATCH_DROPBOX_URL = /www\.dropbox\.com\/.+/;
var MATCH_CLOUDFLARE_STREAM = /https:\/\/watch\.cloudflarestream\.com\/([a-z0-9]+)/;
var REPLACE_CLOUDFLARE_STREAM = 'https://videodelivery.net/{id}/manifest/video.m3u8';

@@ -263,3 +265,11 @@ var FilePlayer = /*#__PURE__*/function (_Component) {

value: function shouldUseHLS(url) {
return _patterns.HLS_EXTENSIONS.test(url) && !IOS || this.props.config.forceHLS;
if (this.props.config.forceHLS) {
return true;
}
if (IOS) {
return false;
}
return _patterns.HLS_EXTENSIONS.test(url) || MATCH_CLOUDFLARE_STREAM.test(url);
}

@@ -297,4 +307,11 @@ }, {

_this2.hls.loadSource(url);
if (MATCH_CLOUDFLARE_STREAM.test(url)) {
var id = url.match(MATCH_CLOUDFLARE_STREAM)[1];
console.log(REPLACE_CLOUDFLARE_STREAM.replace('{id}', id));
_this2.hls.loadSource(REPLACE_CLOUDFLARE_STREAM.replace('{id}', id));
} else {
_this2.hls.loadSource(url);
}
_this2.hls.attachMedia(_this2.player);

@@ -301,0 +318,0 @@ });

@@ -131,3 +131,10 @@ "use strict";

muted: muted,
controlsVisibleOnLoad: controls
controlsVisibleOnLoad: controls,
fullscreenButton: controls,
playbar: controls,
playbackRateControl: controls,
qualityControl: controls,
volumeControl: controls,
settingsControl: controls,
smallPlayButton: controls
}, config.options),

@@ -134,0 +141,0 @@ onReady: function onReady(player) {

@@ -72,3 +72,4 @@ "use strict";

wistia: shape({
options: object
options: object,
playerId: string
}),

@@ -174,3 +175,4 @@ mixcloud: shape({

wistia: {
options: {}
options: {},
playerId: null
},

@@ -177,0 +179,0 @@ mixcloud: {

{
"name": "react-player",
"version": "2.3.1",
"version": "2.4.0",
"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/index.js",

@@ -84,3 +84,3 @@ <h1 align='center'>

`loop` | Set to `true` or `false` to loop the media | `false`
`controls` | Set to `true` or `false` to display native player controls<br />&nbsp; ◦ &nbsp;Controls cannot be hidden for Wistia videos | `false`
`controls` | Set to `true` or `false` to display native player controls | `false`
`light` | Set to `true` to show just the video thumbnail, which loads the full player on click<br />&nbsp; ◦ &nbsp;Pass in an image URL to override the preview image | `false`

@@ -87,0 +87,0 @@ `volume` | Set the volume of the player, between `0` and `1`<br/>&nbsp; ◦ &nbsp;`null` uses default volume on all players [`#357`](https://github.com/CookPete/react-player/issues/357) | `null`

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc