-
-
Notifications
You must be signed in to change notification settings - Fork 993
Add Option to always show 'Open In External Player' for DeoVR and other VR Players #6519
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop
Are you sure you want to change the base?
Conversation
WithoutPants
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This PR seems to be a bit of a mess.
I would probably do away with having the option at all, but ensure that the link opens in a new tab/window if it isn't an android or apple device.
| ss.StreamSceneDirect(scene, w, r) | ||
| } | ||
|
|
||
| func (rs sceneRoutes) StreamOrgDirect(w http.ResponseWriter, r *http.Request) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is the purpose of this end point and how does it differ from the /stream end point?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
DeoVR and other VR player require a file name with extension. Just "/steam" as the end point won't work.
At least it should be like "/steam.mp4", but the current implementation of "/steam.mp4" is very slow, because it involves FFmpeg re-encoding.
Plus, when serving the media file to VR Players, it will help the player a lot by keeping the file name, like "my_video_3dh_180.mp4". VR players will recognize this media file as a 180 3D side-by-side video by using the original file name. This is a common feature for almost all VR players.
Moreover, a simple "/steam.mp4" will leave VR Players no idea what kind of video it actually is. And since every video in Stash shares the same name like "/steam.mp4", after you watching the 1st video, the second video will start playing at the 1st video's last position.
This end point will allow Stash to serve the original file at "/steam/org" route, if the scene has a file named "my_video_3dh_180.mp4", it can be served at "/steam/org/my_video_3dh_180.mp4". This way it serves the original file while keeping the original file name for the VR players.
Once the link is clicked, the VR player will open the media file and hide the browser. So there is no need to open a new browser tab. VR player's browser is quite rudimentary. So creating a new browser tab for the file will only complicate things and cover the browser with a blank page. Plus, if someone wants to play the original video inside a browser, he already has the media player in the same page.
I wish I didn't have to create this special end point to implement the simple file serving, but there is no other way I can see that can do the trick.
PS: The new end point also serves other file types in the same folder. As the example above, if there is a "my_video_3dh_180.srt" subtitle file in the same folder as the prime file, using "/steam/org/my_video_3dh_180.srt" will serve the subtitle file as well. This will allow VR players to open additional files like *.ass , *.funscript, *.hsp ... etc.
package-lock.json
Outdated
| @@ -0,0 +1,22 @@ | |||
| { | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why are there package files in the root directory?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I will get rid of it.
This will add a boolean option "Show 'Open In External Player' button" under the "Interface->Scene Player" setting.
With this option on, when user click on "Open In External Player", Stash will start to serve the prime original file directly to the browser, or to the program with webview.
Purpose: To allow VR Players like DeoVR and HereSphere to directly open the file via http serving. This way there is no need to generate huge .json files and potentially crash the VR Player. Users just need to open the Stash webpage in the VR Player, choose the scene and click on the "Open In External Player" button.
Note: It cannot handle the multi-resolution or multi-file scenario. It will only serve the prime file for that scene.