Translations - Storm JavaScript Player

Here's the sample code and a table with all possible values for overriding built-in texts and messages through the configuration object in Storm Player.

Complete Code Example

                        
/**
 * Standard player configuration object
 */
const playerConfig = {
    containerID: "container",
    width: 640,
    height: 360,
    title: "Awesome live stream",
    subtitle: "This is going to be epic!",
    translations: {
        disconnected: "Disconnected from streaming server.",
        connectionFailed: "Failed to connect to the streaming server.",
        compatibilityError: "Your device is not compatible with the available video source.",
        noSSLError: "This connection requires a secure SSL connection.",
        streamError: "Error while playing the stream.",
        streamNotFound: "Stream with given name was not found.",
        streamStop: "The stream has ended.",
        awaitingStart: "Waiting for the stream to start...",
        live: "UNMUTE SOUND",
        unmute: "LIVE",
        broadcastRemainingTime: "Remaining time",
        broadcastStartTime: "Broadcasting will start at",
        timeDays: "days",
        timeHours: "hours",
        timeMinutes: "minutes",
        timeSeconds: "seconds"
    },
    waitingRoom: {
        createTime: "2023-07-12 12:56:57",
        startTime: "2023-07-12 10:27:22"
    }
};

/**
 * Each player instance must be provided with both player (gui) and library configs
 */
const player = stormPlayer(playerConfig, streamConfig);
                    

Explanation and Description of Individual Fields

Parameter name Default message Description
disconnected Disconnected from streaming server. It appears when the player is disconnected from the server.
connectionFailed Failed to connect to the streaming server. It appears when the attempt to connect to the server fails.
compatibilityError Failed to connect to the streaming server. An error occurs when the stream cannot be displayed on the user's device (it is not compatible).
noSSLError This connection requires a secure SSL connection. An error occurs when an SSL connection is required.
streamError Error while playing the stream. Error during stream playback.
streamNotFound Stream with given name was not found. It appears when the specified stream is not found/not active.
streamStop The stream has ended. The message informs us about the stream being stopped.
awaitingStart Waiting for the stream to start... Message is displayed when stream is waiting either to be publish or for encoder to connect and start sending data.
live LIVE Text in the top-right corner of the screen indicating that the stream is live.
unmute UNMUTE SOUND Text on the label indicating the need to activate the audio.
broadcastRemainingTime Remaining time Main label for the Waiting Room.
broadcastStartTime Broadcasting will start at Bottom label, an exact date will be added at the end of this string.
timeDays days Label next to remaining days.
timeHours hours Label next to remaining hours.
timeMinutes minutes Label next to remaining minutes.
timeSeconds seconds Label next to remaining seconds.
Table 1. Explanation and description of individual fields table.
Support Needed?

Create a free ticket and our support team will provide you necessary assistance.