@folklore/hooks 0.0.39 → 0.0.41
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs.js +11 -4
- package/dist/es.js +11 -4
- package/package.json +2 -2
package/dist/cjs.js
CHANGED
|
@@ -1535,6 +1535,9 @@ function useYouTubePlayer(id) {
|
|
|
1535
1535
|
});
|
|
1536
1536
|
}
|
|
1537
1537
|
debug('onReady [ID: %s]', videoId);
|
|
1538
|
+
if (muted) {
|
|
1539
|
+
player.mute();
|
|
1540
|
+
}
|
|
1538
1541
|
};
|
|
1539
1542
|
const onStateChange = _ref2 => {
|
|
1540
1543
|
let {
|
|
@@ -1659,24 +1662,28 @@ function useVideoPlayer(params) {
|
|
|
1659
1662
|
if (playing && customOnPlay !== null) {
|
|
1660
1663
|
customOnPlay();
|
|
1661
1664
|
}
|
|
1662
|
-
}, [playing, customOnPlay]);
|
|
1665
|
+
}, [playing /* , customOnPlay */]);
|
|
1666
|
+
|
|
1663
1667
|
react.useEffect(() => {
|
|
1664
1668
|
if (paused && customOnPause !== null) {
|
|
1665
1669
|
customOnPause();
|
|
1666
1670
|
}
|
|
1667
|
-
}, [paused, customOnPause]);
|
|
1671
|
+
}, [paused /* , customOnPause */]);
|
|
1672
|
+
|
|
1668
1673
|
react.useEffect(() => {
|
|
1669
1674
|
if (buffering && customOnBufferStart !== null) {
|
|
1670
1675
|
customOnBufferStart();
|
|
1671
1676
|
} else if (!buffering && customOnBufferEnded !== null) {
|
|
1672
1677
|
customOnBufferEnded();
|
|
1673
1678
|
}
|
|
1674
|
-
}, [buffering, customOnBufferStart, customOnBufferEnded]);
|
|
1679
|
+
}, [buffering /* , customOnBufferStart, customOnBufferEnded */]);
|
|
1680
|
+
|
|
1675
1681
|
react.useEffect(() => {
|
|
1676
1682
|
if (ended && customOnEnd !== null) {
|
|
1677
1683
|
customOnEnd();
|
|
1678
1684
|
}
|
|
1679
|
-
}, [ended, customOnEnd]);
|
|
1685
|
+
}, [ended /* , customOnEnd */]);
|
|
1686
|
+
|
|
1680
1687
|
react.useEffect(() => {
|
|
1681
1688
|
const hasMetadata = metaWidth !== null || metaHeight !== null || metaDuration !== null;
|
|
1682
1689
|
if (hasMetadata && customOnMetadataChange !== null) {
|
package/dist/es.js
CHANGED
|
@@ -1524,6 +1524,9 @@ function useYouTubePlayer(id) {
|
|
|
1524
1524
|
});
|
|
1525
1525
|
}
|
|
1526
1526
|
debug('onReady [ID: %s]', videoId);
|
|
1527
|
+
if (muted) {
|
|
1528
|
+
player.mute();
|
|
1529
|
+
}
|
|
1527
1530
|
};
|
|
1528
1531
|
const onStateChange = _ref2 => {
|
|
1529
1532
|
let {
|
|
@@ -1648,24 +1651,28 @@ function useVideoPlayer(params) {
|
|
|
1648
1651
|
if (playing && customOnPlay !== null) {
|
|
1649
1652
|
customOnPlay();
|
|
1650
1653
|
}
|
|
1651
|
-
}, [playing, customOnPlay]);
|
|
1654
|
+
}, [playing /* , customOnPlay */]);
|
|
1655
|
+
|
|
1652
1656
|
useEffect(() => {
|
|
1653
1657
|
if (paused && customOnPause !== null) {
|
|
1654
1658
|
customOnPause();
|
|
1655
1659
|
}
|
|
1656
|
-
}, [paused, customOnPause]);
|
|
1660
|
+
}, [paused /* , customOnPause */]);
|
|
1661
|
+
|
|
1657
1662
|
useEffect(() => {
|
|
1658
1663
|
if (buffering && customOnBufferStart !== null) {
|
|
1659
1664
|
customOnBufferStart();
|
|
1660
1665
|
} else if (!buffering && customOnBufferEnded !== null) {
|
|
1661
1666
|
customOnBufferEnded();
|
|
1662
1667
|
}
|
|
1663
|
-
}, [buffering, customOnBufferStart, customOnBufferEnded]);
|
|
1668
|
+
}, [buffering /* , customOnBufferStart, customOnBufferEnded */]);
|
|
1669
|
+
|
|
1664
1670
|
useEffect(() => {
|
|
1665
1671
|
if (ended && customOnEnd !== null) {
|
|
1666
1672
|
customOnEnd();
|
|
1667
1673
|
}
|
|
1668
|
-
}, [ended, customOnEnd]);
|
|
1674
|
+
}, [ended /* , customOnEnd */]);
|
|
1675
|
+
|
|
1669
1676
|
useEffect(() => {
|
|
1670
1677
|
const hasMetadata = metaWidth !== null || metaHeight !== null || metaDuration !== null;
|
|
1671
1678
|
if (hasMetadata && customOnMetadataChange !== null) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@folklore/hooks",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.41",
|
|
4
4
|
"description": "React hooks",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"javascript",
|
|
@@ -49,7 +49,7 @@
|
|
|
49
49
|
"publishConfig": {
|
|
50
50
|
"access": "public"
|
|
51
51
|
},
|
|
52
|
-
"gitHead": "
|
|
52
|
+
"gitHead": "4b648e2f55b26852ed2edd73acabae9402594fc2",
|
|
53
53
|
"dependencies": {
|
|
54
54
|
"@folklore/events": "^0.0.5",
|
|
55
55
|
"@folklore/services": "^0.1.38",
|