obs-websocket-community-projects / obs-websocket-js

Consumes https://github.com/obsproject/obs-websocket
MIT License
667 stars 96 forks source link

HOW TO ADD FILE IN SOURCE? #164

Closed dream811 closed 3 years ago

dream811 commented 5 years ago

I am going to add and delete mp4 file in source please share source code for me~~~ Thanks contributors.

marckraw commented 3 years ago

Also would like to do that. Is it possibly right now ? for example, by changing the name of a file. In response for getting sources i see only that fields: image

so i guess, there is no way to change the filename used in this source ?

marckraw commented 3 years ago

I kinda solved my issue, if anyone will have the same.

You can add source, and then with websockets you can change it's content like that:

await obs.send("SetSourceSettings", {
      sourceName: 'your-created-source-name,
      sourceSettings: {
        local_file: "/your/path/to/the/file.mov",
      },
    });