小编Rah*_*dav的帖子

Exoplayer 旋转到横向时的方向问题

当视频在 Exoplayer 中播放时效果很好,但当它旋转时,视频会再次开始。我想确保当视频旋转时视频恢复到相同的位置我已经保存了玩家的当前位置但仍然不起作用。请帮忙.....

public class RecipeStepDescriptionFragment extends Fragment {


    @BindView(R.id.playerView)
    PlayerView playerView;

    @BindView(R.id.stepDescription)
    TextView stepDescription;

    @BindView(R.id.ingredientsCardSteps)
    CardView ingredientsCardSteps;

    @BindView(R.id.ingredientsListStepDescription)
    TextView ingredientsListStepDescription;


    @BindView(R.id.widgetButtonStepDescription)
    FloatingActionButton widgetButton;


    private SimpleExoPlayer player;

    private static final String TAG = "StepDetail";


    String videoUrl;
    String longDescription;
    boolean tablet;
    String ingredients;
    String name;

    public RecipeStepDescriptionFragment() {
        // Required empty public constructor
    }

    @Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container,
                         Bundle savedInstanceState) {
        // Inflate the layout for this fragment
        View rootView = inflater.inflate(R.layout.fragment_recipe_step_description, container, false);
        ButterKnife.bind(this, rootView);





        if (getArguments() …
Run Code Online (Sandbox Code Playgroud)

android savestate orientation landscape-portrait exoplayer

1
推荐指数
1
解决办法
3750
查看次数