Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

check audio playing on windows python

import asyncio, winrt.windows.media.control as wmc

def mediaIs(state):
    session = asyncio.run(getMediaSession())
    if session == None:
        return False
    return int(wmc.GlobalSystemMediaTransportControlsSessionPlaybackStatus[state]) == session.get_playback_info().playback_status #get media state enum and compare to current main media session state
Comment

PREVIOUS NEXT
Code Example
Python :: python library for downsampling a photo 
Python :: python sys 
Python :: convert dictionary keys to list python 
Python :: flask socketio usage 
Python :: fernet in python 
Python :: python script that turns bluetooth on 
Python :: count number of objects django template 
Python :: python namedtuples 
Python :: tkinter mainloop 
Python :: Kivy Python ListView Scrollview with Toggle on off 
Python :: pdf to string python 
Python :: structure ternaire python 
Python :: drf serializer general validate method 
Python :: python Sort the dictionary based on values 
Python :: #adding new str to set in python 
Python :: python animation 
Python :: python dictoinary add value 
Python :: x y coordinates in python 
Python :: minmaxscaler transform 
Python :: add elements to list python 
Python :: python internship 
Python :: python3 call parent constructor 
Python :: df length 
Python :: how to use prettytable in python 
Python :: python random uuid 
Python :: max function python 
Python :: bubble python 
Python :: adding two strings together in python 
Python :: how to concatenate two lists in python 
Python :: df.loc a list of index 
ADD CONTENT
Topic
Content
Source link
Name
4+9 =