How to use the pywebostv.controls.MediaControl function in pywebostv

To help you get started, we’ve selected a few pywebostv examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github supersaiyanmode / PyWebOSTV / tests / test_controls.py View on Github external
def test_mute(self):
        client = WebOSClient("ws://a")
        media = MediaControl(client)
        media.mute(True)

        self.assert_sent_message_without_id({
            "type": "request",
            "uri": "ssap://audio/setMute",
            "payload": {"mute": True}
        })
github supersaiyanmode / PyWebOSTV / tests / test_controls.py View on Github external
def test_volume_down(self):
        client = WebOSClient("ws://a")
        media = MediaControl(client)
        media.volume_down()

        self.assert_sent_message_without_id({
            "type": "request",
            "uri": "ssap://audio/volumeDown"
        })
github supersaiyanmode / PyWebOSTV / tests / test_controls.py View on Github external
def set_volume(self):
        client = WebOSClient("ws://a")
        media = MediaControl(client)
        media.set_volume(30)

        self.assert_sent_message_without_id({
            "type": "request",
            "uri": "ssap://audio/setVolume",
            "payload": {"volume": 30}
        })
github supersaiyanmode / PyWebOSTV / tests / test_controls.py View on Github external
def test_unmute(self):
        client = WebOSClient("ws://a")
        media = MediaControl(client)
        media.mute(False)

        self.assert_sent_message_without_id({
            "type": "request",
            "uri": "ssap://audio/setMute",
            "payload": {"mute": False}
        })
github supersaiyanmode / PyWebOSTV / tests / test_controls.py View on Github external
def test_volume_up(self):
        client = WebOSClient("ws://a")
        media = MediaControl(client)
        media.volume_up()

        self.assert_sent_message_without_id({
            "type": "request",
            "uri": "ssap://audio/volumeUp"
        })
github grimpy / koditools / koditools / plugins / lgtv.py View on Github external
def get_control(self, controltype):
        if controltype not in self.clients: 
            if controltype == 'media':
                control = MediaControl(self.client)
            elif controltype == 'input':
                control = InputControl(self.client)
                control.connect_input()
            elif controltype == 'system':
                control = SystemControl(self.client)
            elif controltype == 'source':
                control = SourceControl(self.client)
            self.clients[controltype] = control
        return self.clients[controltype]