Skip to content

Commit

Permalink
Merge branch 'release/0.4.6'
Browse files Browse the repository at this point in the history
  • Loading branch information
jhonatangcavalcanti committed Oct 8, 2021
2 parents e27deca + 844ad99 commit a574995
Show file tree
Hide file tree
Showing 11 changed files with 111 additions and 49 deletions.
14 changes: 14 additions & 0 deletions README.md
Expand Up @@ -34,6 +34,7 @@ Clappr is under development but production-ready. Feel free to open issues and s
* [Built-in Plugins](https://github.com/clappr/clappr#electric_plug-built-in-plugins)
* [Third party plugins/integrations](https://github.com/clappr/clappr#handshake-third-party-pluginsintegrations)
* [Supported Formats](https://github.com/clappr/clappr#film_strip-supported-formats)
* [About Autoplay](https://github.com/clappr/clappr#play_or_pause_button-about-autoplay)
* [FAQ & Troubleshooting](https://github.com/clappr/clappr#interrobang-faq--troubleshooting)
* [Companies using Clappr](https://github.com/clappr/clappr#rocket-companies-using-clappr)
* [Contributors](https://github.com/clappr/clappr#raised_hands-contributors)
Expand Down Expand Up @@ -135,6 +136,19 @@ PS4 Browser | ✔ | ✔ | ✘ | ? | ![rtmp](http://flv.io/external3.png) | !

![rtmp](http://flv.io/external3.png) means that the support is made by an external plugin.

:play_or_pause_button: About Autoplay
---
**Clappr has no control over `autoplay` Browser Policy.**

Therefore, we're not able to execute play and unmute actions sequentially in every situation. There are a series of scenarios where the Browser blocks these actions based on it’s own policy.

Each browser has their own different restrictions, and the usual behavior is to activate the sound only after an user interaction with the player.

For more infos about auto play video policy, you can read these docs:

- [Chrome Autoplay Policy](https://developers.google.com/web/updates/2017/09/autoplay-policy-changes)
- [WebKit Autoplay Policy](https://webkit.org/blog/7734/auto-play-policy-changes-for-macos/)

:interrobang: FAQ & Troubleshooting
---
### How to write a plugin?
Expand Down
62 changes: 43 additions & 19 deletions dist/clappr.js
Expand Up @@ -4308,6 +4308,8 @@
Events.CONTAINER_CONTEXTMENU = 'container:contextmenu';
Events.CONTAINER_MOUSE_ENTER = 'container:mouseenter';
Events.CONTAINER_MOUSE_LEAVE = 'container:mouseleave';
Events.CONTAINER_MOUSE_UP = 'container:mouseup';
Events.CONTAINER_MOUSE_DOWN = 'container:mousedown';
/**
* Fired when the container seeks the video
*
Expand Down Expand Up @@ -5069,7 +5071,9 @@
'touchend': 'dblTap',
'contextmenu': 'onContextMenu',
'mouseenter': 'mouseEnter',
'mouseleave': 'mouseLeave'
'mouseleave': 'mouseLeave',
'mouseup': 'onMouseUp',
'mousedown': 'onMouseDown'
};
}
/**
Expand Down Expand Up @@ -5564,6 +5568,16 @@
value: function mouseLeave() {
if (!this.options.chromeless || this.options.allowUserInteraction) this.trigger(Events.CONTAINER_MOUSE_LEAVE);
}
}, {
key: "mouseUp",
value: function mouseUp() {
if (!this.options.chromeless || this.options.allowUserInteraction) this.trigger(Events.CONTAINER_MOUSE_UP);
}
}, {
key: "mouseDown",
value: function mouseDown() {
if (!this.options.chromeless || this.options.allowUserInteraction) this.trigger(Events.CONTAINER_MOUSE_DOWN);
}
}, {
key: "settingsUpdate",
value: function settingsUpdate() {
Expand Down Expand Up @@ -6823,7 +6837,7 @@
plugins: {},
playbacks: []
};
var currentVersion = "0.4.18";
var currentVersion = "0.4.19";
return /*#__PURE__*/function () {
_createClass$2(Loader, null, [{
key: "checkVersionSupport",
Expand Down Expand Up @@ -7994,7 +8008,7 @@
key: "supportedVersion",
get: function get() {
return {
min: "0.4.18"
min: "0.4.19"
};
}
}, {
Expand Down Expand Up @@ -8565,20 +8579,30 @@
}, {
key: "getDuration",
value: function getDuration() {
var _this4 = this;

if (this.isLive) {
try {
if (this.el.seekable.length > 0) {
return this.el.seekable.end(0) - this.el.seekable.start(0);
} catch (e) {
setTimeout(function () {
return _this4._updateSettings();
}, 1000);
} else {
// `seekable` is not available; this is probably OK, but make sure we're
// updating the control bar to reflect it
this._scheduleUpdateSettingsCheck();
}
}

return this.el.duration;
}
}, {
key: "_scheduleUpdateSettingsCheck",
value: function _scheduleUpdateSettingsCheck() {
var _this4 = this;

if (this._updateSettingsCheckInFlight) return;
this._updateSettingsCheckInFlight = setTimeout(function () {
_this4._updateSettings();

_this4._updateSettingsCheckInFlight = null;
}, 1000);
}
}, {
key: "_onTimeUpdate",
value: function _onTimeUpdate() {
Expand Down Expand Up @@ -8805,7 +8829,7 @@
key: "supportedVersion",
get: function get() {
return {
min: "0.4.18"
min: "0.4.19"
};
}
}, {
Expand Down Expand Up @@ -8854,7 +8878,7 @@
key: "supportedVersion",
get: function get() {
return {
min: "0.4.18"
min: "0.4.19"
};
}
}, {
Expand Down Expand Up @@ -8940,7 +8964,7 @@
key: "supportedVersion",
get: function get() {
return {
min: "0.4.18"
min: "0.4.19"
};
}
}, {
Expand Down Expand Up @@ -9090,7 +9114,7 @@
key: "supportedVersion",
get: function get() {
return {
min: "0.4.18"
min: "0.4.19"
};
}
}]);
Expand Down Expand Up @@ -9247,7 +9271,7 @@
key: "supportedVersion",
get: function get() {
return {
min: "0.4.18"
min: "0.4.19"
};
}
}]);
Expand All @@ -9256,7 +9280,7 @@
}(CorePlugin);

// Copyright 2014 Globo.com Player authors. All rights reserved.
var version$1 = "0.4.18"; // Built-in Plugins/Playbacks
var version$1 = "0.4.19"; // Built-in Plugins/Playbacks

Loader.registerPlugin(Strings);
Loader.registerPlugin(SourcesPlugin);
Expand Down Expand Up @@ -12330,7 +12354,7 @@
WaterMark: WaterMarkPlugin
};

var version = "0.4.5";
var version = "0.4.6";

for (var _i = 0, _Object$values = Object.values(Plugins); _i < _Object$values.length; _i++) {
var plugin = _Object$values[_i];
Expand Down Expand Up @@ -19824,7 +19848,7 @@
/|#EXT-X-PROGRAM-DATE-TIME:(.+)/.source, // next segment's program date/time group 5 => the datetime spec
/|#.*/.source // All other non-segment oriented tags will match with all groups empty
].join(''), 'g');
var LEVEL_PLAYLIST_REGEX_SLOW = /(?:(?:#(EXTM3U))|(?:#EXT-X-(PLAYLIST-TYPE):(.+))|(?:#EXT-X-(MEDIA-SEQUENCE): *(\d+))|(?:#EXT-X-(TARGETDURATION): *(\d+))|(?:#EXT-X-(KEY):(.+))|(?:#EXT-X-(START):(.+))|(?:#EXT-X-(ENDLIST))|(?:#EXT-X-(DISCONTINUITY-SEQ)UENCE:(\d+))|(?:#EXT-X-(DIS)CONTINUITY))|(?:#EXT-X-("0.4.5"):(\d+))|(?:#EXT-X-(MAP):(.+))|(?:(#)([^:]*):(.*))|(?:(#)(.*))(?:.*)\r?\n?/;
var LEVEL_PLAYLIST_REGEX_SLOW = /(?:(?:#(EXTM3U))|(?:#EXT-X-(PLAYLIST-TYPE):(.+))|(?:#EXT-X-(MEDIA-SEQUENCE): *(\d+))|(?:#EXT-X-(TARGETDURATION): *(\d+))|(?:#EXT-X-(KEY):(.+))|(?:#EXT-X-(START):(.+))|(?:#EXT-X-(ENDLIST))|(?:#EXT-X-(DISCONTINUITY-SEQ)UENCE:(\d+))|(?:#EXT-X-(DIS)CONTINUITY))|(?:#EXT-X-("0.4.6"):(\d+))|(?:#EXT-X-(MAP):(.+))|(?:(#)([^:]*):(.*))|(?:(#)(.*))(?:.*)\r?\n?/;
var MP4_REGEX_SUFFIX = /\.(mp4|m4s|m4v|m4a)$/i;

var m3u8_parser_M3U8Parser = /*#__PURE__*/function () {
Expand Down Expand Up @@ -20076,7 +20100,7 @@
level.targetduration = parseFloat(value1);
break;

case '"0.4.5"':
case '"0.4.6"':
level.version = parseInt(value1);
break;

Expand Down
2 changes: 1 addition & 1 deletion dist/clappr.js.map

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions dist/clappr.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/clappr.min.js.map

Large diffs are not rendered by default.

58 changes: 41 additions & 17 deletions dist/clappr.plainhtml5.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/clappr.plainhtml5.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/clappr.plainhtml5.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/clappr.plainhtml5.min.js.map

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions package.json
@@ -1,6 +1,6 @@
{
"name": "@clappr/player",
"version": "0.4.5",
"version": "0.4.6",
"description": "An extensible media player for the web",
"main": "dist/clappr.js",
"scripts": {
Expand Down Expand Up @@ -34,7 +34,7 @@
"devDependencies": {
"@babel/core": "^7.14.2",
"@babel/preset-env": "^7.14.2",
"@clappr/core": "^0.4.18",
"@clappr/core": "^0.4.19",
"@clappr/hlsjs-playback": "^0.6.0",
"@clappr/plugins": "^0.4.13",
"@rollup/plugin-babel": "^5.3.0",
Expand Down
8 changes: 4 additions & 4 deletions yarn.lock
Expand Up @@ -874,10 +874,10 @@
"@babel/helper-validator-identifier" "^7.14.0"
to-fast-properties "^2.0.0"

"@clappr/core@^0.4.18":
version "0.4.18"
resolved "https://registry.yarnpkg.com/@clappr/core/-/core-0.4.18.tgz#7becc6c32f2a48a097d1ca158dbda0169f7979ce"
integrity sha512-MMZ6j2+pbtoo/dPi9nyo/dAfW3u0D3np7mpT0VHNNjy+K8qZZAlyF2kYNHjwqyj6pRY0kRWj4KMXA5SUMR7Zyg==
"@clappr/core@^0.4.19":
version "0.4.19"
resolved "https://registry.yarnpkg.com/@clappr/core/-/core-0.4.19.tgz#e07fe99ce5c2655d781ce2c0773b47900babda1c"
integrity sha512-DMSlXOUbTnexrXxBMr0KBJqRD9VtaQijAr5YPIqdjnzVLs4qNkGtqWnFmkLscLFPlXCbIRTpD0FjCTyeUYmS0Q==

"@clappr/hlsjs-playback@^0.6.0":
version "0.6.0"
Expand Down

0 comments on commit a574995

Please sign in to comment.