diff --git a/scripts/SceneCardVideoPlayer/README.MD b/scripts/SceneCardVideoPlayer/README.MD new file mode 100644 index 00000000..acde1941 --- /dev/null +++ b/scripts/SceneCardVideoPlayer/README.MD @@ -0,0 +1,29 @@ +# Scene Card Video Player +Sorry but this is not the best place for the script. New and updated script will go to:
+https://github.com/philpw99/StashCustomJavascripts
+I think a separate repo is the best for this script and other scripts I might make in the future. +

+ + +

+Inspired by clangmoyai's IINA plugin. I added more cross platform support.
+It is tested fully in windows 11 environment. Hopefully it will work in others.
+ +* The script will add a simple "Play" button for each scene card. You click on it, and the video get played.
+You click on the video, then it will disappear. You are back to the scene list.
+* To install it, copy and paste the code from the pwPlayer.js into Stash->Settings->Interface->Custom Javascript.
+Then refresh the browser. +* Well, it's supposed to be this simple. Don't know why Stash guys make it so complicated.
+So, enjoy play with it. In the future I will try to make it work with DeoVr. + +### Updates +#### 1/09/2023 +* Move file info to display when mouse hovers over play buttons. +#### 1/10/2023 +* Improve the "wait for element" to preview video only. +* Now when play, the top nav bar will be hidden as well. +#### 1/11/2023 +* Add "browser" mode and "player" mode. Player mode is useful for using device's internal players, while browser mode works most of the time. +* Add Oculus browser detection and special handling of it. +

+Finally, if you use "player" mode, you will be happy to use Quest 2 browser to watch Stash, as I am very happy now. diff --git a/scripts/SceneCardVideoPlayer/pwPlayer.js b/scripts/SceneCardVideoPlayer/pwPlayer.js new file mode 100644 index 00000000..5ce82342 --- /dev/null +++ b/scripts/SceneCardVideoPlayer/pwPlayer.js @@ -0,0 +1,426 @@ +/* Inspired by clangmoyai's IINA player script in github ! + This script will add a "Play" button in each scene card. + Allow you to easily play those video files. + To use it, just copy and paste the code into Stash->Settings->Interface->Custome Javascript. + Then refresh the browser. + This is only version 1.2 + + Player mode should be either "browser" or "player" + In browser mode, the video is played within a