Brightcove recommends using one of the following ExoPlayer views:
Brightcove video views
The Brightcove video views provide the basic functionality for the video view:
- They are designed to be dropped into your XML Layout file to replace Android's VideoView widget.
- They provide public methods to mirror those from Android's VideoView widget.
- They provide additional logic for playlists.
Use the following table to choose the appropriate Brightcove video view:
|If You Are Using||Then...|
|DRM - Widevine Modular||
The BrigthcoveTextureVideoView cannot be used because Widevine requires hardware rendering, and the TextureView uses software rendering.
A plugin is not necessary since Widevine Modular support is built into the ExoPlayer.
These views use the ExoPlayer as the underlying video player, which has excellent support for HLS.
It is not recommended to use either BrightcoveVideoView or BrightcoveTextureVideoView. Both use the MediaPlayer as the underlying video player, which has poor support for HLS.
|DASH or Smooth Streaming||
These views use the ExoPlayer as the underlying video player, which supports these formats.
The MediaPlayer does not support these formats.
The TextureView uses software rendering. Since the SurfaceView uses hardware rendering, it does not support effects.
TextureView comes with a performance penalty due to increased CPU usage.
The BrightcoveTextureVideoView also supports effects, but is limited by the MediaPlayer known issues.
These views use the ExoPlayer as the underlying video player, which supports ID3 tags.
The MediaPlayer does not support ID3 tags.
|608/708 closed captions||
These views use the ExoPlayer as the underlying video player, which supports 608/708 closed caption tags.
The MediaPlayer does not support 608/708 closed captions.
|DRM - Widevine Classic (deprecated)||
Use BrightcoveVideoView with WidevinePlugin
The BrightcoveVideoView uses the Android Media Player. Before using this view, review the MediaPlayer section of this doc.
The BrigthcoveTextureVideoView cannot be used because Widevine requires hardware rendering. The TextureView uses software rendering.
For more details about these classes, refer to the Brightcove Player SDK for Android Reference documents.
Should you use a MediaPlayer-based video view? The ExoPlayer has matured to the point that you should be able to use it in most cases.
If you need to use a MediaPlayer-based video view, consider the following:
Application size - An apk using the ExoPlayer-based video view will be roughly 300K larger than one using the MediaPlayer. This is because the ExoPlayer is a library, where the MediaPlayer is built into the Android OS. Even though an ExoPlayer apk is larger than using the MediaPlayer, the benefits of using the ExoPlayer far outweigh the file size.
Reliability and features - The reliability of the MediaPlayer has been less than perfect, and new features are rarely added. On the other hand, since the ExoPlayer is a library, it has been improving at a very fast rate with new features being added often.
Support - Any bugs with the MediaPlayer are difficult to fix because they require an Android OS change and Android OS deployment. ExoPlayer bugs are relatively easier and faster to fix, since the library is not part of the Android OS. Also, ExoPlayer bugs can be fixed by a larger community, including the Google ExoPlayer team, the Brightcove Player SDK for Android team or other ExoPlayer developers.
Now that you have selected a video view, you are ready to learn about registering your app.