question

PlutoTV-8519 avatar image
0 Votes"
PlutoTV-8519 asked RoyLi-MSFT commented

UWP JS App - Is there a way to know when the Display port of a TV changes?

Hello,

I was wondering if a UWP JS App has a way to know when the display input from a TV changes and the XBOX is no longer visible in the screen.
For example I have an XBOX connected in an HDMI1 port and in an HDMI2 I have a PC. In my TV I was displaying my XBOX but now I change the view from HDMI1 to HDMI2.

I tried to use HdmiDisplayInformation.DisplayModesChanged Event (https://docs.microsoft.com/en-us/uwp/api/windows.graphics.display.core.hdmidisplayinformation.displaymodeschanged?view=winrt-22000) like this.

const hdmiDisplayInformation = window.Windows.Graphics.Display.Core.HdmiDisplayInformation.getForCurrentView();
hdmiDisplayInformation.addEventListener('displayModesChanged', callback);


But the callback never gets call when I switch my HDMI port.

windows-uwp
· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

@PlutoTV-8519 Would you mind telling me why you want to detect the HDMI port change? What kind of feature do you want to implement?

0 Votes 0 ·

0 Answers