exoplayer

Mute audio on ExoPlayer

做~自己de王妃 提交于 2019-11-29 01:04:48
I'm using Google new MediaPlayer named ExoPlayer and cannot find a way to mute the sound Is there an easy way to mute audio track on Google ExoPlayer ? Or changing volume ? Exoplayer 2.x.x Get the current volume: int currentvolume = player.getVolume(); Mute: player.setVolume(0f); Unmute: player.setVolume(currentVolume); Exoplayer 1.x.x I found two ways to achieve it by editing DemoPlayer from ExoPlayer. Good one : Basicly, you need to get the audioTrackRenderer which is a ExoPlayerComponent and send message to it. So : Add audioRenderer member and set it in onRenderers : // Complete

How can I scale video in ExoPlayer-V2 - Play Video In Full Screen

不羁的心 提交于 2019-11-29 01:00:25
问题 I am playing video from URL on Exoplayer , it stretching the video on resizing/on using resize_mode as I have mentioned in layout file using this I am not able to maintain the aspect ratio of video. I want to do scale type CENTER_CROP like we do in TextureSurface as mentioned in image2 but I am getting output as image1 I have tried following example Exoplayer Demo Example My Output (Img 1) and Expected Output (Img 2) exoplayer layout code <com.google.android.exoplayer2.ui.SimpleExoPlayerView

Exoplayer playing m3u8 files Android

拟墨画扇 提交于 2019-11-28 21:33:09
After trying multiple ways of playing m3u8 files using videoview and mediaplayer I decided to give up. Everytime i play the m3u8 file I only hear the voice.(please dont write urls from stack overflow answering my question. I' ve red them all ) Been asking around ,finally got to know that exoplayer maybe is the one I'm looking for. However exoplayer seems to be a newbie and I can'n find any proper tutorial . That been said Im myself a newbie and all talks about tracker and blabla seem just too complicated for me. I only want to be able to open all my m3u8 files from different urls in my app

Reproducing encrypted video using ExoPlayer

旧城冷巷雨未停 提交于 2019-11-28 18:21:57
I'm using ExoPlayer , in Android, and I'm trying to reproduce an encrypted video stored locally. The modularity of ExoPlayer allows to create custom components that can be injected in the ExoPlayer, and this seems the case. Indeed, after some researches I realized that for achive that task I could create a custom DataSource and overriding open() , read() and close() . I have also found this solution , but actually here the entire file is decrypted in one step and stored in a clear inputstream. This can be good in many situation. But what if I need to reproduce big file? So the question is: how

How to play Youtube video in ExoPlayer in Android?

微笑、不失礼 提交于 2019-11-28 04:07:24
I am trying to play youtube video in exoplayer but here is some confusion I don't know what is DASH url, I have only real youtube url like " https://www.youtube.com/watch?v=v1uyQZNg2vE " , I have no idea how to generate dash url form real url. Dash Url: new Sample("Google Glass", "http://www.youtube.com/api/manifest/dash/id/bf5bb2419360daf1/source/youtube?" + "as=fmp4_audio_clear,fmp4_sd_hd_clear&sparams=ip,ipbits,expire,as&ip=0.0.0.0&" + "ipbits=0&expire=19000000000&signature=255F6B3C07C753C88708C07EA31B7A1A10703C8D." + "2D6A28B21F921D0B245CDCF36F7EB54A2B5ABFC2&key=ik0", DemoUtil.TYPE_DASH),

Add button for full screen video with exo player

怎甘沉沦 提交于 2019-11-28 03:11:21
问题 I'm using exoPlayer to stream video to my app and so far works fine. What I would like to do now is to add some extra functionality such as a button on the bottom right edge to act as a "full screen button". But there are two problems. The first is that ExoPlayer doesn't seems to provide any Control class so you can simple add a button and override its functionality. What I guess is that I have to display that button on top of the video so I might have to wrap both in a FrameLayout and add

Is it possible to change resolution of exoplayer manually?

房东的猫 提交于 2019-11-27 18:54:33
问题 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 回答1: You can do this using the track selector functionality in Exoplayer2 - it essentially limits the

Not able to get getDuration() for AAC file using ExoPlayer

你说的曾经没有我的故事 提交于 2019-11-27 16:30:59
I have been trying to stream a URL using ExoPlayer . The URLs: STREAM_URL_1 = " http://storage.googleapis.com/exoplayer-test-media-0/play.mp3 " STREAM_URL_2 = " https://s3-ap-southeast-1.amazonaws.com/ok.talk.channels/zakirkhan/Zakir+khan+-+when+my+father+took+my+gf%27s+call.aac " Both URLs play but I am not able to get the getDuration() for STREAM_URL_2 which is an .aac file. The .mp3 works. The following is how I do it. How do I get the getDuration() for the 2nd URL. Even seekTo() doesn't work if getDuration() doesn't work. What change should I make? Do I need to change any Extractor ?

Exoplayer playing m3u8 files Android

我的梦境 提交于 2019-11-27 14:03:57
问题 After trying multiple ways of playing m3u8 files using videoview and mediaplayer I decided to give up. Everytime i play the m3u8 file I only hear the voice.(please dont write urls from stack overflow answering my question. I' ve red them all ) Been asking around ,finally got to know that exoplayer maybe is the one I'm looking for. However exoplayer seems to be a newbie and I can'n find any proper tutorial . That been said Im myself a newbie and all talks about tracker and blabla seem just too

Reproducing encrypted video using ExoPlayer

放肆的年华 提交于 2019-11-27 11:16:03
问题 I'm using ExoPlayer, in Android, and I'm trying to reproduce an encrypted video stored locally. The modularity of ExoPlayer allows to create custom components that can be injected in the ExoPlayer, and this seems the case. Indeed, after some researches I realized that for achive that task I could create a custom DataSource and overriding open() , read() and close() . I have also found this solution, but actually here the entire file is decrypted in one step and stored in a clear inputstream.