commit
718e1b1733
|
@ -165,6 +165,14 @@ export class AddonFilterMediaPluginVideoJSService {
|
|||
const videoWidth = player.videoWidth();
|
||||
const videoHeight = player.videoHeight();
|
||||
const playerDimensions = player.currentDimensions();
|
||||
const offsetParentWidth = player.el().offsetParent?.clientWidth;
|
||||
|
||||
if (offsetParentWidth && playerDimensions.width > offsetParentWidth) {
|
||||
// The player is bigger than the container. Resize it.
|
||||
player.dimension('width', offsetParentWidth);
|
||||
playerDimensions.width = offsetParentWidth;
|
||||
}
|
||||
|
||||
if (!videoWidth || !videoHeight || !playerDimensions.width || videoWidth === playerDimensions.width) {
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -54,7 +54,7 @@ export class CoreMedia {
|
|||
* @returns Whether needs conversion.
|
||||
*/
|
||||
static sourceNeedsConversion(source: CoreMediaSource): boolean {
|
||||
if (!CorePlatform.isIOS()) {
|
||||
if (!CorePlatform.isMobile()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -84,7 +84,7 @@ export class CoreMedia {
|
|||
* @returns Whether JS player should be used.
|
||||
*/
|
||||
static mediaUsesJavascriptPlayer(mediaElement: HTMLVideoElement | HTMLAudioElement): boolean {
|
||||
if (!CorePlatform.isIOS()) {
|
||||
if (!CorePlatform.isMobile()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue