ExoPlayer icon indicating copy to clipboard operation
ExoPlayer copied to clipboard

question

Open ummerakbar45 opened this issue 8 years ago • 2 comments

Hi q1.How can I enable and disable captions caption file is .srt and video format is hls and mp4. q2. how to implement adaptive hls: video shoud switch between bitrates depends on internet speed. q3. if internet connection gets disconnect, where to check that info

ummerakbar45 avatar Sep 15 '18 14:09 ummerakbar45

Between them, the demo app and developer guide should provide enough information to answer the first two questions. If it's still unclear, please direct general questions to StackOverflow. This issue tracker is primarily for reporting issues with the library.

The third question is a general Android development question, that a quick Google search yields plenty of answers for.

ojw28 avatar Sep 15 '18 15:09 ojw28

for adaptive I implemented this code but it is not working as expected

    DataSource.Factory dataSourceFactory = new DefaultDataSourceFactory(MediaPlayerActivity.this,
            Util.getUserAgent(MediaPlayerActivity.this, "videoApp"), bandwidthMeter);

// This is the MediaSource representing the media to be played. //url="http://qthttp.apple.com.edgesuite.net/1010qwoeiuryfg/sl.m3u8"; HlsMediaSource hlsMediaSource = new HlsMediaSource.Factory(dataSourceFactory) .createMediaSource(Uri.parse(url));

and I added code for captions but I am not able to disable the captions, /////////////////////////////////////////////////////////////////////////// //Handler mainHandler = new Handler(); bandwidthMeter = new DefaultBandwidthMeter(); TrackSelection.Factory videoTrackSelectionFactory = new AdaptiveTrackSelection.Factory(bandwidthMeter); TrackSelector trackSelector = new DefaultTrackSelector(videoTrackSelectionFactory); ////////////////////////////////////////////////////////////////////

TrackSelector does not allow me to add below methods like

///////////////////////////////////////////////////////////////// trackSelector.setParameters(new DefaultTrackSelector.ParametersBuilder() .setRendererDisabled(C.TRACK_TYPE_VIDEO, true) ////////////////////////////////////// How can I disable captions

ummerakbar45 avatar Sep 15 '18 17:09 ummerakbar45