@u-wave/react-youtube
Advanced tools
Comparing version 0.1.0 to 0.1.1
@@ -1,3 +0,3 @@ | ||
import { Component, PropTypes, createElement } from 'react'; | ||
import * as React from 'react'; | ||
import React from 'react'; | ||
import PropTypes from 'prop-types'; | ||
import loadScript from 'load-script'; | ||
@@ -290,3 +290,3 @@ | ||
YouTube.prototype.render = function render() { | ||
return createElement('div', { | ||
return React.createElement('div', { | ||
id: this.props.id, | ||
@@ -299,3 +299,3 @@ className: this.props.className, | ||
return YouTube; | ||
}(Component); | ||
}(React.Component); | ||
@@ -302,0 +302,0 @@ YouTube.defaultProps = { |
@@ -7,3 +7,4 @@ 'use strict'; | ||
var React = require('react'); | ||
var React = _interopDefault(require('react')); | ||
var PropTypes = _interopDefault(require('prop-types')); | ||
var loadScript = _interopDefault(require('load-script')); | ||
@@ -322,19 +323,19 @@ | ||
*/ | ||
video: React.PropTypes.string, | ||
video: PropTypes.string, | ||
/** | ||
* DOM ID for the player element. | ||
*/ | ||
id: React.PropTypes.string, | ||
id: PropTypes.string, | ||
/** | ||
* CSS className for the player element. | ||
*/ | ||
className: React.PropTypes.string, | ||
className: PropTypes.string, | ||
/** | ||
* Width of the player element. | ||
*/ | ||
width: React.PropTypes.oneOfType([React.PropTypes.number, React.PropTypes.string]), | ||
width: PropTypes.oneOfType([PropTypes.number, PropTypes.string]), | ||
/** | ||
* Height of the player element. | ||
*/ | ||
height: React.PropTypes.oneOfType([React.PropTypes.number, React.PropTypes.string]), | ||
height: PropTypes.oneOfType([PropTypes.number, PropTypes.string]), | ||
@@ -344,3 +345,3 @@ /** | ||
*/ | ||
paused: React.PropTypes.bool, // eslint-disable-line react/no-unused-prop-types | ||
paused: PropTypes.bool, // eslint-disable-line react/no-unused-prop-types | ||
@@ -354,3 +355,3 @@ // Player parameters | ||
*/ | ||
autoplay: React.PropTypes.bool, | ||
autoplay: PropTypes.bool, | ||
/** | ||
@@ -361,3 +362,3 @@ * Whether to show captions below the video. | ||
*/ | ||
showCaptions: React.PropTypes.bool, | ||
showCaptions: PropTypes.bool, | ||
/** | ||
@@ -368,3 +369,3 @@ * Whether to show video controls. | ||
*/ | ||
controls: React.PropTypes.bool, | ||
controls: PropTypes.bool, | ||
/** | ||
@@ -375,3 +376,3 @@ * Ignore keyboard controls. | ||
*/ | ||
disableKeyboard: React.PropTypes.bool, | ||
disableKeyboard: PropTypes.bool, | ||
/** | ||
@@ -382,3 +383,3 @@ * Whether to display the fullscreen button. | ||
*/ | ||
allowFullscreen: React.PropTypes.bool, | ||
allowFullscreen: PropTypes.bool, | ||
/** | ||
@@ -390,3 +391,3 @@ * The player's interface language. The parameter value is an ISO 639-1 | ||
*/ | ||
lang: React.PropTypes.string, | ||
lang: PropTypes.string, | ||
/** | ||
@@ -397,3 +398,3 @@ * Whether to show annotations on top of the video. | ||
*/ | ||
annotations: React.PropTypes.bool, | ||
annotations: PropTypes.bool, | ||
/** | ||
@@ -404,3 +405,3 @@ * Time in seconds at which to start playing the video. | ||
*/ | ||
startSeconds: React.PropTypes.number, | ||
startSeconds: PropTypes.number, | ||
/** | ||
@@ -411,3 +412,3 @@ * Time in seconds at which to stop playing the video. | ||
*/ | ||
endSeconds: React.PropTypes.number, | ||
endSeconds: PropTypes.number, | ||
/** | ||
@@ -418,3 +419,3 @@ * Remove most YouTube logos from the player. | ||
*/ | ||
modestBranding: React.PropTypes.bool, | ||
modestBranding: PropTypes.bool, | ||
/** | ||
@@ -425,3 +426,3 @@ * Whether to play the video inline on iOS, instead of fullscreen. | ||
*/ | ||
playsInline: React.PropTypes.bool, | ||
playsInline: PropTypes.bool, | ||
/** | ||
@@ -432,3 +433,3 @@ * Whether to show related videos after the video is over. | ||
*/ | ||
showRelatedVideos: React.PropTypes.bool, | ||
showRelatedVideos: PropTypes.bool, | ||
/** | ||
@@ -440,3 +441,3 @@ * Whether to show video information (uploader, title, etc) before the video | ||
*/ | ||
showInfo: React.PropTypes.bool, | ||
showInfo: PropTypes.bool, | ||
@@ -446,3 +447,3 @@ /** | ||
*/ | ||
volume: React.PropTypes.number, | ||
volume: PropTypes.number, | ||
@@ -452,3 +453,3 @@ /** | ||
*/ | ||
muted: React.PropTypes.bool, | ||
muted: PropTypes.bool, | ||
@@ -460,3 +461,3 @@ /** | ||
*/ | ||
suggestedQuality: React.PropTypes.string, | ||
suggestedQuality: PropTypes.string, | ||
/** | ||
@@ -467,3 +468,3 @@ * Playback speed. | ||
*/ | ||
playbackRate: React.PropTypes.number, | ||
playbackRate: PropTypes.number, | ||
@@ -476,22 +477,22 @@ // Events | ||
*/ | ||
onReady: React.PropTypes.func, | ||
onReady: PropTypes.func, | ||
/** | ||
* Sent when the player triggers an error. | ||
*/ | ||
onError: React.PropTypes.func, | ||
onError: PropTypes.func, | ||
/** | ||
* Sent when playback has been started or resumed. | ||
*/ | ||
onPlay: React.PropTypes.func, | ||
onPlay: PropTypes.func, | ||
/** | ||
* Sent when playback has been paused. | ||
*/ | ||
onPause: React.PropTypes.func, | ||
onPause: PropTypes.func, | ||
/** | ||
* Sent when playback has stopped. | ||
*/ | ||
onEnd: React.PropTypes.func, | ||
onStateChange: React.PropTypes.func, | ||
onPlaybackRateChange: React.PropTypes.func, | ||
onPlaybackQualityChange: React.PropTypes.func | ||
onEnd: PropTypes.func, | ||
onStateChange: PropTypes.func, | ||
onPlaybackRateChange: PropTypes.func, | ||
onPlaybackQualityChange: PropTypes.func | ||
@@ -498,0 +499,0 @@ } : void 0; |
{ | ||
"name": "@u-wave/react-youtube", | ||
"version": "0.1.0", | ||
"version": "0.1.1", | ||
"description": "YouTube player component for React.", | ||
@@ -33,3 +33,4 @@ "main": "lib/rollup.js", | ||
"dependencies": { | ||
"load-script": "^1.0.0" | ||
"load-script": "^1.0.0", | ||
"prop-types": "^15.5.4" | ||
}, | ||
@@ -36,0 +37,0 @@ "peerDependencies": { |
@@ -1,3 +0,3 @@ | ||
import * as React from 'react'; | ||
import React from 'react'; | ||
import PropTypes from 'prop-types'; | ||
import eventNames from './eventNames'; | ||
@@ -11,17 +11,17 @@ import loadSdk from './loadSdk'; | ||
*/ | ||
video: React.PropTypes.string, | ||
video: PropTypes.string, | ||
/** | ||
* DOM ID for the player element. | ||
*/ | ||
id: React.PropTypes.string, | ||
id: PropTypes.string, | ||
/** | ||
* CSS className for the player element. | ||
*/ | ||
className: React.PropTypes.string, | ||
className: PropTypes.string, | ||
/** | ||
* Width of the player element. | ||
*/ | ||
width: React.PropTypes.oneOfType([ | ||
React.PropTypes.number, | ||
React.PropTypes.string, | ||
width: PropTypes.oneOfType([ | ||
PropTypes.number, | ||
PropTypes.string, | ||
]), | ||
@@ -31,5 +31,5 @@ /** | ||
*/ | ||
height: React.PropTypes.oneOfType([ | ||
React.PropTypes.number, | ||
React.PropTypes.string, | ||
height: PropTypes.oneOfType([ | ||
PropTypes.number, | ||
PropTypes.string, | ||
]), | ||
@@ -40,3 +40,3 @@ | ||
*/ | ||
paused: React.PropTypes.bool, // eslint-disable-line react/no-unused-prop-types | ||
paused: PropTypes.bool, // eslint-disable-line react/no-unused-prop-types | ||
@@ -50,3 +50,3 @@ // Player parameters | ||
*/ | ||
autoplay: React.PropTypes.bool, | ||
autoplay: PropTypes.bool, | ||
/** | ||
@@ -57,3 +57,3 @@ * Whether to show captions below the video. | ||
*/ | ||
showCaptions: React.PropTypes.bool, | ||
showCaptions: PropTypes.bool, | ||
/** | ||
@@ -64,3 +64,3 @@ * Whether to show video controls. | ||
*/ | ||
controls: React.PropTypes.bool, | ||
controls: PropTypes.bool, | ||
/** | ||
@@ -71,3 +71,3 @@ * Ignore keyboard controls. | ||
*/ | ||
disableKeyboard: React.PropTypes.bool, | ||
disableKeyboard: PropTypes.bool, | ||
/** | ||
@@ -78,3 +78,3 @@ * Whether to display the fullscreen button. | ||
*/ | ||
allowFullscreen: React.PropTypes.bool, | ||
allowFullscreen: PropTypes.bool, | ||
/** | ||
@@ -86,3 +86,3 @@ * The player's interface language. The parameter value is an ISO 639-1 | ||
*/ | ||
lang: React.PropTypes.string, | ||
lang: PropTypes.string, | ||
/** | ||
@@ -93,3 +93,3 @@ * Whether to show annotations on top of the video. | ||
*/ | ||
annotations: React.PropTypes.bool, | ||
annotations: PropTypes.bool, | ||
/** | ||
@@ -100,3 +100,3 @@ * Time in seconds at which to start playing the video. | ||
*/ | ||
startSeconds: React.PropTypes.number, | ||
startSeconds: PropTypes.number, | ||
/** | ||
@@ -107,3 +107,3 @@ * Time in seconds at which to stop playing the video. | ||
*/ | ||
endSeconds: React.PropTypes.number, | ||
endSeconds: PropTypes.number, | ||
/** | ||
@@ -114,3 +114,3 @@ * Remove most YouTube logos from the player. | ||
*/ | ||
modestBranding: React.PropTypes.bool, | ||
modestBranding: PropTypes.bool, | ||
/** | ||
@@ -121,3 +121,3 @@ * Whether to play the video inline on iOS, instead of fullscreen. | ||
*/ | ||
playsInline: React.PropTypes.bool, | ||
playsInline: PropTypes.bool, | ||
/** | ||
@@ -128,3 +128,3 @@ * Whether to show related videos after the video is over. | ||
*/ | ||
showRelatedVideos: React.PropTypes.bool, | ||
showRelatedVideos: PropTypes.bool, | ||
/** | ||
@@ -136,3 +136,3 @@ * Whether to show video information (uploader, title, etc) before the video | ||
*/ | ||
showInfo: React.PropTypes.bool, | ||
showInfo: PropTypes.bool, | ||
@@ -142,3 +142,3 @@ /** | ||
*/ | ||
volume: React.PropTypes.number, | ||
volume: PropTypes.number, | ||
@@ -148,3 +148,3 @@ /** | ||
*/ | ||
muted: React.PropTypes.bool, | ||
muted: PropTypes.bool, | ||
@@ -156,3 +156,3 @@ /** | ||
*/ | ||
suggestedQuality: React.PropTypes.string, | ||
suggestedQuality: PropTypes.string, | ||
/** | ||
@@ -163,3 +163,3 @@ * Playback speed. | ||
*/ | ||
playbackRate: React.PropTypes.number, | ||
playbackRate: PropTypes.number, | ||
@@ -172,22 +172,22 @@ // Events | ||
*/ | ||
onReady: React.PropTypes.func, | ||
onReady: PropTypes.func, | ||
/** | ||
* Sent when the player triggers an error. | ||
*/ | ||
onError: React.PropTypes.func, | ||
onError: PropTypes.func, | ||
/** | ||
* Sent when playback has been started or resumed. | ||
*/ | ||
onPlay: React.PropTypes.func, | ||
onPlay: PropTypes.func, | ||
/** | ||
* Sent when playback has been paused. | ||
*/ | ||
onPause: React.PropTypes.func, | ||
onPause: PropTypes.func, | ||
/** | ||
* Sent when playback has stopped. | ||
*/ | ||
onEnd: React.PropTypes.func, | ||
onStateChange: React.PropTypes.func, | ||
onPlaybackRateChange: React.PropTypes.func, | ||
onPlaybackQualityChange: React.PropTypes.func, | ||
onEnd: PropTypes.func, | ||
onStateChange: PropTypes.func, | ||
onPlaybackRateChange: PropTypes.func, | ||
onPlaybackQualityChange: PropTypes.func, | ||
@@ -364,7 +364,9 @@ /* eslint-enable react/no-unused-prop-types */ | ||
render() { | ||
return React.createElement('div', { | ||
id: this.props.id, | ||
className: this.props.className, | ||
ref: this.refContainer, | ||
}); | ||
return ( | ||
<div | ||
id={this.props.id} | ||
className={this.props.className} | ||
ref={this.refContainer} | ||
/> | ||
); | ||
} | ||
@@ -371,0 +373,0 @@ } |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
1400
125648
3
1
+ Addedprop-types@^15.5.4