Skip to main content
Version: 6.6.0

Video Inputs and Internal Ports

Display content from another device over HDMI, Display Port, or other port. PIP (Picture in Picture) functionality allows you to display content from the internal port while keeping signageOS on.

All methods

MethodsDescriptionSupported since
play()Method for starting stream1.0.18
stop()Method stops using the internal port.1.0.18

play()

Method uses the same API as video streams. Instead of URL (for stream), specify an URI of the port to display.

Parameters

ParamTypeRequiredDescription
uriString
Yes
Internal port URI
xNumber
Yes
x-position for video on screen
yNumber
Yes
y-position for video on screen
widthNumber
Yes
Video width on screen
heightNumber
Yes
Video height on screen

Javascript example

await sos.stream.play(uri,  x,  y,  width,  height);

Valid URI values

ValueDescription
internal://hdmi<number>HDMI
internal://dpDisplayPort
internal://dviDVI
internal://pcPC or VGA
warning

<number> has to be a value between 1 - 4, depending on which of the available HDMI ports you want to use.

stop()

Method stops using the internal port.

Parameters:

ParamTypeRequiredDescription
uriString
Yes
Internal port URI
xNumber
Yes
x-position for video on screen
yNumber
Yes
y-position for video on screen
widthNumber
Yes
Video width on screen
heightNumber
Yes
Video height on screen

Javascript example

await sos.stream.stop(uri,  x,  y,  width,  height);

Internal port events

API reacts to events related to changes in internal port status. Events are only emitted for a currently playing internal port.

EventDescription
disconnected()Emmited when the port is disconnected or does not receive any signal
connected()Emmited when the port is re-connected or starts receiving signal again after being disconnected
error()Emmited when an error occurs, is emmited only once

Usage with Typescript

You can also use all these methods with signageOS TypeScript.

onDisconnected(listener: (event: {
type: 'disconnected';
srcArguments: {
uri: string;
x: number;
y: number;
width: number;
height: number;
};
}) => void): void;
onConnected(listener: (event: {
type: 'connected';
srcArguments: {
uri: string;
x: number;
y: number;
width: number;
height: number;
};
}) => void): void;
onError(listener: (event: {
type: 'error';
srcArguments: {
uri: string;
x: number;
y: number;
width: number;
height: number;
};
errorMessage: string;
}) => void): void;

Errors

Although we are doing our best, following errors may occur when playing content from the internal ports.

CodeTypeMessage
51501InternalVideoErrorCouldn't play the video.
51503InternalVideoErrorCouldn't stop the video.