mirror of
https://github.com/stashapp/stash.git
synced 2025-12-18 04:44:37 +03:00
[Bug Fix] Disable float-on-scroll JWPlayer feature on mobile (#1721)
* Disable video float on mobile
This commit is contained in:
@@ -3,7 +3,7 @@ import React from "react";
|
||||
import ReactJWPlayer from "react-jw-player";
|
||||
import * as GQL from "src/core/generated-graphql";
|
||||
import { useConfiguration } from "src/core/StashService";
|
||||
import { JWUtils } from "src/utils";
|
||||
import { JWUtils, ScreenUtils } from "src/utils";
|
||||
import { ScenePlayerScrubber } from "./ScenePlayerScrubber";
|
||||
import { Interactive } from "../../utils/interactive";
|
||||
|
||||
@@ -294,14 +294,20 @@ export class ScenePlayerImpl extends React.Component<
|
||||
|
||||
this.playlist = this.makePlaylist();
|
||||
|
||||
// TODO: leverage the floating.mode option after upgrading JWPlayer
|
||||
const extras: any = {};
|
||||
|
||||
if (!ScreenUtils.isMobile()) {
|
||||
extras.floating = {
|
||||
dismissible: true,
|
||||
};
|
||||
}
|
||||
|
||||
const ret = {
|
||||
playlist: this.playlist,
|
||||
image: scene.paths.screenshot,
|
||||
width: "100%",
|
||||
height: "100%",
|
||||
floating: {
|
||||
dismissible: true,
|
||||
},
|
||||
cast: {},
|
||||
primary: "html5",
|
||||
autostart:
|
||||
@@ -314,6 +320,7 @@ export class ScenePlayerImpl extends React.Component<
|
||||
getDurationHook,
|
||||
seekHook,
|
||||
getCurrentTimeHook,
|
||||
...extras,
|
||||
};
|
||||
|
||||
return ret;
|
||||
|
||||
Reference in New Issue
Block a user