@eluvio/elv-player-js 1.0.74 → 1.0.77
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/package.json +2 -2
- package/src/index.js +8 -0
package/package.json
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@eluvio/elv-player-js",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.77",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "src/index.js",
|
|
6
6
|
"license": "MIT",
|
|
7
|
-
"homepage": "https://github.com/eluv-io/elv-
|
|
7
|
+
"homepage": "https://github.com/eluv-io/elv-player-js",
|
|
8
8
|
"scripts": {
|
|
9
9
|
"bump-version": "npm --git-tag-version --no-commit-hooks version patch",
|
|
10
10
|
"serve": "TEST_PAGE=true webpack-dev-server --hot --port 8089 --host=0.0.0.0 --disable-host-check --useLocalIp",
|
package/src/index.js
CHANGED
|
@@ -46,6 +46,7 @@ export const EluvioPlayerParameters = {
|
|
|
46
46
|
muted: {
|
|
47
47
|
OFF: false,
|
|
48
48
|
WHEN_NOT_VISIBLE: "when_not_visible",
|
|
49
|
+
OFF_IF_POSSIBLE: "off_if_possible",
|
|
49
50
|
ON: true
|
|
50
51
|
},
|
|
51
52
|
watermark: {
|
|
@@ -738,6 +739,13 @@ export class EluvioPlayer {
|
|
|
738
739
|
|
|
739
740
|
if(this.playerOptions.autoplay === EluvioPlayerParameters.autoplay.ON) {
|
|
740
741
|
this.video.play();
|
|
742
|
+
|
|
743
|
+
setTimeout(() => {
|
|
744
|
+
if(this.playerOptions.muted === EluvioPlayerParameters.muted.OFF_IF_POSSIBLE && this.video.paused && !this.video.muted) {
|
|
745
|
+
this.video.muted = true;
|
|
746
|
+
this.video.play();
|
|
747
|
+
}
|
|
748
|
+
}, 250);
|
|
741
749
|
}
|
|
742
750
|
|
|
743
751
|
this.RegisterVisibilityCallback();
|