@jaaq/jaaq-sdk-js 1.1.1-dev-44962de-20251219 → 1.1.1-dev-e4e4d9c-20251219

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/ui/index.cjs CHANGED
@@ -247,6 +247,9 @@ class JaaqVideoPlayer {
247
247
  this.createDOM();
248
248
  await this.loadVideo();
249
249
  this.attachEventListeners();
250
+ if (this.config.startMuted === true) {
251
+ this.updateVolumeUI();
252
+ }
250
253
  }
251
254
  createDOM() {
252
255
  this.container.innerHTML = '';
@@ -260,6 +263,7 @@ class JaaqVideoPlayer {
260
263
  this.videoElement = video;
261
264
  if (this.config.startMuted === true) {
262
265
  video.muted = true;
266
+ video.setAttribute('muted', '');
263
267
  }
264
268
  player.appendChild(video);
265
269
  const logo = document.createElement('div');
@@ -392,9 +396,14 @@ class JaaqVideoPlayer {
392
396
  });
393
397
  if (this.config.startMuted === true && this.videoElement) {
394
398
  this.videoElement.muted = true;
399
+ this.videoElement.setAttribute('muted', '');
395
400
  }
396
401
  hls.loadSource(videoUrl);
397
402
  hls.attachMedia(this.videoElement);
403
+ if (this.config.startMuted === true && this.videoElement) {
404
+ this.videoElement.muted = true;
405
+ this.videoElement.setAttribute('muted', '');
406
+ }
398
407
  hls.on(Hls.Events.MANIFEST_PARSED, () => {
399
408
  this.setState({ isLoading: false });
400
409
  if (this.elements.loading) {
@@ -402,10 +411,16 @@ class JaaqVideoPlayer {
402
411
  }
403
412
  if (this.config.startMuted === true && this.videoElement) {
404
413
  this.videoElement.muted = true;
414
+ this.videoElement.setAttribute('muted', '');
415
+ this.setState({ isMuted: true });
416
+ this.updateVolumeUI();
405
417
  }
406
418
  if (this.config.autoplay) {
407
419
  if (this.config.startMuted === true && this.videoElement) {
408
420
  this.videoElement.muted = true;
421
+ this.videoElement.setAttribute('muted', '');
422
+ this.setState({ isMuted: true });
423
+ this.updateVolumeUI();
409
424
  }
410
425
  this.play();
411
426
  }
@@ -423,6 +438,9 @@ class JaaqVideoPlayer {
423
438
  this.videoElement.src = videoUrl;
424
439
  if (this.config.startMuted === true) {
425
440
  this.videoElement.muted = true;
441
+ this.videoElement.setAttribute('muted', '');
442
+ this.setState({ isMuted: true });
443
+ this.updateVolumeUI();
426
444
  }
427
445
  this.setState({ isLoading: false });
428
446
  if (this.elements.loading) {
@@ -431,6 +449,9 @@ class JaaqVideoPlayer {
431
449
  if (this.config.autoplay) {
432
450
  if (this.config.startMuted === true && this.videoElement) {
433
451
  this.videoElement.muted = true;
452
+ this.videoElement.setAttribute('muted', '');
453
+ this.setState({ isMuted: true });
454
+ this.updateVolumeUI();
434
455
  }
435
456
  this.play();
436
457
  }
@@ -443,6 +464,9 @@ class JaaqVideoPlayer {
443
464
  this.videoElement.src = videoUrl;
444
465
  if (this.config.startMuted === true) {
445
466
  this.videoElement.muted = true;
467
+ this.videoElement.setAttribute('muted', '');
468
+ this.setState({ isMuted: true });
469
+ this.updateVolumeUI();
446
470
  }
447
471
  this.setState({ isLoading: false });
448
472
  if (this.elements.loading) {
@@ -451,6 +475,9 @@ class JaaqVideoPlayer {
451
475
  if (this.config.autoplay) {
452
476
  if (this.config.startMuted === true && this.videoElement) {
453
477
  this.videoElement.muted = true;
478
+ this.videoElement.setAttribute('muted', '');
479
+ this.setState({ isMuted: true });
480
+ this.updateVolumeUI();
454
481
  }
455
482
  this.play();
456
483
  }
@@ -719,7 +746,14 @@ class JaaqVideoPlayer {
719
746
  * Starts or resumes video playback
720
747
  */
721
748
  play() {
722
- this.videoElement?.play();
749
+ if (this.videoElement) {
750
+ if (this.config.startMuted === true && !this.videoElement.muted) {
751
+ this.videoElement.muted = true;
752
+ this.videoElement.setAttribute('muted', '');
753
+ this.setState({ isMuted: true });
754
+ }
755
+ this.videoElement.play();
756
+ }
723
757
  }
724
758
  /**
725
759
  * Pauses video playback
@@ -761,7 +795,14 @@ class JaaqVideoPlayer {
761
795
  }
762
796
  if (features.startMuted !== undefined && this.videoElement) {
763
797
  this.videoElement.muted = features.startMuted === true;
798
+ if (features.startMuted === true) {
799
+ this.videoElement.setAttribute('muted', '');
800
+ }
801
+ else {
802
+ this.videoElement.removeAttribute('muted');
803
+ }
764
804
  this.setState({ isMuted: features.startMuted === true });
805
+ this.updateVolumeUI();
765
806
  }
766
807
  if (this.state.videoData) {
767
808
  this.updateOverlayContent(this.state.videoData);