-
-
Notifications
You must be signed in to change notification settings - Fork 706
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
Requests/Events: Media Source/VLC #497
Conversation
Works better with the other upcoming media control request names
Adds the following events: - `MediaPlaying` - `MediaPaused` - `MediaRestarted` - `MediaStopped` - `MediaNext` - `MediaPrevious` - `MediaStarted` - `MediaEnded`
8cc604e
to
7918438
Compare
Would love to test this. i'm interested in creating a dock that gives playback controls and countown timer for media. idealy this would be for the program view as well as the preview view in studio mode. |
@tconley If you download the windows artifact from this page, it has an installer for obs-websocket with these features: https://dev.azure.com/Palakis/obs-websocket/_build/results?buildId=1243&view=artifacts&type=publishedArtifacts |
Cool. I'm able to issue the requests like below. Should 'MediaPlaying' be return anytime that media is playing or only when i've triggered it via PlayPauseMedia? For example if I click 'transition' in OBS Studio I get info back from websocket about that fact that SwitchScenes has happened, but I'm not getting back MediaPlaying |
Figured that out, I am getting MediaStarted/MediaEnded events |
@tconley So the requests simple forward to internal requests in OBS, and the events simply forward signals coming from OBS. In my testing, the media source had very different event behavior than the VLC source did. I honestly could not tell you whether something should or should not happen. |
I was able to use these to come up with little webpage that finds all the media sources of typeID ffmpeg_source , added play/pause buttons and also a button to change the audio monitoring type for that source. super helpful to have this committed to obs-websocket! |
Adds `GetMediaSourcesList` which returns a list of all media sources, along with their individual media playback states. In the process I refactored a switch which coverts the enum to a QString into its own helper function.
@tconley New request |
@tt2468 |
Hi! I need exactly this PR. Is it production ready? Can I just compile it myself and use it? |
@PurpleMyst I've just merged the main branch into the pr branch to update it to the latest features. Once the checks finish, you will be able to download the precompiled binaries for your appropriate OS here: https://dev.azure.com/Palakis/obs-websocket/_build/results?buildId=1282&view=artifacts&type=publishedArtifacts |
Ah thank you. I'm not familiar with the windows compilation story and was having a hard time figuring it out. |
Move duplicated functionality to a helper function and added some docs clarifying the behavior of the events, and fixed a few typos in the request handlers.
627a6ae
to
fdcba27
Compare
Adds the following requests into a new category called
MediaControl
:PlayPauseMedia
RestartMedia
StopMedia
NextMedia
PreviousMedia
GetMediaDuration
GetMediaTime
SetMediaTime
ScrubMedia
GetMediaState
GetMediaSourcesList
Adds the following events into a new category called
Media
MediaPlaying
MediaPaused
MediaRestarted
MediaStopped
MediaNext
MediaPrevious
MediaStarted
MediaEnded
Notes:
Resolves #494