exoplayer

Playback error on using ClearKey DRM Schema in Exoplayer 2 android

杀马特。学长 韩版系。学妹 提交于 2019-12-11 06:02:06
问题 I am trying to play the .MPD file, which is using DRMSchema : clearKey For playing it i am creating a DefaultDrmSessionManager in the following way String keyString = "{\"keys\":[{\"kty\":\"oct\",\"k\":\"y1QQhMmXMa70__dFAMEurQ\n" + " \",\"kid\":\"bXbyXLF_Xha46u9rv1gtjg\n" + " \"},{\"kty\":\"oct\",\"k\":\"pGMaFTpEPfnu0FkwQ9t1GQ\n" + " \",\"kid\":\"88XgNh5mVLKPgEnHeLI5Rg\n" + " \"}],'type':\"temporary\"}"; LogMgr.i("DRMCallback JSON : " + keyString); drmCallback = new LocalMediaDrmCallback

How to add Adaptive Track Selector in Exo-player v2.x?

北城以北 提交于 2019-12-10 22:19:41
问题 I'm setting up Exo Player in my app and I have implemented DASH adaptive streaming in my player, and want to add the functionality to play the track of specific quality selected by the user. My Exo player version is 2.9.3 , I tried implementing by following these Stackoverflow Post,Medium Post, but it's bit confusing and some part of the code is deprecated, and saying the truth is that I am a beginner. Here's my code for initializing the player:- private void initializePlayer() { if (player =

How can we cache HLS video url once streamed

帅比萌擦擦* 提交于 2019-12-10 21:35:39
问题 I am using exomedia library to play video through hls. I want to cache video as the video gets streamed. AndroidVideoCache library do this job well but it doesn't support HLS . 回答1: It can be done by configuring the okhttp client used by the Exomedia library. First we need provide custom renderbuilder to emvideoview by using setVideoUri(uri,renderbuilder) method. In order to provide custom hls render builder we need to override HlsRenderBuilder class and override createDataSource method. Here

ExoPlayer doesn't play audio on devices which use FFMPEG

◇◆丶佛笑我妖孽 提交于 2019-12-10 16:33:09
问题 I've set up ExoPlayer to stream audio and it works beautifully on some devices I have (eg, my Nexus 5) but on others it simply doesn't play anything at all. To eliminate any issues with my app, I've modified the demo app by changing the "Dizzy" video to a random MP3 I've got sitting on a server. In DefaultRendererBuilder I'm also returning a null video track renderer and am only attempting to play audio. Obviously each device has its own set of codecs and so I suspected that maybe the wrong

Exoplayer playback error after interstitial ad

半城伤御伤魂 提交于 2019-12-10 12:46:40
问题 I am playing video with ExoPlayer and showing Google AdMob interstitial ad. After ad has been gone there was trouble to play video and show error like: Playback error.com.google.android.exoplayer2.ExoPlaybackException at com.google.android.exoplayer2.mediacodec.MediaCodecRenderer.throwDecoderInitError(MediaCodecRenderer.java:441) at com.google.android.exoplayer2.mediacodec.MediaCodecRenderer.maybeInitCodec(MediaCodecRenderer.java:428) at com.google.android.exoplayer2.mediacodec

Android stream over ExoPlayer

匆匆过客 提交于 2019-12-10 10:40:03
问题 I am trying to switch from MediaPlayer in favor of ExoPlayer but I can't find any updated demo how can I use it.I think they have removed the FrameworkSampleSource method. I downloaded the demo from Github but I can't find the implementation of player, I could find the Samples object where the URLs are added. I have a list of URL's that I want to be played.I am switching to ExoPlayer because it's smoother than MediaPlayer.I have read all StackOverflow topics about ExoPlayer but none of them

How to use TextureView instead of SurfaceView with PlayerView of ExoPlayer?

核能气质少年 提交于 2019-12-10 09:44:09
问题 I know it is possible to use TextureView in ExoPlayer. But I cannot find any sample on how to implement this functionality in a proper way. Could you please help me on this issue? 回答1: The PlayerView has an xml attribute surface_type which let's you choose whether you want to use a SurfaceView or a TextureView . (Note: SimpleExoPlayerView has been renamed to PlayerView in recent versions since it only depends on the Player interface and not on SimpelExoPlayerView anymore.) You can choose

How to hide control buttons in ExoPlayer2

廉价感情. 提交于 2019-12-10 00:45:42
问题 How to hide all controllers in ExoPlayer2 (start button, pause, and so on) that they did not exist, and the screen was always full. I looked, there is simpleExoPlayerView.setUseController(true) method; But it deactivate the player ... public void setUseController (boolean useController) { this.useController = useController; if (useController) { controller.setPlayer(player); } else { controller.hide(); controller.setPlayer(null); } } How to hide or delete these components? 回答1: ExoPlayer-r2.2

Changing playback speed in Exoplayer

给你一囗甜甜゛ 提交于 2019-12-09 15:25:27
问题 I'm looking to implement an audio player with variable speed playback (1.0x, 1.25x, 1.5x) like typical audiobook players currently on the market do. I would like to use Google's Exoplayer library as my audioplayer library however they don't appear to support variable speed playback. Any ideas on how to implement this, or any extensions that do support this? 回答1: The function setPlaybackSpeed() was removed and now you set the playback speed via: PlaybackParameters param = new

How to show HLS embedded captions on Exoplayer

时光怂恿深爱的人放手 提交于 2019-12-09 14:03:46
问题 how do I enable and also select different subtitles that are embedded in a Vimeo video in HLS format using Exoplayer, ExoMedia or another player? In iOS this same video already presents the option of subtitles natively but in Android I cannot find means to implement it. 回答1: This works well! TrackGroupArray trackGroups = mappedTrackInfo.getTrackGroups(rendererIndex); TrackSelectionArray currentTrackGroups = player.getCurrentTrackSelections(); TrackSelection currentTrackSelection =