Issue
Firstly I added the exoplayer dependency to my build. After that I made a xml layout with a custom controller and then I wanted to add app:fastforward_increment & app:rewind_increment. But every time I try to build it throws this error message :
AAPT: error: attribute fastforward_increment not found.
I tried to resolve this issue by adding the other dependecies as they were suggesting in one of the forums but it didn't work. Do you know what's causing the issue and how to solve it?
Solution
The functions app:fastforward_increment & app:rewind_increment were removed in the version 2.15.0 and replaced by setSeekBackIncrementMs and setSeekForwardIncrementMs in SimpleExoPlayer.Builder. So instead of changing this value in xml file, now you have to change it programatically:
Your objects:
private SimpleExoPlayer simpleExoPlayer;
private SimpleExoPlayer.Builder builder;
private PlayerView videoPlayer;
And then in the onCreate:
builder = new SimpleExoPlayer.Builder(context);
builder.setSeekBackIncrementMs(10000);
builder.setSeekForwardIncrementMs(10000);
simpleExoPlayer = builder.build();
videoPlayer.setPlayer(simpleExoPlayer);
simpleExoPlayer.addMediaItem([resource],[context]);
simpleExoPlayer.prepare();
Answered By - Kristian


0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.