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 nameDefault messageDescription
disconnectedDisconnected from streaming server.It appears when the player is disconnected from the server.
connectionFailedFailed to connect to the streaming server.It appears when the attempt to connect to the server fails.
compatibilityErrorFailed to connect to the streaming server.An error occurs when the stream cannot be displayed on the user's device (it is not compatible).
noSSLErrorThis connection requires a secure SSL connection.An error occurs when an SSL connection is required.
streamErrorError while playing the stream.Error during stream playback.
streamNotFoundStream with given name was not found.It appears when the specified stream is not found/not active.
streamStopThe stream has ended.The message informs us about the stream being stopped.
awaitingStartWaiting 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.
liveLIVEText in the top-right corner of the screen indicating that the stream is live.
unmuteUNMUTE SOUNDText on the label indicating the need to activate the audio.
broadcastRemainingTimeRemaining timeMain label for the Waiting Room.
broadcastStartTimeBroadcasting will start atBottom label, an exact date will be added at the end of this string.
timeDaysdaysLabel next to remaining days.
timeHourshoursLabel next to remaining hours.
timeMinutesminutesLabel next to remaining minutes.
timeSecondssecondsLabel 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.