зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1647522 - [1.0] Dispatch onFullscreen without metadata when there is an existing media session. r=geckoview-reviewers,agi
Differential Revision: https://phabricator.services.mozilla.com/D91476
This commit is contained in:
Родитель
0262bd4e96
Коммит
4730cbf48f
|
@ -55,7 +55,7 @@ class GeckoViewMediaControl extends GeckoViewChildModule {
|
|||
|
||||
if (element && !mediaElement) {
|
||||
// Non-media element fullscreen.
|
||||
return;
|
||||
debug`No fullscreen media element found.`;
|
||||
}
|
||||
|
||||
const message = {
|
||||
|
|
|
@ -305,16 +305,19 @@ public class MediaSession {
|
|||
|
||||
/**
|
||||
* The duration of the media in seconds.
|
||||
* 0.0 if unknown.
|
||||
*/
|
||||
public final double duration;
|
||||
|
||||
/**
|
||||
* The width of the video in device pixels.
|
||||
* 0 if unknown.
|
||||
*/
|
||||
public final long width;
|
||||
|
||||
/**
|
||||
* The height of the video in device pixels.
|
||||
* 0 if unknown.
|
||||
*/
|
||||
public final long height;
|
||||
|
||||
|
@ -726,7 +729,8 @@ public class MediaSession {
|
|||
final long features = Feature.fromBundle(
|
||||
message.getBundle("features"));
|
||||
delegate.onFeatures(mSession, mMediaSession, features);
|
||||
} else if (FULLSCREEN_EVENT.equals(event)) {
|
||||
} else if (FULLSCREEN_EVENT.equals(event) &&
|
||||
mMediaSession.isActive()) {
|
||||
final boolean enabled = message.getBoolean("enabled");
|
||||
final ElementMetadata meta =
|
||||
ElementMetadata.fromBundle(
|
||||
|
|
Загрузка…
Ссылка в новой задаче