Code Monkey home page Code Monkey logo

obs_websocket's People

Contributors

bleonard252 avatar faithoflifedev avatar grummfy avatar lezdcs avatar sabuto avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

obs_websocket's Issues

feedback on pre 5.0.0

hello,
here is some feedback, it's raw note, so it could be a bit rough to read

  • I'm happy it's here and it's seems more modulable ;)
  • could be nice to have a mapping between command and from the list coming from the protocol and the way to call them
    • GetVersion : obsWebSocket.general.getVersion(), obsWebSocket.general.version, obsWebSocket.send('GetVersion')
  • some changelog guide could a helpful plus
  • I find a bit distracting to have several method to do the same thing like general.version and general.getVersion or getSourceScreenshot and getScreenshot

Bug

request

  • getScreenshot method => use GetSourceActive instead of GetSourceScreenshot
  • saveScreenshot method => use GetSourceActive instead of SaveSourceScreenshot
    for the request, it's seems to be all

response

  • SourceScreenshotResponse : imageData is a bool instead of a string or a Uint8List
  • SceneListResponse : currentPreviewSceneName could be null
    I didn't look yet to other response

event

  • I don't know why yet, but ExitStarted seems to have trouble to be added in the handler

Missing element

  • RequestBatch

Sorry I didn't got the time to go deeper. If I got time, I will try to make some MR. Thanks for the work

bug stopRecording function

I found bug about stopRecording function at version 2.4.4.
See source lib\src\obs_websocket_base.dart line 288.
I think it should be changed to StopRecordinging -> StopRecording.

Thank you.

feature request : send event to obs-browser

Hello,
I think a nice feature using the CallVendorRequest could be a specific call for the browser.

Here is an example :

    var response = await obsWebSocket.send('CallVendorRequest', {
      'vendorName': 'obs-browser',
      'requestType': 'emit_event',
      'requestData': {
        'event_name': 'obs-websocket-test-event',
        'event_data': {'my':'data', 'that':'will be displayed in an event'},
      },
    });

    print(response.toString());
    print(response?.requestType);
    print(response?.requestId);
    print(response?.requestStatus);
    print(response?.responseData);

this will display as

flutter: {"requestType":"CallVendorRequest","requestId":"e2bd885e-a382-4090-964b-98f90a76e7f9","requestStatus":{"result":true,"code":100,"comment":null},"responseData":{"requestType":"emit_event","responseData":{},"vendorName":"obs-browser"}}
flutter: CallVendorRequest
flutter: e2bd885e-a382-4090-964b-98f90a76e7f9
flutter: {"result":true,"code":100,"comment":null}
flutter: {requestType: emit_event, responseData: {}, vendorName: obs-browser}

In the browser, we can see the result

window.addEventListener('obs-websocket-test-event', function(event) {
	console.log(event.detail) //  {"my":"data","that":"will be displayed in an event"}
})

I think that adding an event to the browser could be really interesting, because it is a plugin that is really use everywhere.

obsproject/obs-browser#340 for the browser integration

Create a connection instance?

When I use sqflite I always use the singleton pattern to create an instance of the connection and return the same instance if the openDB() function is called again and again in separate query function. Is there a way we can do the same with obs-websocket?

Can we make the connection a separate methods w/ a return statement?

Error when importing library obs_websocket then running on web environment

I've just imported this line into my code:

import 'package:obs_websocket/obs_websocket.dart';

Then the compiler warns me when I'm running on web environment:

.../.pub-cache/hosted/pub.dartlang.org/obs_websocket-2.2.12/lib/src/obs_websocket.dart:55:37:  
Error: The argument type 'WebSocket/*1*/' can't be assigned to the parameter type 'WebSocket/*2*/'.    
 - 'WebSocket/*1*/' is from 'package:universal_io/src/http/http.dart'
 ('/D:/flutter/.pub-cache/hosted/pub.dartlang.org/universal_io-2.0.4/lib/src/http/http.dart').
 - 'WebSocket/*2*/' is from 'dart:_http'.
        channel: IOWebSocketChannel(websocket), fallbackEvent: fallbackEvent);
                                    ^

Please help me this issue!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.