All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.mux.sdk.models.BroadcastLayout Maven / Gradle / Ivy

/*
 * Mux API
 * Mux is how developers build online video. This API encompasses both Mux Video and Mux Data functionality to help you build your video-related projects better and faster than ever before.
 *
 * The version of the OpenAPI document: v1
 * Contact: [email protected]
 *
 * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
 * https://openapi-generator.tech
 * Do not edit the class manually.
 */


package com.mux.sdk.models;

import java.util.Objects;
import java.util.Arrays;
import io.swagger.annotations.ApiModel;
import com.google.gson.annotations.SerializedName;

import java.io.IOException;
import com.google.gson.TypeAdapter;
import com.google.gson.annotations.JsonAdapter;
import com.google.gson.stream.JsonReader;
import com.google.gson.stream.JsonWriter;

/**
 * The layout used when broadcasting the space.  The `gallery` layout will show participants in a grid that automatically resizes each participant’s stream to best fit up to 10 participants in the window. The `active-speaker` layout will show only the current active speaker, without a border. The `crop` layout uses as much of the available space as possible to show the participant's stream.  Defaults to `gallery` if not set. 
 */
@JsonAdapter(BroadcastLayout.Adapter.class)
public enum BroadcastLayout {
  
  GALLERY("gallery"),
  
  ACTIVE_SPEAKER("active-speaker"),
  
  CROP("crop");

  private String value;

  BroadcastLayout(String value) {
    this.value = value;
  }

  public String getValue() {
    return value;
  }

  @Override
  public String toString() {
    return String.valueOf(value);
  }

  public static BroadcastLayout fromValue(String value) {
    for (BroadcastLayout b : BroadcastLayout.values()) {
      if (b.value.equals(value)) {
        return b;
      }
    }
    throw new IllegalArgumentException("Unexpected value '" + value + "'");
  }

  public static class Adapter extends TypeAdapter {
    @Override
    public void write(final JsonWriter jsonWriter, final BroadcastLayout enumeration) throws IOException {
      jsonWriter.value(enumeration.getValue());
    }

    @Override
    public BroadcastLayout read(final JsonReader jsonReader) throws IOException {
      String value = jsonReader.nextString();
      return BroadcastLayout.fromValue(value);
    }
  }
}





© 2015 - 2025 Weber Informatics LLC | Privacy Policy