@brightspace-ui/labs 2.56.2 → 2.56.3

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 CHANGED
@@ -112,5 +112,5 @@
112
112
  "parse-srt": "^1.0.0-alpha",
113
113
  "webvtt-parser": "^2"
114
114
  },
115
- "version": "2.56.2"
115
+ "version": "2.56.3"
116
116
  }
@@ -80,14 +80,12 @@ class AttributePicker extends ArrowKeysMixin(LocalizeLabsElement(LitElement)) {
80
80
  display: none;
81
81
  }
82
82
  .d2l-attribute-picker-container {
83
- padding: 5px;
84
- }
85
- .d2l-attribute-picker-container:hover,
86
- .d2l-attribute-picker-container:focus-within {
87
- padding: 4px;
83
+ --d2l-input-padding: 5px;
84
+ --d2l-input-padding-focus: 4px;
88
85
  }
89
86
  .d2l-attribute-picker-container:focus-within {
90
87
  border: 2px solid var(--d2l-color-celestine);
88
+ padding: var(--d2l-input-padding-focus);
91
89
  }
92
90
  [aria-invalid="true"].d2l-attribute-picker-container:focus-within {
93
91
  border-color: var(--d2l-color-cinnabar);
@@ -661,6 +661,7 @@ class MediaPlayer extends LocalizeLabsElement(RtlMixin(LitElement)) {
661
661
  };
662
662
  this.afterCaptions = [];
663
663
  this.beforeCaptions = [];
664
+ this._iosVideoFullscreen = false;
664
665
  }
665
666
 
666
667
  get currentTime() {
@@ -825,14 +826,13 @@ class MediaPlayer extends LocalizeLabsElement(RtlMixin(LitElement)) {
825
826
  ${this.transcriptViewerOn ? this._renderTranscriptViewer() : ''}
826
827
  ${this._getMediaAreaView()}
827
828
 
828
- ${this.isIOSVideo ? null : html`
829
- ${!this._trackText || this.transcriptViewerOn ? null : html`
829
+ ${!this._trackText || this.transcriptViewerOn ? null : html`
830
830
  <div id="d2l-labs-media-player-track-container" style=${styleMap(trackContainerStyle)} @click=${this._onTrackContainerClick}>
831
831
  <div>
832
832
  <span style=${styleMap(trackSpanStyle)} role="status">${this._trackText}</span>
833
833
  </div>
834
834
  </div>
835
- `}
835
+ `}
836
836
 
837
837
  <div class=${classMap(mediaControlsClass)} id="d2l-labs-media-player-media-controls" @mouseenter=${this._startHoveringControls} @mouseleave=${this._stopHoveringControls}>
838
838
  ${this._getTimelinePreview()}
@@ -948,7 +948,7 @@ class MediaPlayer extends LocalizeLabsElement(RtlMixin(LitElement)) {
948
948
  ${fullscreenButton}
949
949
 
950
950
  </div>
951
- </div>`}
951
+ </div>
952
952
  </div>
953
953
  `;
954
954
  }
@@ -1035,6 +1035,10 @@ class MediaPlayer extends LocalizeLabsElement(RtlMixin(LitElement)) {
1035
1035
 
1036
1036
  #searchTimeout = null;
1037
1037
 
1038
+ _beginIOSVideoFullscreen() {
1039
+ this._iosVideoFullscreen = true;
1040
+ }
1041
+
1038
1042
  _clearPreference(preferenceKey) {
1039
1043
  localStorage.removeItem(preferenceKey);
1040
1044
  }
@@ -1064,6 +1068,10 @@ class MediaPlayer extends LocalizeLabsElement(RtlMixin(LitElement)) {
1064
1068
  this.dispatchEvent(new CustomEvent('download-transcript', { bubbles: true, composed: true }));
1065
1069
  }
1066
1070
 
1071
+ _endIOSVideoFullscreen() {
1072
+ this._iosVideoFullscreen = false;
1073
+ }
1074
+
1067
1075
  static _formatTime(totalSeconds) {
1068
1076
  totalSeconds = Math.floor(totalSeconds);
1069
1077
 
@@ -1197,7 +1205,8 @@ class MediaPlayer extends LocalizeLabsElement(RtlMixin(LitElement)) {
1197
1205
  ${this._getPosterView()}
1198
1206
  <video
1199
1207
  id="d2l-labs-media-player-video"
1200
- ?controls="${IS_IOS}"
1208
+ playsinline
1209
+ webkit-playsinline
1201
1210
  ?autoplay="${this.autoplay}"
1202
1211
  ?loop="${this.loop}"
1203
1212
  crossorigin="${ifDefined(this.crossorigin)}"
@@ -1215,6 +1224,8 @@ class MediaPlayer extends LocalizeLabsElement(RtlMixin(LitElement)) {
1215
1224
  tabindex="-1"
1216
1225
  @timeupdate=${this._onTimeUpdate}
1217
1226
  @volumechange=${this._onVolumeChange}
1227
+ @webkitbeginfullscreen=${this._beginIOSVideoFullscreen}
1228
+ @webkitendfullscreen=${this._endIOSVideoFullscreen}
1218
1229
  >
1219
1230
  <source @error=${this._onError}>
1220
1231
  </video>
@@ -1493,7 +1504,7 @@ class MediaPlayer extends LocalizeLabsElement(RtlMixin(LitElement)) {
1493
1504
 
1494
1505
  _hidingCustomControls() {
1495
1506
  const settingsMenuOpened = this._settingsMenu && this._settingsMenu.opened;
1496
- return this.isIOSVideo || (this._playing && !this._recentlyShowedCustomControls && !this._hoveringMediaControls && !settingsMenuOpened && !this._usingVolumeContainer && this.mediaType === SOURCE_TYPES.video);
1507
+ return (this._playing && !this._recentlyShowedCustomControls && !this._hoveringMediaControls && !settingsMenuOpened && !this._usingVolumeContainer && this.mediaType === SOURCE_TYPES.video);
1497
1508
  }
1498
1509
 
1499
1510
  _listenForKeyboard(e) {
@@ -2216,14 +2227,23 @@ class MediaPlayer extends LocalizeLabsElement(RtlMixin(LitElement)) {
2216
2227
  }
2217
2228
 
2218
2229
  _toggleFullscreen() {
2219
- if (!FULLSCREEN_ENABLED) return;
2220
-
2221
2230
  if (this.mediaType !== SOURCE_TYPES.video) return;
2222
2231
 
2223
- if (fullscreenApi.isFullscreen) {
2224
- fullscreenApi.exit();
2225
- } else {
2226
- fullscreenApi.request(this._mediaContainer);
2232
+ if (FULLSCREEN_ENABLED) {
2233
+ if (fullscreenApi.isFullscreen) {
2234
+ fullscreenApi.exit();
2235
+ } else {
2236
+ fullscreenApi.request(this._mediaContainer);
2237
+ }
2238
+ return;
2239
+ }
2240
+
2241
+ if (this.isIOSVideo) {
2242
+ if (this._media.webkitDisplayingFullscreen) {
2243
+ this._media.webkitExitFullscreen();
2244
+ } else {
2245
+ this._media.webkitEnterFullscreen();
2246
+ }
2227
2247
  }
2228
2248
  }
2229
2249