exoplayer2.x

How to create Single Instance of ExoPlayer and use it with Multiple PlayerViews?

穿精又带淫゛_ 提交于 2021-02-11 14:54:24
问题 Creating Multiple instance of exoplayer is bit costly, it causes performance issue. Hence we need a single instance and use it with multiple PlayerViews? I am googled a lot but no one has answer for this question? 来源: https://stackoverflow.com/questions/64006634/how-to-create-single-instance-of-exoplayer-and-use-it-with-multiple-playerviews

How to implement ExoPlayer with Databinding?

≡放荡痞女 提交于 2021-02-09 15:47:06
问题 I have a class activity_player layout in which I have exoplayer2.ui.PlayerView and I created exo_player_control_view so that it overrides default controls in ExoPlayer. So I wanted to use Databinding in newly created custom control view but don't know how to do it. Any advice? It is actually an open issue over here, but yet to be solved. So is there anyone who had a workaround to make exo_player_control_view Databinding friendly? 回答1: You can use binding variable inside fragment/activity to

How to implement ExoPlayer with Databinding?

一曲冷凌霜 提交于 2021-02-09 15:43:31
问题 I have a class activity_player layout in which I have exoplayer2.ui.PlayerView and I created exo_player_control_view so that it overrides default controls in ExoPlayer. So I wanted to use Databinding in newly created custom control view but don't know how to do it. Any advice? It is actually an open issue over here, but yet to be solved. So is there anyone who had a workaround to make exo_player_control_view Databinding friendly? 回答1: You can use binding variable inside fragment/activity to

How to implement ExoPlayer with Databinding?

╄→гoц情女王★ 提交于 2021-02-09 15:40:23
问题 I have a class activity_player layout in which I have exoplayer2.ui.PlayerView and I created exo_player_control_view so that it overrides default controls in ExoPlayer. So I wanted to use Databinding in newly created custom control view but don't know how to do it. Any advice? It is actually an open issue over here, but yet to be solved. So is there anyone who had a workaround to make exo_player_control_view Databinding friendly? 回答1: You can use binding variable inside fragment/activity to

How to implement ExoPlayer with Databinding?

我的梦境 提交于 2021-02-09 15:40:18
问题 I have a class activity_player layout in which I have exoplayer2.ui.PlayerView and I created exo_player_control_view so that it overrides default controls in ExoPlayer. So I wanted to use Databinding in newly created custom control view but don't know how to do it. Any advice? It is actually an open issue over here, but yet to be solved. So is there anyone who had a workaround to make exo_player_control_view Databinding friendly? 回答1: You can use binding variable inside fragment/activity to

MPEG-TS H.264 with ExoPlayer

坚强是说给别人听的谎言 提交于 2021-02-07 07:36:34
问题 I have two mpeg-ts + h.264 video files, which I attempt to read on an Android device (Samsung Tab A 10.1") with ExoPlayer: SimpleExoPlayerView view = new SimpleExoPlayerView(this); TrackSelection.Factory videoTrackSelectionFactory = new AdaptiveVideoTrackSelection.Factory(new DefaultBandwidthMeter()); TrackSelector trackSelector = new DefaultTrackSelector(videoTrackSelectionFactory); SimpleExoPlayer mediaPlayer = ExoPlayerFactory.newSimpleInstance(this, trackSelector, new DefaultLoadControl()

stop and release exoplayer from viewpager 2

核能气质少年 提交于 2021-02-05 08:39:06
问题 I am using Exoplayer with ViewPager2. Home Fragment.java public class HomeFragment extends Fragment { View view; @Nullable @Override public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) { view= inflater.inflate(R.layout.fragment_home, container, false); ViewPager2 verticalViewPager = view.findViewById(R.id.vPager); verticalViewPager.setOrientation(ViewPager2.ORIENTATION_VERTICAL); ArrayList<VideoDataModel> dataset = new

Custom ExoPlayer MediaSource — where to start?

拥有回忆 提交于 2021-01-29 05:54:43
问题 I'm working on creating a custom media player using ExoPlayer (I've previously opened several questions on the same topic, because I'm very new to Android development and it seems like I run into a wall with every line of code I write). As part of this custom player I would like to download, parse, and handle an XML file that our business produces to define our content. This XML file gives a URL for a network ID (a 4-6 second video advertising the owner of the content), a URL for the content,

Exoplayer2 - ConcatenatingMediaSource, duration of all sources

六月ゝ 毕业季﹏ 提交于 2021-01-27 11:56:42
问题 I have basic code for playing couple of audio files via exoplayer ExtractorMediaSource audioSource = new ExtractorMediaSource(uri, dataSourceFactory, extractor, null, null); ExtractorMediaSource audioSource2 = new ExtractorMediaSource(uri2, dataSourceFactory2, extractor, null, null); ConcatenatingMediaSource concatenatedSource = new ConcatenatingMediaSource(audioSource, audioSource2); I'm trying to get duration off all media sources using code example from https://github.com/google/ExoPlayer

How to place the controls of an Exoplayer outside of the PlayerView

﹥>﹥吖頭↗ 提交于 2021-01-05 06:10:48
问题 I'm using Exoplayer2 to show videos in my application. I need the controls to be visible at all time. I can archive this by setting app:show_timeout="0" . But when the controls are always visible they take up space in the PlayerView. I would like to show the controls beneath the PlayerView, so that I can always show to whole video. This is my layout file: <?xml version="1.0" encoding="utf-8"?> <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas