JW Player SDK for Android Migration from v2.7 to v2.8 (Feb 22 2018)

Beginning with JW Player SDK for Android version 2.8.0, we have upgraded to ExoPlayer v2. In updating ExoPlayer from version 1.x to 2.x, we made an effort to keep most of the changes under the hood and the interfaces unchanged. Nevertheless, there are still some code-changes that are required for the following scenarios:

1. If you use the method JWPlayerView.addOnMetaListener() please note the import changes below:

ExoPlayer v1.x ExoPlayer v2.x
import com.google.android.exoplayer.metadata.id3.BinaryFrame; import com.google.android.exoplayer2.metadata.id3.BinaryFrame;
import com.google.android.exoplayer.metadata.id3.GeobFrame; import com.google.android.exoplayer2.metadata.id3.GeobFrame;
import com.google.android.exoplayer.metadata.id3.Id3Frame; import com.google.android.exoplayer2.metadata.id3.Id3Frame;
import com.google.android.exoplayer.metadata.id3.PrivFrame; import com.google.android.exoplayer2.metadata.id3.PrivFrame;
import com.google.android.exoplayer.metadata.id3.TxxxFrame; import com.google.android.exoplayer2.metadata.id3.TextInformationFrame;

Please be aware that TxxxFrame was renamed to TextInformationFrame.

2. If you use MediaDrmCallback please note the object import changes according to the table below:

ExoPlayer v1.x ExoPlayer v2.x
import android.media.MediaDrm.KeyRequest; import com.google.android.exoplayer2.drm.ExoMediaDrm;
import android.media.MediaDrm.ProvisionRequest; import com.google.android.exoplayer2.drm.ExoMediaDrm;

Please note that com.google.android.exoplayer.util.Util is no longer available in ExoPlayer v2.x. You may add it to your code manually if required. Please refer to our demo app

Required for Everyone

If the two conditions described above do not apply to your application, then neither changes to code or configuration files are required. Just change the JW Player SDK version in your dependencies (from 2.7.x to 2.8.x) and enjoy all the benefits of ExoPlayer v2!