[Python] The SMTC object created in Python doesn't to display the caller's information

Discussão em 'Python' iniciado por Stack, Abril 9, 2025.

  1. Stack

    Stack Membro Participativo

    I want to get an SMTC object in Python, and I want to display the caller's information correctly.

    First, I tried to use SystemMediaTransportControls.get_for_current_view() to get the SMTC object, but it failed.

    Then, I noticed that a project named "Tauon" (a music player) used ISystemMediaTransportControlsInterop.get_for_window() to get the SMTC object. Tauon has a pre-compiled DLL that initializes the SMTC object. I also tried it and I get the SMTC object, but the created SMTC object does not display the caller's information.

    Here are my attempts:

    1. I wrote a Python script (use winsdk) to get the SMTC object in the same way as the DLL, but the caller's information still doesn't show.
    2. I wrote a Python script to call the DLL's function, but the caller's information still doesn't show.
    3. I renamed the Tauon.exe file to any other name, and now the caller's information doesn't show.
    4. I moved Tauon.exe to any other path, and now the caller's information doesn't show.

    Therefore, I infer that whether the caller's information is displayed is bound to the path and file name of the caller's file.

    Perhaps this is related to the installation information of the program, so we should pay attention to what the installer is doing.

    The caller's information looks like this -> [​IMG]

    Continue reading...

Compartilhe esta Página