Merge branch 'master' into hadicharara/added-support-for-rtl-layouts
This commit is contained in:
commit
104ad71ea7
128 changed files with 1242 additions and 1454 deletions
|
@ -67,16 +67,12 @@ function tryRemoveElement(elem) {
|
|||
}
|
||||
|
||||
function enableNativeTrackSupport(currentSrc, track) {
|
||||
if (track) {
|
||||
if (track.DeliveryMethod === 'Embed') {
|
||||
return true;
|
||||
}
|
||||
if (track?.DeliveryMethod === 'Embed') {
|
||||
return true;
|
||||
}
|
||||
|
||||
if (browser.firefox) {
|
||||
if ((currentSrc || '').toLowerCase().includes('.m3u8')) {
|
||||
return false;
|
||||
}
|
||||
if (browser.firefox && (currentSrc || '').toLowerCase().includes('.m3u8')) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (browser.ps4) {
|
||||
|
@ -92,11 +88,9 @@ function tryRemoveElement(elem) {
|
|||
return false;
|
||||
}
|
||||
|
||||
if (browser.iOS) {
|
||||
if (browser.iOS && (browser.iosVersion || 10) < 10) {
|
||||
// works in the browser but not the native app
|
||||
if ((browser.iosVersion || 10) < 10) {
|
||||
return false;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
if (track) {
|
||||
|
@ -279,10 +273,6 @@ function tryRemoveElement(elem) {
|
|||
* @type {any | undefined}
|
||||
*/
|
||||
#lastProfile;
|
||||
/**
|
||||
* @type {MutationObserver | IntersectionObserver | undefined} (Unclear observer typing)
|
||||
*/
|
||||
#resizeObserver;
|
||||
|
||||
constructor() {
|
||||
if (browser.edgeUwp) {
|
||||
|
@ -969,11 +959,6 @@ function tryRemoveElement(elem) {
|
|||
* @private
|
||||
*/
|
||||
destroyCustomTrack(videoElement) {
|
||||
if (this.#resizeObserver) {
|
||||
this.#resizeObserver.disconnect();
|
||||
this.#resizeObserver = null;
|
||||
}
|
||||
|
||||
if (this.#videoSubtitlesElem) {
|
||||
const subtitlesContainer = this.#videoSubtitlesElem.parentNode;
|
||||
if (subtitlesContainer) {
|
||||
|
@ -1497,14 +1482,14 @@ function tryRemoveElement(elem) {
|
|||
if (
|
||||
// Check non-standard Safari PiP support
|
||||
typeof video.webkitSupportsPresentationMode === 'function' && video.webkitSupportsPresentationMode('picture-in-picture') && typeof video.webkitSetPresentationMode === 'function'
|
||||
// Check non-standard Windows PiP support
|
||||
|| (window.Windows
|
||||
&& Windows.UI.ViewManagement.ApplicationView.getForCurrentView()
|
||||
.isViewModeSupported(Windows.UI.ViewManagement.ApplicationViewMode.compactOverlay))
|
||||
// Check standard PiP support
|
||||
|| document.pictureInPictureEnabled
|
||||
) {
|
||||
list.push('PictureInPicture');
|
||||
} else if (window.Windows) {
|
||||
if (Windows.UI.ViewManagement.ApplicationView.getForCurrentView().isViewModeSupported(Windows.UI.ViewManagement.ApplicationViewMode.compactOverlay)) {
|
||||
list.push('PictureInPicture');
|
||||
}
|
||||
}
|
||||
|
||||
if (browser.safari || browser.iOS || browser.iPad) {
|
||||
|
@ -1565,13 +1550,7 @@ function tryRemoveElement(elem) {
|
|||
}
|
||||
|
||||
const video = this.#mediaElement;
|
||||
if (video) {
|
||||
if (video.audioTracks) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
return !!video?.audioTracks;
|
||||
}
|
||||
|
||||
static onPictureInPictureError(err) {
|
||||
|
@ -1703,10 +1682,7 @@ function tryRemoveElement(elem) {
|
|||
|
||||
// This is a retry after error
|
||||
resume() {
|
||||
const mediaElement = this.#mediaElement;
|
||||
if (mediaElement) {
|
||||
mediaElement.play();
|
||||
}
|
||||
this.unpause();
|
||||
}
|
||||
|
||||
unpause() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue