Java Code Examples for com.google.android.exoplayer2.C#CLEARKEY_UUID

The following examples show how to use com.google.android.exoplayer2.C#CLEARKEY_UUID . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: Util.java    From MediaSDK with Apache License 2.0 6 votes vote down vote up
/**
 * Derives a DRM {@link UUID} from {@code drmScheme}.
 *
 * @param drmScheme A UUID string, or {@code "widevine"}, {@code "playready"} or {@code
 *     "clearkey"}.
 * @return The derived {@link UUID}, or {@code null} if one could not be derived.
 */
public static @Nullable UUID getDrmUuid(String drmScheme) {
  switch (toLowerInvariant(drmScheme)) {
    case "widevine":
      return C.WIDEVINE_UUID;
    case "playready":
      return C.PLAYREADY_UUID;
    case "clearkey":
      return C.CLEARKEY_UUID;
    default:
      try {
        return UUID.fromString(drmScheme);
      } catch (RuntimeException e) {
        return null;
      }
  }
}
 
Example 2
Source File: Util.java    From TelePlus-Android with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Derives a DRM {@link UUID} from {@code drmScheme}.
 *
 * @param drmScheme A UUID string, or {@code "widevine"}, {@code "playready"} or {@code
 *     "clearkey"}.
 * @return The derived {@link UUID}, or {@code null} if one could not be derived.
 */
public static @Nullable UUID getDrmUuid(String drmScheme) {
  switch (Util.toLowerInvariant(drmScheme)) {
    case "widevine":
      return C.WIDEVINE_UUID;
    case "playready":
      return C.PLAYREADY_UUID;
    case "clearkey":
      return C.CLEARKEY_UUID;
    default:
      try {
        return UUID.fromString(drmScheme);
      } catch (RuntimeException e) {
        return null;
      }
  }
}
 
Example 3
Source File: Util.java    From TelePlus-Android with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Derives a DRM {@link UUID} from {@code drmScheme}.
 *
 * @param drmScheme A UUID string, or {@code "widevine"}, {@code "playready"} or {@code
 *     "clearkey"}.
 * @return The derived {@link UUID}, or {@code null} if one could not be derived.
 */
public static @Nullable UUID getDrmUuid(String drmScheme) {
  switch (Util.toLowerInvariant(drmScheme)) {
    case "widevine":
      return C.WIDEVINE_UUID;
    case "playready":
      return C.PLAYREADY_UUID;
    case "clearkey":
      return C.CLEARKEY_UUID;
    default:
      try {
        return UUID.fromString(drmScheme);
      } catch (RuntimeException e) {
        return null;
      }
  }
}
 
Example 4
Source File: Util.java    From Telegram-FOSS with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Derives a DRM {@link UUID} from {@code drmScheme}.
 *
 * @param drmScheme A UUID string, or {@code "widevine"}, {@code "playready"} or {@code
 *     "clearkey"}.
 * @return The derived {@link UUID}, or {@code null} if one could not be derived.
 */
public static @Nullable UUID getDrmUuid(String drmScheme) {
  switch (toLowerInvariant(drmScheme)) {
    case "widevine":
      return C.WIDEVINE_UUID;
    case "playready":
      return C.PLAYREADY_UUID;
    case "clearkey":
      return C.CLEARKEY_UUID;
    default:
      try {
        return UUID.fromString(drmScheme);
      } catch (RuntimeException e) {
        return null;
      }
  }
}
 
Example 5
Source File: Util.java    From Telegram with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Derives a DRM {@link UUID} from {@code drmScheme}.
 *
 * @param drmScheme A UUID string, or {@code "widevine"}, {@code "playready"} or {@code
 *     "clearkey"}.
 * @return The derived {@link UUID}, or {@code null} if one could not be derived.
 */
public static @Nullable UUID getDrmUuid(String drmScheme) {
  switch (toLowerInvariant(drmScheme)) {
    case "widevine":
      return C.WIDEVINE_UUID;
    case "playready":
      return C.PLAYREADY_UUID;
    case "clearkey":
      return C.CLEARKEY_UUID;
    default:
      try {
        return UUID.fromString(drmScheme);
      } catch (RuntimeException e) {
        return null;
      }
  }
}