exoplayer

Creating a simple instance of ExoPlayer

隐身守侯 提交于 2019-11-30 05:09:58
I am currently looking to develop an application that utilises Dash through the ExoPlayer in Android. To begin with I am going through the demo project however am having trouble with even creating a simple working instance of ExoPlayer that can stream mp3 or similar. Would really appreciate any help anyone can give relating to getting a very simple exoplayer instance working from which i can adapt and build upon or if anyone has any leads for more references or guides which I can follow as there seems to be very little documentation available. Thanks very much for all and any help! First of

How to pause ExoPlayer 2 playback and resume (PlayerControl was removed)

巧了我就是萌 提交于 2019-11-30 04:46:28
In ExoPlayer < 2.x there was a class PlayerControl with pause() and resume() functions but it was removed. I can't find a way to do this on ExoPlayer 2 . How can I pause and resume a playback? you can use void setPlayWhenReady(boolean playWhenReady); . If Exo is ready, passing false you will pause the player. Passing true you will resume it. You can check the player's state using getPlaybackState() This is my way. Create two methods and call them when needed. private void pausePlayer(){ player.setPlayWhenReady(false); player.getPlaybackState(); } private void startPlayer(){ player

Exoplayer adaptive hls streaming

杀马特。学长 韩版系。学妹 提交于 2019-11-30 03:57:30
I am looking for good and simple example/explanation how to implement ExoPlayer for HLS Adaptive streaming. I am a newbie and do not have experience and knowledge so I can figure how to do this from code example on git. There are too many 'moving parts' so beginner can understand and reuse it in own projects. Can somebody help me to learn and understand how to use/implement ExoPlayer in order to achieve this functionality? Thanks! Vicky The easiest way to get started using ExoPlayer is to add it as a gradle dependency. You need to make sure you have the jcenter repository included in the build

ExoPlayer and start / pause / seekTo commands

只愿长相守 提交于 2019-11-30 01:26:04
I am trying to use ExoPlayer , as opposed to MediaPlayer and I can't seem to figure it out... MediaPlayer has .start() / .pause() commands... and I can just seekTo(1287) and it automatically starts playing... How do I do this with ExoPlayer ? I have tried to do seekTo(1287) but it doesn't start playing after... I have also added .setPlayWhenReady(true) after that, and still no luck... I am able to .stop() ... but I can't get it to start playing again after that unless I .prepare() again... but I don't think I should have to do that between every pause and play. I am using my own controls and

Exo player DASH Streaming example

纵然是瞬间 提交于 2019-11-30 01:05:07
问题 I'm trying to play DASH video on android devices with the ExoPlayer from Google (http://developer.android.com/guide/topics/media/exoplayer.html). The documentation is very, very poor and I cannot find some simplest working example with DASH (if someone did it). In the video (https://www.youtube.com/watch?v=6VjF638VObA#t=462) it looks simple but in reality there is a lot of unknown objects. I want to use only ExoPlayer library and without using their github demo because it is very complex and

How to prevent the exoplayer from reloading in case of seek backward?

独自空忆成欢 提交于 2019-11-29 20:46:02
问题 I am using exoplayer to play mp3 tracks. All good. If the track is completely buffered then in case of seek forward it does not reload as expected. However, in case of seek backward it reloads. How do i prevent that? Is it a bug in exo? 回答1: Not really a solution, but you can use a library that acts as a proxy between ExoPlayer and the video URL like AndroidVideoCache. It downloads the video to disk and supplies ExoPlayer with the local file URL so re-buffering is much faster. 来源: https:/

ExoPlayer Restore State when Resumed

妖精的绣舞 提交于 2019-11-29 10:35:16
问题 I have implemented the Player and now there is a problem. When the video is playing and if the app is closed and resumed, the video screen freezes. I even saw the ExoPlayer Demo Activity from Google for better understanding but I could not get through it for implementing in my app. I have attached the Player Activity here and for the full code, I am sharing the GitHub repository for the complete set of files used. RecipeStepDetailFragment.java package com.example.android.recipe.ui; import

Is it possible to change resolution of exoplayer manually?

流过昼夜 提交于 2019-11-29 05:09:38
I'm working on a project that use Exoplayer2 for HLS video streaming. Adaptive streaming is working well in my exoplayer, but i want to implement a feature that user can change the resolution (144p,240p,480p..)of the video manually from UI. I got the resolution of the playing video from TrackGroup API. But don't know how to set the resolution value into the playing video manually. Thanks You can do this using the track selector functionality in Exoplayer2 - it essentially limits the tracks that the adaptive bit rate selection functionality in the player can select from. It can only select from

Custom UI on exoplayer sample

蓝咒 提交于 2019-11-29 02:26:52
** I really need help if you don't know anything don't give me a negative point :| if something bother you comment** I want to write custom UI for my player in Exoplayer(change button of pause play or add new buttons like player speed next and etc) . I use Exoplayer sample from github and before add code to my original project, I want to test the custom UI on official sample. I read pages in Stackoverflow and tuts+ about custom UI but I really confused! why change some buttons image or change their place must be so difficult :) how i can handle this? EDIT this is the sample https://github.com

Exoplayer adaptive hls streaming

老子叫甜甜 提交于 2019-11-29 01:31:15
问题 I am looking for good and simple example/explanation how to implement ExoPlayer for HLS Adaptive streaming. I am a newbie and do not have experience and knowledge so I can figure how to do this from code example on git. There are too many 'moving parts' so beginner can understand and reuse it in own projects. Can somebody help me to learn and understand how to use/implement ExoPlayer in order to achieve this functionality? Thanks! 回答1: The easiest way to get started using ExoPlayer is to add