Need help with exoplayer-textureview?
Click the “chat” button below for chat support from the developer who created it, or find similar developers for support.

About the developer

satorufujiwara
130 Stars 19 Forks Apache License 2.0 158 Commits 3 Opened issues

Description

ExoPlayer's wrapper for using with TextureView.

Services available

!
?

Need anything else?

Contributors list

# 33,084
Java
Kotlin
Android
viewpag...
98 commits
# 37,758
Kotlin
kotlin-...
Flutter
Android
4 commits
# 88,017
Swift
HTML
Electro...
uibutto...
1 commit
# 5,076
Android
PHP
Java
viewpag...
1 commit

exoplayer-textureview

License Download

ExoPlayer's wrapper for using with TextureView.

ExoPlayer's version is r1.5.11

Features

  • Play HLS playlist
  • Play local videos in assets folder.
  • Set bitrate limit
  • Mute / unmute

Gradle

repositories {
    jcenter()
}
dependencies {
    compile 'jp.satorufujiwara:exoplayer-textureview:0.6.9'
    compile 'com.google.android.exoplayer:exoplayer:r1.5.11'
}

Usage

Create

VideoTexturePresenter
's instance and bind to
Fragment
's or
Activity
's lifecycle.
@Override
public void onViewCreated(View view, @Nullable Bundle savedInstanceState) {
    super.onViewCreated(view, savedInstanceState);
    videoTexturePresenter = new VideoTexturePresenter(videoTextureView);
    videoTexturePresenter.onCreate();
    VideoSource source = HlsVideoSource
                .newBuilder(Uri.parse("hls playlist url."), "UserAgent")
                .bufferSegmentSize(64 * 1024)
                .bufferSegmentCount(512)
                .build();
    videoTexturePresenter.setSource(source);
    videoTexturePresenter.prepare();
}

@Override public void onDestroyView() { videoTexturePresenter.release(); videoTexturePresenter.onDestroy(); super.onDestroyView(); }

And play or pause.

videoTexturePresenter.play();
videoTexturePresenter.seekTo(0);
videoTexturePresenter.setMute(true);
videoTexturePresenter.pause();

License

Copyright 2015 Satoru Fujiwara

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

ExoPlayer and ExoPlayer demo.

Copyright (C) 2014 The Android Open Source Project

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

We use cookies. If you continue to browse the site, you agree to the use of cookies. For more information on our use of cookies please see our Privacy Policy.