shaka-player 3.3.9 → 3.3.10

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/lib/player.js CHANGED
@@ -4433,6 +4433,12 @@ shaka.Player = class extends shaka.util.FakeEventTarget {
4433
4433
  this.stats_.setBandwidthEstimate(estimate);
4434
4434
  }
4435
4435
 
4436
+ if (this.loadMode_ == shaka.Player.LoadMode.SRC_EQUALS) {
4437
+ this.stats_.setResolution(
4438
+ /* width= */ element.videoWidth || NaN,
4439
+ /* height= */ element.videoHeight || NaN);
4440
+ }
4441
+
4436
4442
  return this.stats_.getBlob();
4437
4443
  }
4438
4444
 
@@ -6629,7 +6635,7 @@ shaka.Player.TYPICAL_BUFFERING_THRESHOLD_ = 0.5;
6629
6635
  * @define {string} A version number taken from git at compile time.
6630
6636
  * @export
6631
6637
  */
6632
- shaka.Player.version = 'v3.3.9-uncompiled';
6638
+ shaka.Player.version = 'v3.3.10-uncompiled';
6633
6639
 
6634
6640
  // Initialize the deprecation system using the version string we just set
6635
6641
  // on the player.
@@ -498,6 +498,14 @@ shaka.text.UITextDisplayer = class {
498
498
  style.backgroundRepeat = 'no-repeat';
499
499
  style.backgroundSize = 'contain';
500
500
  style.backgroundPosition = 'center';
501
+
502
+ // Quoting https://www.w3.org/TR/ttml-imsc1.2/:
503
+ // "The width and height (in pixels) of the image resource referenced by
504
+ // smpte:backgroundImage SHALL be equal to the width and height expressed
505
+ // by the tts:extent attribute of the region in which the div element is
506
+ // presented".
507
+ style.width = '100%';
508
+ style.height = '100%';
501
509
  } else {
502
510
  // If we have both text and nested cues, then style everything; otherwise
503
511
  // place the text in its own <span> so the background doesn't fill the
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "shaka-player",
3
3
  "description": "DASH/EME video player library",
4
- "version": "3.3.9",
4
+ "version": "3.3.10",
5
5
  "homepage": "https://github.com/shaka-project/shaka-player",
6
6
  "author": "Google",
7
7
  "maintainers": [
@@ -305,6 +305,8 @@ describe('Player Src Equals', () => {
305
305
  expect(stats.loadLatency).toBeGreaterThan(0);
306
306
  expect(stats.manifestTimeSeconds).toBeNaN(); // There's no manifest.
307
307
  expect(stats.drmTimeSeconds).toBeNaN(); // There's no DRM.
308
+ expect(stats.height).toBe(110);
309
+ expect(stats.width).toBe(256);
308
310
  });
309
311
 
310
312
  it('plays with external text tracks', async () => {
Binary file
@@ -71,6 +71,10 @@
71
71
  .ad-text-shadow();
72
72
  }
73
73
 
74
+ .shaka-ad-controls .shaka-ad-position:not(.shaka-hidden) + .shaka-ad-counter {
75
+ margin-left: 0.75em;
76
+ }
77
+
74
78
  .shaka-skip-ad-container {
75
79
  /* Skip button is positioned at the very right edge of the
76
80
  * video container unlike the rest of the bottom controls. */