com.aliyun.player

## Class AliPlayerFactory

- java.lang.Object
- - com.aliyun.player.AliPlayerFactory

-     public class AliPlayerFactory
      extends java.lang.Object

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `static class` | `AliPlayerFactory.BlackType` The type of the blacklist.
    `static class` | `AliPlayerFactory.DeviceInfo` Device information.
    `static class` | `AliPlayerFactory.SupportFeatureType` The type of the feature.

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `AliPlayerFactory()`

  - ### Method Summary

    All Methods Static Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static void` | `addBlackDevice(AliPlayerFactory.BlackType blackType, AliPlayerFactory.DeviceInfo deviceInfo)` Add a device to the blacklist.
    `static void` | `addBlackList(AliPlayerFactory.BlackType blackType, java.util.List<AliPlayerFactory.DeviceInfo> deviceInfos)` Add multiple devices to the blacklist.
    `static AliListPlayer` | `createAliListPlayer(android.content.Context context)` Create a playlist player.
    `static AliListPlayer` | `createAliListPlayer(android.content.Context context, java.lang.String traceId)` Create a playlist player.
    `static AliLiveShiftPlayer` | `createAliLiveShiftPlayer(android.content.Context context)` Create a broadcast timeshift player.
    `static AliLiveShiftPlayer` | `createAliLiveShiftPlayer(android.content.Context context, java.lang.String traceId)` Create a broadcast timeshift player.
    `static AliPlayer` | `createAliPlayer(android.content.Context context)` Create a player.
    `static AliPlayer` | `createAliPlayer(android.content.Context context, java.lang.String traceId)` Create a player.
    `static java.lang.String` | `getDeviceUUID()` Get device UUID.
    `static java.lang.String` | `getSdkVersion()` Query the version of the SDK.
    `static boolean` | `isFeatureSupport(AliPlayerFactory.SupportFeatureType type)` judge whether support the type of feature.
    `static void` | `setConvertURLCallback(IPlayer.ConvertURLCallback callback)` URL conversion callback.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### AliPlayerFactory

          public AliPlayerFactory()

  - ### Method Detail

    - #### createAliPlayer

          public static AliPlayer createAliPlayer(android.content.Context context)

      Create a player.
      Parameters:
        `context` - The context.
      Returns:
        The player object.

    - #### createAliPlayer

          public static AliPlayer createAliPlayer(android.content.Context context,
                                                  java.lang.String traceId)

      Create a player.
      Parameters:
        `context` - The context.
        `traceId` - A trace ID for troubleshooting with the relevant log. Set as "DisableAnalytics" to disable report analytics data to server(not recommended).
      Returns:
        The player object.

    - #### createAliListPlayer

          public static AliListPlayer createAliListPlayer(android.content.Context context)

      Create a playlist player.
      Parameters:
        `context` - The context.
      Returns:
        The player object.

    - #### createAliListPlayer

          public static AliListPlayer createAliListPlayer(android.content.Context context,
                                                          java.lang.String traceId)

      Create a playlist player.
      Parameters:
        `context` - The context.
        `traceId` - A trace ID for troubleshooting with the relevant log. Set as "DisableAnalytics" to disable report analytics data to server(not recommended).
      Returns:
        The player object.

    - #### createAliLiveShiftPlayer

          public static AliLiveShiftPlayer createAliLiveShiftPlayer(android.content.Context context)

      Create a broadcast timeshift player.
      Parameters:
        `context` - The context.
      Returns:
        The player object.

    - #### createAliLiveShiftPlayer

          public static AliLiveShiftPlayer createAliLiveShiftPlayer(android.content.Context context,
                                                                    java.lang.String traceId)

      Create a broadcast timeshift player.
      Parameters:
        `context` - The context.
        `traceId` - A trace ID for troubleshooting with the relevant log.
      Returns:
        The player object.

    - #### getSdkVersion

          public static java.lang.String getSdkVersion()

      Query the version of the SDK.
      Returns:
        The version of the SDK.

    - #### addBlackDevice

          public static void addBlackDevice(AliPlayerFactory.BlackType blackType,
                                            AliPlayerFactory.DeviceInfo deviceInfo)

      Add a device to the blacklist.
      Parameters:
        `blackType` - The type of the blacklist. See AliPlayerFactory.BlackType.
        `deviceInfo` - Information of the specified device. See AliPlayerFactory.DeviceInfo.

    - #### addBlackList

          public static void addBlackList(AliPlayerFactory.BlackType blackType,
                                          java.util.List<AliPlayerFactory.DeviceInfo> deviceInfos)

      Add multiple devices to the blacklist.
      Parameters:
        `blackType` - The type of the blacklist. See AliPlayerFactory.BlackType.
        `deviceInfos` - Information of the specified devices. See AliPlayerFactory.DeviceInfo.

    - #### setConvertURLCallback

          public static void setConvertURLCallback(IPlayer.ConvertURLCallback callback)

      URL conversion callback.
      Parameters:
        `callback` - The URL conversion callback. See IPlayer.ConvertURLCallback.

    - #### getDeviceUUID

          public static java.lang.String getDeviceUUID()

      Get device UUID. Once it's generated randomly, it will not change.
      Returns:

    - #### isFeatureSupport

          public static boolean isFeatureSupport(AliPlayerFactory.SupportFeatureType type)

      judge whether support the type of feature.
      Parameters:
        `type` - The type of the support feature. See AliPlayerFactory.SupportFeatureType.