SongGuess
    Preparing search index...
    Index

    Constructors

    Properties

    audioStartPos: number = 0

    The random/user-defined audio start position index (0-2) for the question.

    RoomConfigMessageSchema.audioStartPosition

    pickedSong:
        | {
            artist: string;
            audioURL: string;
            cover: string
            | null;
            hrefURL: string;
            name: string;
        }
        | null = null

    Whether the player has already picked a song this round.

    Type Declaration

    • {
          artist: string;
          audioURL: string;
          cover: string | null;
          hrefURL: string;
          name: string;
      }
      • artist: string

        The name of the song artist.

      • audioURL: string

        A URL to the audio file of the song. Currently only audio previews from Apple Music and SoundCloud are allowed.

      • cover: string | null

        Cover URL of the song.

      • hrefURL: string

        The URL users will be redirected to when clicking.

      • name: string

        The name of the song.

    • null
    progressbarDuration: number = 0

    The duration where the progress bar should start.

    progressbarOffset: number = 0

    The offset position for the progress bar.

    roundMsg?: {
        gamePhase: GamePhase;
        question?:
            | {
                answerOptions: string[];
                correctAnswerIndex?: number;
                questionType: "multiple_choice";
                startPos: number;
            }
            | {
                correctAnswer?: {
                    artist: string;
                    audioURL: string;
                    cover: string
                    | null;
                    hrefURL: string;
                    name: string;
                };
                pickerId: string;
                questionCount: number;
                questionCurrent: number;
                questionType: "player_picks";
                startPos: number;
            };
        roundCurrent: number;
        type: "round_state";
    }

    The round message, containing most important info

    Type Declaration

    • gamePhase: GamePhase

      The current game phase.

      GamePhase

    • Optionalquestion?:
          | {
              answerOptions: string[];
              correctAnswerIndex?: number;
              questionType: "multiple_choice";
              startPos: number;
          }
          | {
              correctAnswer?: {
                  artist: string;
                  audioURL: string;
                  cover: string
                  | null;
                  hrefURL: string;
                  name: string;
              };
              pickerId: string;
              questionCount: number;
              questionCurrent: number;
              questionType: "player_picks";
              startPos: number;
          }
    • roundCurrent: number

      The round number.

    • type: "round_state"
    selectedAnswer?: string

    The currently selected answer string.

    selectedAnswerIndex?: number

    The currently selected answer index.