Quality selector for ExoPlayer 2

前端 未结 2 1104
迷失自我
迷失自我 2020-11-28 13:24

I am currently developing a live and movie player application. I chose ExoPlayer version 2 to play the movie and I do not know much about it. I want to let

2条回答
  •  忘掉有多难
    2020-11-28 13:41

    I avoid the way as above posted. My way is using the DefaultTrackSelector as follows:

    trackSelector.setParameters(trackSelector.getParameters()
                              .withMaxVideoBitrate(bitrate)
                              .withMaxVideoSize(width, height));
    

    I've tested with HLS videos and it seems to perform in the right way. I get the bitrate, width and height reading from the HlsManifest.

提交回复
热议问题