@pie-element/ebsr 10.3.0 → 10.3.1-next.2

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/module/element.js CHANGED
@@ -13177,15 +13177,19 @@ class MultipleChoice extends HTMLElement {
13177
13177
  if (mutation.type === 'childList') {
13178
13178
  const audio = this.querySelector('audio[autoplay]');
13179
13179
  if (!audio) return;
13180
- if (audio.paused && !this.querySelector('#play-audio-info')) {
13181
- const info = this._createAudioInfoToast();
13182
- this.appendChild(info);
13183
- const enableAudio = () => {
13180
+ const info = this._createAudioInfoToast();
13181
+ const enableAudio = () => {
13182
+ if (this.querySelector('#play-audio-info')) {
13184
13183
  audio.play();
13185
13184
  this.removeChild(info);
13186
- document.removeEventListener('click', enableAudio);
13187
- };
13185
+ }
13186
+ document.removeEventListener('click', enableAudio);
13187
+ };
13188
+ if (audio.paused && !this.querySelector('#play-audio-info')) {
13189
+ this.appendChild(info);
13188
13190
  document.addEventListener('click', enableAudio);
13191
+ } else {
13192
+ document.removeEventListener('click', enableAudio);
13189
13193
  }
13190
13194
  const handlePlaying = () => {
13191
13195
  const info = this.querySelector('#play-audio-info');
package/module/index.html CHANGED
@@ -2,7 +2,7 @@
2
2
  <!doctype html>
3
3
  <html>
4
4
  <head>
5
- <title>@pie-element/ebsr@10.2.10</title>
5
+ <title>@pie-element/ebsr@10.3.0</title>
6
6
  <script
7
7
  type="module"
8
8
  src="https://cdn.jsdelivr.net/npm/@pslb/demo-el@^1.0.0/dist/demo-el/demo-el.esm.js"></script>
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pie-element/ebsr",
3
- "version": "10.2.10",
3
+ "version": "10.3.0",
4
4
  "modules": [
5
5
  {
6
6
  "name": "@pie-lib/pie-toolbox-math-rendering-module",
package/module/print.html CHANGED
@@ -2,7 +2,7 @@
2
2
  <!doctype html>
3
3
  <html>
4
4
  <head>
5
- <title>@pie-element/ebsr@10.2.10</title>
5
+ <title>@pie-element/ebsr@10.3.0</title>
6
6
  <link
7
7
  href="https://fonts.googleapis.com/css?family=Roboto&display=swap"
8
8
  rel="stylesheet"
package/module/print.js CHANGED
@@ -13177,15 +13177,19 @@ class MultipleChoice extends HTMLElement {
13177
13177
  if (mutation.type === 'childList') {
13178
13178
  const audio = this.querySelector('audio[autoplay]');
13179
13179
  if (!audio) return;
13180
- if (audio.paused && !this.querySelector('#play-audio-info')) {
13181
- const info = this._createAudioInfoToast();
13182
- this.appendChild(info);
13183
- const enableAudio = () => {
13180
+ const info = this._createAudioInfoToast();
13181
+ const enableAudio = () => {
13182
+ if (this.querySelector('#play-audio-info')) {
13184
13183
  audio.play();
13185
13184
  this.removeChild(info);
13186
- document.removeEventListener('click', enableAudio);
13187
- };
13185
+ }
13186
+ document.removeEventListener('click', enableAudio);
13187
+ };
13188
+ if (audio.paused && !this.querySelector('#play-audio-info')) {
13189
+ this.appendChild(info);
13188
13190
  document.addEventListener('click', enableAudio);
13191
+ } else {
13192
+ document.removeEventListener('click', enableAudio);
13189
13193
  }
13190
13194
  const handlePlaying = () => {
13191
13195
  const info = this.querySelector('#play-audio-info');
package/package.json CHANGED
@@ -1,13 +1,13 @@
1
1
  {
2
2
  "name": "@pie-element/ebsr",
3
- "version": "10.3.0",
3
+ "version": "10.3.1-next.2+38f4e6996",
4
4
  "description": "",
5
5
  "repository": "pie-framework/pie-elements",
6
6
  "publishConfig": {
7
7
  "access": "public"
8
8
  },
9
9
  "dependencies": {
10
- "@pie-element/multiple-choice": "^9.8.0",
10
+ "@pie-element/multiple-choice": "^9.8.1-next.2+38f4e6996",
11
11
  "@pie-framework/pie-player-events": "^0.1.0",
12
12
  "@pie-lib/pie-toolbox": "2.8.0",
13
13
  "classnames": "^2.2.5",
@@ -16,7 +16,7 @@
16
16
  },
17
17
  "author": "pie framework developers",
18
18
  "license": "ISC",
19
- "gitHead": "ac4892aa3eee85acd69c77a3b82dc9b3849dbace",
19
+ "gitHead": "38f4e69968e175252514fcb86f923eeb8d68d45b",
20
20
  "scripts": {
21
21
  "postpublish": "../../scripts/postpublish"
22
22
  },