[ExoPlayer2] Exoplayer ⁉️

Jay·2021년 1월 25일
0

ExoPlayer2

목록 보기
1/2
post-thumbnail

이번 글에선 간단하게 ExoPlayer의 공식문서를 훑어보면서 알아봐야겠다.

Exoplayer ⁉️

ExoPlayer 공식 문서의 설명부터 보자.

  • Exoplayer는 안드로이드를 위한 어플리케이션 수준의 미디어 플레이어이다.
  • Android의 MediaPlayer API의 대안으로 로컬과 네트워크 환경 모두에서 오디오를 재생하고 비디오를 재생할 수 있도록 해준다.
  • DASH와 적응형 재생을 하는 SmoothStreaming 등 Android의 MediaPlayer API에서 제공하지 않는 기능을 제공해준다.
  • MediaPlayer API와 다르게 ExoPlayer는 쉽게 커스텀 가능하고 확장 가능하며 플레이스토어를 통해 업데이트 할 수 있다.

ExoPlayer가 MediaPlayer API의 대안으로 나온 만큼 MediaPlayer보다 이게 좋아. 저게 좋아 등 차별점에 대해 주구장창 기술해 놓았다. (물론 매우 좋은 점이다.😆)


Pros and cons

실제로 공식 문서에 대놓고 장단점을 기술해 놓았다.

먼저,

장점

  • 다양한 기기 및 Android 버전에서 기기 별 문제가 적고 동작의 변화가 적다.
Fewer device specific issues and less variation in behavior across different devices and versions of Android.
  • 어플리케이션에서 플레이어를 업데이트 할 수 있는 이점이 있다.
    ExoPlayer는 애플리케이션 APK에 포함하는 라이브러리이므로 사용하는 버전을 제어 할 수 있으며 정기적인 애플리케이션 업데이트로 최신 버전으로 쉽게 업데이트 할 수 있다.
The ability to update the player along with your application. 
Because ExoPlayer is a library that you include in your application apk, you have control over which version you use and you can easily update to a newer version as part of a regular application update.
  • 개발에 맞게 플레이어를 커스텀하고 확장할 수 있는 이점이 있다. ExoPlayer는 특별히 이를 염두에 두고 설계되었으며 많은 컴포넌트를 사용자 구현으로 대체 할 수 있다. (커스텀 가능하단 이야기)
The ability to customize and extend the player to suit your use case. 
ExoPlayer is designed specifically with this in mind, and allows many components to be replaced with custom implementations.
  • 플레이리스트를 지원한다. (🧐)
Support for playlists.
  • DASH 및 SmoothStreaming을 지원한다. MediaPlayer에서는 둘 다 지원하지 않는다. 다른 많은 형식도 지원됩니다. 자세한 내용은 지원되는 형식 페이지를 참조.지원되는 형식
Support for DASH and SmoothStreaming, neither of which are supported by MediaPlayer. 
Many other formats are also supported. See the Supported formats page for details.
  • EXT-X-DISCONTINUITY 태그의 올바른 처리와 같은 고급 HLS 기능 지원.
Support for advanced HLS features, such as correct handling of #EXT-X-DISCONTINUITY tags.
  • Android 4.4 (API 레벨 19) 이상에서 Widevine 공통 암호화 지원.
Support for Widevine common encryption on Android 4.4 (API level 19) and higher.
  • Extensions을 사용하여 여러 추가 라이브러리와 빠르게 통합 할 수있는 기능을 제공한다.
    예를 들어, IMA 확장 프로그램을 사용하면 양방향 미디어 광고 SDK를 사용하여 콘텐츠로 쉽게 수익을 창출 할 수 있습니다.
The ability to quickly integrate with a number of additional libraries using official extensions. 
For example the IMA extension makes it easy to monetize your content using the Interactive Media Ads SDK.

단점

  • 일부 장치에서 오디오 전용 재생의 경우 ExoPlayer는 MediaPlayer보다 훨씬 더 많은 배터리를 소모 할 수 있다.
    자세한 내용은 배터리 소모량 페이지를 참조.
For audio only playback on some devices, ExoPlayer may consume significantly more battery than MediaPlayer. 
See the Battery consumption page for details.
  • 앱에 ExoPlayer를 포함하면 APK 크기에 수백kb가 추가됩니다.
    매우 가벼운 앱의 경우에만 문제가 될 수 있다.
    ExoPlayer 축소에 대한 지침은 APK 축소 페이지에서 찾을 수 있습니다.
Including ExoPlayer in your app adds a few hundred kilobytes to the APK size. 
This is likely only a concern for extremely lightweight apps. 
Guidance for shrinking ExoPlayer can be found on the APK shrinking page.
  • Android version 4.1(API level 16) 이상 부터 가능하다. MediaPlayer API는 API level 1부터 가능하다. MediaPlayer API가 API 16 level 부터 가능한 이유는 Android의 MediaCodec(API level 16)에 의존하기 때문이다. 이전버전을 신경 쓸 필요없다면 97.6%를 커버 할 수 있는 ExoPlayer를 선택해도 된다.

장단점이 명확하다. MediaPlayer API에서 제공하지 않는 기능을 풍부하게 제공하는 대신, 배터리 소모 및 apk 사이즈가 헤비해질 수 있음을 우려한다.

다양한 형식을 제공하는 ExoPlayer이기에 많은 곳에서 사용된다고 생각한다.
유튜브가 ExoPlayer로 만들어진 건 많이 들어본 이야기다.
다양한 형식과 관련된 이야기는 다른 글로 자세하게 알아보려 한다.


ExoPlayer 공식문서는 너무 친절하다.
관련 용어 설명도 제공해준다.🤩

profile
Android Developer - Come to my medium (https://medium.com/@wodbs135)

0개의 댓글