You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After calling TriggerMediaInputAction(InputName, "OBS_WEBSOCKET_MEDIA_INPUT_ACTION_STOP"), I expect to be able to start playing the Media Input again using TriggerMediaInputAction(InputName, "OBS_WEBSOCKET_MEDIA_INPUT_ACTION_START").
Current Behavior
After calling TriggerMediaInputAction(InputName, "OBS_WEBSOCKET_MEDIA_INPUT_ACTION_STOP"), I cannot start to play the Media Input anymore using TriggerMediaInputAction(InputName, "OBS_WEBSOCKET_MEDIA_INPUT_ACTION_START"). This is unexcepted.
Steps to Reproduce
Call TriggerMediaInputAction(InputName, "OBS_WEBSOCKET_MEDIA_INPUT_ACTION_STOP") to stop playing a media input.
Then call TriggerMediaInputAction(InputName, "OBS_WEBSOCKET_MEDIA_INPUT_ACTION_START") to start it again.
Anything else we should know?
When using WebSockets to stop playing a media input using TriggerMediaInputAction(InputName, "OBS_WEBSOCKET_MEDIA_INPUT_ACTION_STOP"), I cannot start to play the Media Input anymore using TriggerMediaInputAction(InputName, "OBS_WEBSOCKET_MEDIA_INPUT_ACTION_START"). Looking at the source code (RequestHandler_MediaInputs.cpp), I can see that the implementation is not what I would expect;
case OBS_WEBSOCKET_MEDIA_INPUT_ACTION_PLAY:
// Shoutout to whoever implemented this API call like this
obs_source_media_play_pause(input, false);
break;
case OBS_WEBSOCKET_MEDIA_INPUT_ACTION_STOP:
obs_source_media_stop(input);
break;
case OBS_WEBSOCKET_MEDIA_INPUT_ACTION_RESTART:
// I'm only implementing this because I'm nice. I think its a really dumb action.
obs_source_media_restart(input);
break;
Thanks to the developer that put in that "dumb" action called "RESTART", because actually calling "RESTART" is the only option to start playing again. If this is proper, then why have a START and a RESTART? What would be the difference?
The implementation is not what I expect, and I hope you can agree.
ALSO: After calling TriggerMediaInputAction(InputName, "OBS_WEBSOCKET_MEDIA_INPUT_ACTION_STOP"), I can't press PLAY in the UI anymore either... I have STOP it there and RESTART it to get it playing again...
The text was updated successfully, but these errors were encountered:
You may want to take a look at the freshly documented enum for OBSMediaInputAction (don't mind the deprecated warnings, it's not), because that OBS_WEBSOCKET_MEDIA_INPUT_ACTION_START doesn't exist. You have to use OBS_WEBSOCKET_MEDIA_INPUT_ACTION_RESTART after stopping a Media Input
Operating System Info
Windows 11
Other OS
No response
OBS Studio Version
Other
OBS Studio Version (Other)
28.0.3
obs-websocket Version
5.0.1
OBS Studio Log URL
https://obsproject.com/logs/I5BL7WZ0WjbXHYn_
OBS Studio Crash Log URL
No response
Expected Behavior
After calling
TriggerMediaInputAction(InputName, "OBS_WEBSOCKET_MEDIA_INPUT_ACTION_STOP")
, I expect to be able to start playing the Media Input again usingTriggerMediaInputAction(InputName, "OBS_WEBSOCKET_MEDIA_INPUT_ACTION_START")
.Current Behavior
After calling
TriggerMediaInputAction(InputName, "OBS_WEBSOCKET_MEDIA_INPUT_ACTION_STOP")
, I cannot start to play the Media Input anymore usingTriggerMediaInputAction(InputName, "OBS_WEBSOCKET_MEDIA_INPUT_ACTION_START")
. This is unexcepted.Steps to Reproduce
TriggerMediaInputAction(InputName, "OBS_WEBSOCKET_MEDIA_INPUT_ACTION_STOP")
to stop playing a media input.TriggerMediaInputAction(InputName, "OBS_WEBSOCKET_MEDIA_INPUT_ACTION_START")
to start it again.Anything else we should know?
When using WebSockets to stop playing a media input using
TriggerMediaInputAction(InputName, "OBS_WEBSOCKET_MEDIA_INPUT_ACTION_STOP")
, I cannot start to play the Media Input anymore usingTriggerMediaInputAction(InputName, "OBS_WEBSOCKET_MEDIA_INPUT_ACTION_START")
. Looking at the source code (RequestHandler_MediaInputs.cpp), I can see that the implementation is not what I would expect;Thanks to the developer that put in that "dumb" action called "RESTART", because actually calling "RESTART" is the only option to start playing again. If this is proper, then why have a START and a RESTART? What would be the difference?
The implementation is not what I expect, and I hope you can agree.
ALSO: After calling
TriggerMediaInputAction(InputName, "OBS_WEBSOCKET_MEDIA_INPUT_ACTION_STOP")
, I can't press PLAY in the UI anymore either... I have STOP it there and RESTART it to get it playing again...The text was updated successfully, but these errors were encountered: