kandi background
Explore Kits

ExoPlayer | An extensible media player for Android | Media library

 by   google Java Version: r2.17.1 License: Apache-2.0

 by   google Java Version: r2.17.1 License: Apache-2.0

Download this library from

kandi X-RAY | ExoPlayer Summary

ExoPlayer is a Java library typically used in Media applications. ExoPlayer has no bugs, it has no vulnerabilities, it has build file available, it has a Permissive License and it has medium support. You can download it from GitHub, Maven.
ExoPlayer is an application level media player for Android. It provides an alternative to Android’s MediaPlayer API for playing audio and video both locally and over the Internet. ExoPlayer supports features not currently supported by Android’s MediaPlayer API, including DASH and SmoothStreaming adaptive playbacks. Unlike the MediaPlayer API, ExoPlayer is easy to customize and extend, and can be updated through Play Store application updates.
Support
Support
Quality
Quality
Security
Security
License
License
Reuse
Reuse

kandi-support Support

  • ExoPlayer has a medium active ecosystem.
  • It has 19022 star(s) with 5593 fork(s). There are 853 watchers for this library.
  • There were 2 major release(s) in the last 6 months.
  • There are 537 open issues and 8375 have been closed. On average issues are closed in 19 days. There are 26 open pull requests and 0 closed requests.
  • It has a neutral sentiment in the developer community.
  • The latest version of ExoPlayer is r2.17.1
ExoPlayer Support
Best in #Media
Average in #Media
ExoPlayer Support
Best in #Media
Average in #Media

quality kandi Quality

  • ExoPlayer has 0 bugs and 0 code smells.
ExoPlayer Quality
Best in #Media
Average in #Media
ExoPlayer Quality
Best in #Media
Average in #Media

securitySecurity

  • ExoPlayer has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.
  • ExoPlayer code analysis shows 0 unresolved vulnerabilities.
  • There are 0 security hotspots that need review.
ExoPlayer Security
Best in #Media
Average in #Media
ExoPlayer Security
Best in #Media
Average in #Media

license License

  • ExoPlayer is licensed under the Apache-2.0 License. This license is Permissive.
  • Permissive licenses have the least restrictions, and you can use them in most projects.
ExoPlayer License
Best in #Media
Average in #Media
ExoPlayer License
Best in #Media
Average in #Media

buildReuse

  • ExoPlayer releases are available to install and integrate.
  • Deployable package is available in Maven.
  • Build file is available. You can build the component from source.
  • Installation instructions are not available. Examples and code snippets are available.
  • ExoPlayer saves you 207209 person hours of effort in developing the same functionality from scratch.
  • It has 872238 lines of code, 18546 functions and 3328 files.
  • It has high code complexity. Code complexity directly impacts maintainability of the code.
ExoPlayer Reuse
Best in #Media
Average in #Media
ExoPlayer Reuse
Best in #Media
Average in #Media
Top functions reviewed by kandi - BETA

kandi has reviewed ExoPlayer and discovered the below as its top functions. This is intended to give you an instant insight into ExoPlayer implemented functionality, and help decide if they suit your requirements.

  • Parses a media playlist .
  • Gets initial bitrate group assignment .
  • Parse stbl .
  • Parse sync frame info .
  • Extract integer element .
  • Returns true if device needs to be set .
  • Resolves a position update for a playlist .
  • Updates the web view .
  • Applies the given styles to the span .
  • Decodes an id3 frame .

ExoPlayer Key Features

An extensible media player for Android

From the Google Maven repository

copy iconCopydownload iconDownload
implementation 'com.google.android.exoplayer:exoplayer:2.X.X'

Locally

copy iconCopydownload iconDownload
git clone https://github.com/google/ExoPlayer.git
cd ExoPlayer
git checkout release-v2

Could not GET 'play-services-location/maven-metadata.xml'. Received status code 502 from server: Bad Gateway

copy iconCopydownload iconDownload
Could not GET 'https://google.bintray.com/exoplayer/androidx/room/room-common/maven-metadata.xml'. Received status code 502 from server: Bad Gateway
-----------------------
buildscript {
ext.kotlin_version = '1.3.72'
repositories {
    google()
    mavenCentral()
    //jcenter()
}
allprojects {
    repositories {
        google()
        mavenCentral()

      //  maven { url "https://kotlin.bintray.com/kotlinx/" }
    }  
-----------------------
implementation 'com.xxx.yyy:a.b.c' // not use +
implementation 'com.xxx.yyy:a.b.+' // use +
-----------------------
implementation 'com.xxx.yyy:a.b.c' // not use +
implementation 'com.xxx.yyy:a.b.+' // use +
-----------------------
  location:
    git:
      url: git://github.com/dreambitio/flutterlocation.git
      ref: release/3.2.4
      path: location/
-----------------------
distributionUrl=https://services.gradle.org/distributions/gradle-6.8.3-all.zip
-----------------------
buildscript {
    ext.kotlin_version = '1.3.50'
    repositories {
        google()
        mavenCentral() // <- replaced jcenter()
    }

dependencies {
    classpath 'com.android.tools.build:gradle:4.+' // <- updated this
    classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
    classpath 'com.google.gms:google-services:4.3.10'
    classpath 'com.google.firebase:firebase-crashlytics-gradle:2.4.1'
    }

}

allprojects {
    repositories {
        google()
        mavenCentral() // <- replaced jcenter()
    }
}
distributionUrl=https\://services.gradle.org/distributions/gradle-6.7.1-all.zip // <- updated this
-----------------------
buildscript {
    ext.kotlin_version = '1.3.50'
    repositories {
        google()
        mavenCentral() // <- replaced jcenter()
    }

dependencies {
    classpath 'com.android.tools.build:gradle:4.+' // <- updated this
    classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
    classpath 'com.google.gms:google-services:4.3.10'
    classpath 'com.google.firebase:firebase-crashlytics-gradle:2.4.1'
    }

}

allprojects {
    repositories {
        google()
        mavenCentral() // <- replaced jcenter()
    }
}
distributionUrl=https\://services.gradle.org/distributions/gradle-6.7.1-all.zip // <- updated this
-----------------------
dependencies {
...
  constraints {
    implementation('com.google.android.gms:play-services-location') {
        version {
            strictly "16.0.0"
        }
        because 'location: 3.2.4 does not specify version & google.bintray.com answers 502 Bad Gateway'
    }
  }
}
-----------------------
   implementation 'com.google.android.gms:play-services-ads-identifier:18.0.1'
-----------------------
api 'com.google.android.gms:play-services-location:16+'
api 'com.google.android.gms:play-services-location:16.0.0'
-----------------------
api 'com.google.android.gms:play-services-location:16+'
api 'com.google.android.gms:play-services-location:16.0.0'
-----------------------
 buildscript {
    ext.kotlin_version = '1.4.0' // or higher
    repositories {
        google()
        mavenCentral()  // add this
        maven {
            url 'https://maven.google.com'
        }
        // jcenter()  //remove or comment this
    }

    dependencies {
        classpath 'com.android.tools.build:gradle:4.1.0'  // or higher
        classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
    }
}

allprojects {
    repositories {
        google()
        mavenCentral()  // add this
        maven {
            url 'https://maven.google.com'
        }
        // jcenter()  // remove or comment this
    }
}

rootProject.buildDir = '../build'
subprojects {
    project.buildDir = "${rootProject.buildDir}/${project.name}"
}
subprojects {
    project.evaluationDependsOn(':app')
}

task clean(type: Delete) {
    delete rootProject.buildDir
}
#Fri Mar 23 08:50:38 IST 2022
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-6.7-all.zip
flutter upgrade
-----------------------
 buildscript {
    ext.kotlin_version = '1.4.0' // or higher
    repositories {
        google()
        mavenCentral()  // add this
        maven {
            url 'https://maven.google.com'
        }
        // jcenter()  //remove or comment this
    }

    dependencies {
        classpath 'com.android.tools.build:gradle:4.1.0'  // or higher
        classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
    }
}

allprojects {
    repositories {
        google()
        mavenCentral()  // add this
        maven {
            url 'https://maven.google.com'
        }
        // jcenter()  // remove or comment this
    }
}

rootProject.buildDir = '../build'
subprojects {
    project.buildDir = "${rootProject.buildDir}/${project.name}"
}
subprojects {
    project.evaluationDependsOn(':app')
}

task clean(type: Delete) {
    delete rootProject.buildDir
}
#Fri Mar 23 08:50:38 IST 2022
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-6.7-all.zip
flutter upgrade
-----------------------
 buildscript {
    ext.kotlin_version = '1.4.0' // or higher
    repositories {
        google()
        mavenCentral()  // add this
        maven {
            url 'https://maven.google.com'
        }
        // jcenter()  //remove or comment this
    }

    dependencies {
        classpath 'com.android.tools.build:gradle:4.1.0'  // or higher
        classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
    }
}

allprojects {
    repositories {
        google()
        mavenCentral()  // add this
        maven {
            url 'https://maven.google.com'
        }
        // jcenter()  // remove or comment this
    }
}

rootProject.buildDir = '../build'
subprojects {
    project.buildDir = "${rootProject.buildDir}/${project.name}"
}
subprojects {
    project.evaluationDependsOn(':app')
}

task clean(type: Delete) {
    delete rootProject.buildDir
}
#Fri Mar 23 08:50:38 IST 2022
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-6.7-all.zip
flutter upgrade

Android, Google-cast, &quot;Error inflating class androidx.mediarouter.app.MediaRouteButton&quot;

copy iconCopydownload iconDownload
implementation "androidx.mediarouter:mediarouter:1.2.6"
-----------------------
<style name="AppTheme" parent="@style/Theme.Leanback">
   <!--   Primary Color -->
   <item name="colorPrimary">@color/defaultColor</item>
</style>
<style name="AppTheme1" parent="@style/Theme.AppCompat.Light.NoActionBar">
        <item name="colorPrimary">@color/blackColor</item>
        <item name="android:windowBackground">@color/blackColor</item>

<!--        <item name="mediaRouteButtonTint">@color/whiteColor</item>-->

        <item name="baseCardViewStyle">@style/Widget.Leanback.BaseCardViewStyle</item>
        <item name="imageCardViewStyle">@style/Widget.Leanback.ImageCardViewStyle</item>
        <item name="imageCardViewImageStyle">@style/Widget.Leanback.ImageCardView.ImageStyle</item>
        <item name="imageCardViewTitleStyle">@style/Widget.Leanback.ImageCardView.TitleStyle</item>
        <item name="imageCardViewContentStyle">@style/Widget.Leanback.ImageCardView.ContentStyle</item>
        <item name="imageCardViewBadgeStyle">@style/Widget.Leanback.ImageCardView.BadgeStyle</item>
        <item name="imageCardViewInfoAreaStyle">@style/Widget.Leanback.ImageCardView.InfoAreaStyle</item>

        <item name="browsePaddingStart">@dimen/lb_browse_padding_start</item>
        <item name="browsePaddingEnd">@dimen/lb_browse_padding_end</item>
        <item name="browsePaddingTop">@dimen/lb_browse_padding_top</item>
        <item name="browsePaddingBottom">@dimen/lb_browse_padding_bottom</item>
        <item name="browseRowsMarginStart">@dimen/lb_browse_rows_margin_start</item>
        <item name="browseRowsMarginTop">@dimen/lb_browse_rows_margin_top</item>
        <item name="browseRowsFadingEdgeLength">@dimen/lb_browse_rows_fading_edge</item>

<!--            <item name="headersVerticalGridStyle">@style/Widget.Leanback.Headers.VerticalGridView</item>-->
<!--            <item name="headerStyle">@style/Widget.Leanback.Header</item>-->
<!--            <item name="sectionHeaderStyle">@style/Widget.Leanback.Header.Section</item>-->

        <item name="rowsVerticalGridStyle">@style/Widget.Leanback.Rows.VerticalGridView</item>
        <item name="rowHorizontalGridStyle">@style/Widget.Leanback.Row.HorizontalGridView</item>
        <item name="itemsVerticalGridStyle">@style/Widget.Leanback.GridItems.VerticalGridView</item>

        <item name="browseTitleViewLayout">@layout/lb_browse_title</item>
        <item name="browseTitleTextStyle">@style/Widget.Leanback.Title.Text</item>
        <item name="browseTitleIconStyle">@style/Widget.Leanback.Title.Icon</item>
        <item name="browseTitleViewStyle">@style/Widget.Leanback.TitleView</item>

        <item name="rowHeaderStyle">@style/Widget.Leanback.Row.Header</item>
        <item name="rowHeaderDescriptionStyle">@style/Widget.Leanback.Row.Header.Description</item>
        <item name="rowHoverCardTitleStyle">@style/Widget.Leanback.Row.HoverCardTitle</item>
        <item name="rowHoverCardDescriptionStyle">@style/Widget.Leanback.Row.HoverCardDescription</item>
        <item name="rowHeaderDockStyle">@style/Widget.Leanback.Row.HeaderDock</item>

<!--            <item name="searchOrbViewStyle">@style/Widget.Leanback.SearchOrbViewStyle</item>-->


        <item name="detailsDescriptionTitleStyle">@style/Widget.Leanback.DetailsDescriptionTitleStyle</item>
        <item name="detailsDescriptionSubtitleStyle">@style/Widget.Leanback.DetailsDescriptionSubtitleStyle</item>
        <item name="detailsDescriptionBodyStyle">@style/Widget.Leanback.DetailsDescriptionBodyStyle</item>
        <item name="detailsActionButtonStyle">@style/Widget.Leanback.DetailsActionButtonStyle</item>
        <!-- Attributes used for styling of a playback -->
        <item name="playbackPaddingStart">@dimen/lb_playback_controls_margin_start</item>
        <item name="playbackPaddingEnd">@dimen/lb_playback_controls_margin_end</item>
        <item name="playbackMediaItemPaddingStart">@dimen/lb_playback_media_row_horizontal_padding</item>

        <item name="playbackMediaListHeaderStyle">@style/Widget.Leanback.PlaybackMediaListHeaderStyle</item>
        <item name="playbackMediaItemRowStyle">@style/Widget.Leanback.PlaybackMediaItemRowStyle</item>
        <item name="playbackMediaItemSeparatorStyle">@style/Widget.Leanback.PlaybackMediaItemSeparatorStyle</item>
        <item name="playbackMediaListHeaderTitleStyle">@style/Widget.Leanback.PlaybackMediaListHeaderTitleStyle</item>
        <item name="playbackMediaItemDetailsStyle">@style/Widget.Leanback.PlaybackMediaItemDetailsStyle</item>
        <item name="playbackMediaItemNumberViewFlipperStyle">@style/Widget.Leanback.PlaybackMediaItemNumberViewFlipperStyle</item>
        <item name="playbackMediaItemNumberViewFlipperLayout">@layout/lb_media_item_number_view_flipper</item>
        <item name="playbackMediaItemNumberStyle">@style/Widget.Leanback.PlaybackMediaItemNumberStyle</item>
        <item name="playbackMediaItemNameStyle">@style/Widget.Leanback.PlaybackMediaItemNameStyle</item>
        <item name="playbackMediaItemDurationStyle">@style/Widget.Leanback.PlaybackMediaItemDurationStyle</item>

        <item name="playbackControlsButtonStyle">@style/Widget.Leanback.PlaybackControlsButtonStyle</item>
        <item name="playbackControlButtonLabelStyle">@style/Widget.Leanback.PlaybackControlLabelStyle</item>
        <item name="playbackControlsTimeStyle">@style/Widget.Leanback.PlaybackControlsTimeStyle</item>
        <item name="playbackControlsActionIcons">@style/Widget.Leanback.PlaybackControlsActionIconsStyle</item>
        <item name="playbackControlsAutoHideTimeout">@integer/lb_playback_controls_show_time_ms</item>
        <item name="playbackControlsAutoHideTickleTimeout">@integer/lb_playback_controls_tickle_timeout_ms</item>

        <item name="errorMessageStyle">@style/Widget.Leanback.ErrorMessageStyle</item>

        <item name="defaultSearchColor">@color/lb_default_search_color</item>
        <item name="defaultSearchIconColor">@color/lb_default_search_icon_color</item>
        <item name="defaultSearchBrightColor">?attr/defaultSearchColor</item>
        <item name="defaultSearchIcon">@drawable/lb_ic_in_app_search</item>

        <item name="defaultSectionHeaderColor">?attr/defaultSearchColor</item>

        <item name="overlayDimMaskColor">@color/lb_view_dim_mask_color</item>
        <item name="overlayDimActiveLevel">@fraction/lb_view_active_level</item>
        <item name="overlayDimDimmedLevel">@fraction/lb_view_dimmed_level</item>

    </style>
-----------------------
<style name="AppTheme" parent="@style/Theme.Leanback">
   <!--   Primary Color -->
   <item name="colorPrimary">@color/defaultColor</item>
</style>
<style name="AppTheme1" parent="@style/Theme.AppCompat.Light.NoActionBar">
        <item name="colorPrimary">@color/blackColor</item>
        <item name="android:windowBackground">@color/blackColor</item>

<!--        <item name="mediaRouteButtonTint">@color/whiteColor</item>-->

        <item name="baseCardViewStyle">@style/Widget.Leanback.BaseCardViewStyle</item>
        <item name="imageCardViewStyle">@style/Widget.Leanback.ImageCardViewStyle</item>
        <item name="imageCardViewImageStyle">@style/Widget.Leanback.ImageCardView.ImageStyle</item>
        <item name="imageCardViewTitleStyle">@style/Widget.Leanback.ImageCardView.TitleStyle</item>
        <item name="imageCardViewContentStyle">@style/Widget.Leanback.ImageCardView.ContentStyle</item>
        <item name="imageCardViewBadgeStyle">@style/Widget.Leanback.ImageCardView.BadgeStyle</item>
        <item name="imageCardViewInfoAreaStyle">@style/Widget.Leanback.ImageCardView.InfoAreaStyle</item>

        <item name="browsePaddingStart">@dimen/lb_browse_padding_start</item>
        <item name="browsePaddingEnd">@dimen/lb_browse_padding_end</item>
        <item name="browsePaddingTop">@dimen/lb_browse_padding_top</item>
        <item name="browsePaddingBottom">@dimen/lb_browse_padding_bottom</item>
        <item name="browseRowsMarginStart">@dimen/lb_browse_rows_margin_start</item>
        <item name="browseRowsMarginTop">@dimen/lb_browse_rows_margin_top</item>
        <item name="browseRowsFadingEdgeLength">@dimen/lb_browse_rows_fading_edge</item>

<!--            <item name="headersVerticalGridStyle">@style/Widget.Leanback.Headers.VerticalGridView</item>-->
<!--            <item name="headerStyle">@style/Widget.Leanback.Header</item>-->
<!--            <item name="sectionHeaderStyle">@style/Widget.Leanback.Header.Section</item>-->

        <item name="rowsVerticalGridStyle">@style/Widget.Leanback.Rows.VerticalGridView</item>
        <item name="rowHorizontalGridStyle">@style/Widget.Leanback.Row.HorizontalGridView</item>
        <item name="itemsVerticalGridStyle">@style/Widget.Leanback.GridItems.VerticalGridView</item>

        <item name="browseTitleViewLayout">@layout/lb_browse_title</item>
        <item name="browseTitleTextStyle">@style/Widget.Leanback.Title.Text</item>
        <item name="browseTitleIconStyle">@style/Widget.Leanback.Title.Icon</item>
        <item name="browseTitleViewStyle">@style/Widget.Leanback.TitleView</item>

        <item name="rowHeaderStyle">@style/Widget.Leanback.Row.Header</item>
        <item name="rowHeaderDescriptionStyle">@style/Widget.Leanback.Row.Header.Description</item>
        <item name="rowHoverCardTitleStyle">@style/Widget.Leanback.Row.HoverCardTitle</item>
        <item name="rowHoverCardDescriptionStyle">@style/Widget.Leanback.Row.HoverCardDescription</item>
        <item name="rowHeaderDockStyle">@style/Widget.Leanback.Row.HeaderDock</item>

<!--            <item name="searchOrbViewStyle">@style/Widget.Leanback.SearchOrbViewStyle</item>-->


        <item name="detailsDescriptionTitleStyle">@style/Widget.Leanback.DetailsDescriptionTitleStyle</item>
        <item name="detailsDescriptionSubtitleStyle">@style/Widget.Leanback.DetailsDescriptionSubtitleStyle</item>
        <item name="detailsDescriptionBodyStyle">@style/Widget.Leanback.DetailsDescriptionBodyStyle</item>
        <item name="detailsActionButtonStyle">@style/Widget.Leanback.DetailsActionButtonStyle</item>
        <!-- Attributes used for styling of a playback -->
        <item name="playbackPaddingStart">@dimen/lb_playback_controls_margin_start</item>
        <item name="playbackPaddingEnd">@dimen/lb_playback_controls_margin_end</item>
        <item name="playbackMediaItemPaddingStart">@dimen/lb_playback_media_row_horizontal_padding</item>

        <item name="playbackMediaListHeaderStyle">@style/Widget.Leanback.PlaybackMediaListHeaderStyle</item>
        <item name="playbackMediaItemRowStyle">@style/Widget.Leanback.PlaybackMediaItemRowStyle</item>
        <item name="playbackMediaItemSeparatorStyle">@style/Widget.Leanback.PlaybackMediaItemSeparatorStyle</item>
        <item name="playbackMediaListHeaderTitleStyle">@style/Widget.Leanback.PlaybackMediaListHeaderTitleStyle</item>
        <item name="playbackMediaItemDetailsStyle">@style/Widget.Leanback.PlaybackMediaItemDetailsStyle</item>
        <item name="playbackMediaItemNumberViewFlipperStyle">@style/Widget.Leanback.PlaybackMediaItemNumberViewFlipperStyle</item>
        <item name="playbackMediaItemNumberViewFlipperLayout">@layout/lb_media_item_number_view_flipper</item>
        <item name="playbackMediaItemNumberStyle">@style/Widget.Leanback.PlaybackMediaItemNumberStyle</item>
        <item name="playbackMediaItemNameStyle">@style/Widget.Leanback.PlaybackMediaItemNameStyle</item>
        <item name="playbackMediaItemDurationStyle">@style/Widget.Leanback.PlaybackMediaItemDurationStyle</item>

        <item name="playbackControlsButtonStyle">@style/Widget.Leanback.PlaybackControlsButtonStyle</item>
        <item name="playbackControlButtonLabelStyle">@style/Widget.Leanback.PlaybackControlLabelStyle</item>
        <item name="playbackControlsTimeStyle">@style/Widget.Leanback.PlaybackControlsTimeStyle</item>
        <item name="playbackControlsActionIcons">@style/Widget.Leanback.PlaybackControlsActionIconsStyle</item>
        <item name="playbackControlsAutoHideTimeout">@integer/lb_playback_controls_show_time_ms</item>
        <item name="playbackControlsAutoHideTickleTimeout">@integer/lb_playback_controls_tickle_timeout_ms</item>

        <item name="errorMessageStyle">@style/Widget.Leanback.ErrorMessageStyle</item>

        <item name="defaultSearchColor">@color/lb_default_search_color</item>
        <item name="defaultSearchIconColor">@color/lb_default_search_icon_color</item>
        <item name="defaultSearchBrightColor">?attr/defaultSearchColor</item>
        <item name="defaultSearchIcon">@drawable/lb_ic_in_app_search</item>

        <item name="defaultSectionHeaderColor">?attr/defaultSearchColor</item>

        <item name="overlayDimMaskColor">@color/lb_view_dim_mask_color</item>
        <item name="overlayDimActiveLevel">@fraction/lb_view_active_level</item>
        <item name="overlayDimDimmedLevel">@fraction/lb_view_dimmed_level</item>

    </style>

How to resolve exoplayer error : AAPT: error: attribute fastforward_increment not found?

copy iconCopydownload iconDownload
private SimpleExoPlayer simpleExoPlayer;
private SimpleExoPlayer.Builder builder;
private PlayerView videoPlayer;
builder = new SimpleExoPlayer.Builder(context);

builder.setSeekBackIncrementMs(10000);
builder.setSeekForwardIncrementMs(10000);

simpleExoPlayer = builder.build();
videoPlayer.setPlayer(simpleExoPlayer);

simpleExoPlayer.addMediaItem([resource],[context]);
simpleExoPlayer.prepare();
-----------------------
private SimpleExoPlayer simpleExoPlayer;
private SimpleExoPlayer.Builder builder;
private PlayerView videoPlayer;
builder = new SimpleExoPlayer.Builder(context);

builder.setSeekBackIncrementMs(10000);
builder.setSeekForwardIncrementMs(10000);

simpleExoPlayer = builder.build();
videoPlayer.setPlayer(simpleExoPlayer);

simpleExoPlayer.addMediaItem([resource],[context]);
simpleExoPlayer.prepare();
-----------------------
val player = ExoPlayer.Builder(this)
            .setSeekBackIncrementMs(10000)
            .setSeekForwardIncrementMs(10000)
            .build()
-----------------------
<com.google.android.exoplayer2.ui.StyledPlayerView
        android:id="@+id/playerView"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        argType:resize_mode="fixed_width"
        argType:show_buffering="when_playing"
        argType:show_fastforward_button="true"
        argType:show_next_button="false"
        argType:show_previous_button="false"
        argType:show_rewind_button="true"
        argType:show_subtitle_button="true"
        argType:use_artwork="true"
        argType:use_controller="true">
    </com.google.android.exoplayer2.ui.StyledPlayerView>
playerView = ExoPlayer.Builder(this)
            .setSeekForwardIncrementMs(10000)
            .setSeekBackIncrementMs(10000)
            .build()
-----------------------
<com.google.android.exoplayer2.ui.StyledPlayerView
        android:id="@+id/playerView"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        argType:resize_mode="fixed_width"
        argType:show_buffering="when_playing"
        argType:show_fastforward_button="true"
        argType:show_next_button="false"
        argType:show_previous_button="false"
        argType:show_rewind_button="true"
        argType:show_subtitle_button="true"
        argType:use_artwork="true"
        argType:use_controller="true">
    </com.google.android.exoplayer2.ui.StyledPlayerView>
playerView = ExoPlayer.Builder(this)
            .setSeekForwardIncrementMs(10000)
            .setSeekBackIncrementMs(10000)
            .build()

How to resolve NullPointerException on HttpURLConnection?

copy iconCopydownload iconDownload
Thank you for your patience while our engineering team worked to resolve this issue. A fix for this issue is now available in:

Android Studio Dolphin Canary 5 (2021.3.1.5)
Android Gradle Plugin 7.3.0-alpha05
We encourage you to try the latest update.

If you notice further issues or have questions, please file a new bug report.

Thank you for taking the time to submit feedback — we really appreciate it!

AudioManager auto switching own mode + not respecting setSpeakerphoneOn()

copy iconCopydownload iconDownload
if (earpieceMode) {
    audioManager.setMode(AudioManager.MODE_IN_COMMUNICATION);
    audioManager.setSpeakerphoneOn(false); // call AFTER setMode
}
ArrayList<Integer> targetTypes = new ArrayList<>();
//add types according to needs, may be few in order of importance
if (bluetoothScoConnected) {
    targetTypes.add(AudioDeviceInfo.TYPE_BLUETOOTH_SCO);
} else if (wiredHeadsetConnected) {
    if (isUsbHeadset) {
        targetTypes.add(AudioDeviceInfo.TYPE_USB_HEADSET);
        targetTypes.add(AudioDeviceInfo.TYPE_USB_DEVICE);
        targetTypes.add(AudioDeviceInfo.TYPE_USB_ACCESSORY);
    } else {
        targetTypes.add(AudioDeviceInfo.TYPE_WIRED_HEADSET);
        targetTypes.add(AudioDeviceInfo.TYPE_WIRED_HEADPHONES);
    }
} else if (earpieceMode) {
    targetTypes.add(AudioDeviceInfo.TYPE_BUILTIN_EARPIECE);
} else { // play out loud
    targetTypes.add(AudioDeviceInfo.TYPE_BUILTIN_SPEAKER);
}

Boolean result = null;
List<AudioDeviceInfo> devices = audioManager.getAvailableCommunicationDevices();

outer:
for (Integer targetType : targetTypes) {
    for (AudioDeviceInfo device : devices) {
        if (device.getType() == targetType) {
            result = audioManager.setCommunicationDevice(device);
            Log.i("AUDIO_MANAGER", "setCommunicationDevice type:" + targetType + " result:" + result);
            break outer;
        }
    }
}

if (result == null) {
    Log.i("AUDIO_MANAGER", "setCommunicationDevice targetType NOT FOUND!!");
}
-----------------------
if (earpieceMode) {
    audioManager.setMode(AudioManager.MODE_IN_COMMUNICATION);
    audioManager.setSpeakerphoneOn(false); // call AFTER setMode
}
ArrayList<Integer> targetTypes = new ArrayList<>();
//add types according to needs, may be few in order of importance
if (bluetoothScoConnected) {
    targetTypes.add(AudioDeviceInfo.TYPE_BLUETOOTH_SCO);
} else if (wiredHeadsetConnected) {
    if (isUsbHeadset) {
        targetTypes.add(AudioDeviceInfo.TYPE_USB_HEADSET);
        targetTypes.add(AudioDeviceInfo.TYPE_USB_DEVICE);
        targetTypes.add(AudioDeviceInfo.TYPE_USB_ACCESSORY);
    } else {
        targetTypes.add(AudioDeviceInfo.TYPE_WIRED_HEADSET);
        targetTypes.add(AudioDeviceInfo.TYPE_WIRED_HEADPHONES);
    }
} else if (earpieceMode) {
    targetTypes.add(AudioDeviceInfo.TYPE_BUILTIN_EARPIECE);
} else { // play out loud
    targetTypes.add(AudioDeviceInfo.TYPE_BUILTIN_SPEAKER);
}

Boolean result = null;
List<AudioDeviceInfo> devices = audioManager.getAvailableCommunicationDevices();

outer:
for (Integer targetType : targetTypes) {
    for (AudioDeviceInfo device : devices) {
        if (device.getType() == targetType) {
            result = audioManager.setCommunicationDevice(device);
            Log.i("AUDIO_MANAGER", "setCommunicationDevice type:" + targetType + " result:" + result);
            break outer;
        }
    }
}

if (result == null) {
    Log.i("AUDIO_MANAGER", "setCommunicationDevice targetType NOT FOUND!!");
}

IllegalStateException using ExoPlayer on Sony TV

copy iconCopydownload iconDownload
02-10 21:31:39.606  7036  7218 E AndroidRuntime: FATAL EXCEPTION: TvCardUpdater-0
02-10 21:31:39.606  7036  7218 E AndroidRuntime: Process: com.sony.dtv.tvx, PID: 7036
02-10 21:31:39.606  7036  7218 E AndroidRuntime: java.lang.RuntimeException: An error occurred while executing doInBackground()
02-10 21:31:39.606  7036  7218 E AndroidRuntime:        at android.os.AsyncTask$3.done(AsyncTask.java:354)
02-10 21:31:39.606  7036  7218 E AndroidRuntime:        at java.util.concurrent.FutureTask.finishCompletion(FutureTask.java:383)
02-10 21:31:39.606  7036  7218 E AndroidRuntime:        at java.util.concurrent.FutureTask.setException(FutureTask.java:252)
02-10 21:31:39.606  7036  7218 E AndroidRuntime:        at java.util.concurrent.FutureTask.run(FutureTask.java:271)
02-10 21:31:39.606  7036  7218 E AndroidRuntime:        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
02-10 21:31:39.606  7036  7218 E AndroidRuntime:        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
02-10 21:31:39.606  7036  7218 E AndroidRuntime:        at java.lang.Thread.run(Thread.java:764)
02-10 21:31:39.606  7036  7218 E AndroidRuntime: Caused by: java.lang.ClassCastException: android.graphics.drawable.VectorDrawable cannot be cast to android.graphics.drawable.BitmapDrawable
02-10 21:31:39.606  7036  7218 E AndroidRuntime:        at com.sony.dtv.tvx.tvplayer.function.actionmenu.tvcardstate.AppLinkItemCreator.makeStateOfAppLink(AppLinkItemCreator.java:59)

Manifest merger failed : android:exported needs to be explicitly specified for &lt;receiver&gt;

copy iconCopydownload iconDownload
com.instacart.library.truetime.BootCompletedBroadcastReceiver
compileSdkVersion 32
    defaultConfig {
        multiDexEnabled true
        applicationId "com.example.app" /// change your app Id not to use example... This will be rejected on play store
        minSdkVersion 21
        targetSdkVersion 32
        versionCode 53
        versionName "2.0.4"
       //comment out this ndk.abiFilters 'armeabi-v7a', 'arm64-v8a', 'x86', 'x86_64'
        testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
    }
-----------------------
com.instacart.library.truetime.BootCompletedBroadcastReceiver
compileSdkVersion 32
    defaultConfig {
        multiDexEnabled true
        applicationId "com.example.app" /// change your app Id not to use example... This will be rejected on play store
        minSdkVersion 21
        targetSdkVersion 32
        versionCode 53
        versionName "2.0.4"
       //comment out this ndk.abiFilters 'armeabi-v7a', 'arm64-v8a', 'x86', 'x86_64'
        testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
    }
-----------------------
    implementation 'com.github.instacart.truetime-android:library:3.5'
    implementation 'com.github.instacart.truetime-android:library-extension-rx:3.5'

SimpleExoPlayer.Builder(this).build() deprecated

copy iconCopydownload iconDownload
player = ExoPlayer.Builder(this).build()
-----------------------
private var exoPlayer: ExoPlayer? = null
exoPlayer = ExoPlayer.Builder(this).build()
-----------------------
ExoPlayer player = new ExoPlayer.Builder(context).build();

react-native-video 5.2.0 Android Build error RNC 0.66.3

copy iconCopydownload iconDownload
"dependencies": {
    ...
    ...
    "shaka-player": "^3.2.1" // Add this line
},
dependencies {
    ...
    ...
   - implementation('com.google.android.exoplayer:exoplayer:2.13.2') { // delete this line
   + implementation('com.google.android.exoplayer:exoplayer:2.13.3') {  // add this line
        exclude group: 'com.android.support'
    }

    ...
    ...

   - implementation('com.google.android.exoplayer:extension-okhttp:2.13.2') { // delete this line
   + implementation('com.google.android.exoplayer:extension-okhttp:2.13.3') { // add this line
        exclude group: 'com.squareup.okhttp3', module: 'okhttp'
    }
}
-----------------------
"dependencies": {
    ...
    ...
    "shaka-player": "^3.2.1" // Add this line
},
dependencies {
    ...
    ...
   - implementation('com.google.android.exoplayer:exoplayer:2.13.2') { // delete this line
   + implementation('com.google.android.exoplayer:exoplayer:2.13.3') {  // add this line
        exclude group: 'com.android.support'
    }

    ...
    ...

   - implementation('com.google.android.exoplayer:extension-okhttp:2.13.2') { // delete this line
   + implementation('com.google.android.exoplayer:extension-okhttp:2.13.3') { // add this line
        exclude group: 'com.squareup.okhttp3', module: 'okhttp'
    }
}

Received status code 502 from server: Bad Gateway with exo player

copy iconCopydownload iconDownload
buildscript {
    ext.kotlin_version = '1.3.50'
    repositories {
        google()
        mavenCentral() <-- Added
    }

    dependencies {
        classpath 'com.android.tools.build:gradle:4.1.1'
        classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.4.32"
    }
}

allprojects {
    repositories {
        google()
        mavenCentral() <-- Added
    }
}

Community Discussions

Trending Discussions on ExoPlayer
  • Could not GET 'play-services-location/maven-metadata.xml'. Received status code 502 from server: Bad Gateway
  • Failed to initialize OMX.MTK.VIDEO.DECODER.AVC, error 0xfffffff4
  • Audio keeps playing when exoplayer releases
  • Android, Google-cast, &quot;Error inflating class androidx.mediarouter.app.MediaRouteButton&quot;
  • How to resolve exoplayer error : AAPT: error: attribute fastforward_increment not found?
  • How to resolve NullPointerException on HttpURLConnection?
  • Exoplayer load frame when seekbar change
  • AudioManager auto switching own mode + not respecting setSpeakerphoneOn()
  • IllegalStateException using ExoPlayer on Sony TV
  • Manifest merger failed : android:exported needs to be explicitly specified for &lt;receiver&gt;
Trending Discussions on ExoPlayer

QUESTION

Could not GET 'play-services-location/maven-metadata.xml'. Received status code 502 from server: Bad Gateway

Asked 2022-Mar-28 at 07:02

I have a project which was running well yesterday, but today I find this problem:

Could not resolve all files for configuration ':app:debugRuntimeClasspath'. Could not resolve com.google.android.gms:play-services-location:16.+. Required by: project :app > project :location > Failed to list versions for com.google.android.gms:play-services-location. > Unable to load Maven meta-data from https://google.bintray.com/exoplayer/com/google/android/gms/play-services-location/maven-metadata.xml. > Could not get resource 'https://google.bintray.com/exoplayer/com/google/android/gms/play-services-location/maven-metadata.xml'. > Could not GET 'https://google.bintray.com/exoplayer/com/google/android/gms/play-services-location/maven-metadata.xml'. Received status code 502 from server: Bad Gateway

acutely I'm using classpath 'com.android.tools.build:gradle:4.1.0'with distributionUrl=https://services.gradle.org/distributions/gradle-6.5-bin.zip I have followed this question and I upgraded 'com.android.tools.build:gradle:4.1.0' to classpath 'com.android.tools.build:gradle:4.2.0' then I changed distributionUrl=https://services.gradle.org/distributions/gradle-6.5-bin.zip to distributionUrl=https\://services.gradle.org/distributions/gradle-6.7.1-all.zip but I still got the error.

my android/build.gradle:

buildscript {
    repositories {
        google()
        jcenter()
    }

    dependencies {
        classpath 'com.android.tools.build:gradle:4.2.0'
    }
}

allprojects {
    repositories {
        google()
        jcenter()
    }
}

rootProject.buildDir = '../build'
subprojects {
    project.buildDir = "${rootProject.buildDir}/${project.name}"
}
subprojects {
    project.evaluationDependsOn(':app')
}

task clean(type: Delete) {
    delete rootProject.buildDir
}

and gradle-wrapper.properties:

distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-6.7.1-all.zip

Also I have changed the compileSdkVersion , minSdkVersion and targetSdkVersion to be 30 but nothing happened.

ANSWER

Answered 2021-Dec-01 at 09:09

It looks like a temporary issue, the server with these libraries is down. I have the same problem now with Room:

Could not GET 'https://google.bintray.com/exoplayer/androidx/room/room-common/maven-metadata.xml'. Received status code 502 from server: Bad Gateway

You can try using offline mode if you're using Android Studio, then it will use the cached version of this library if you have it until it is fixed.

UPD. I switched to an alpha version of a flutter lib which caused this (workmanager) and it works well now. As far as I understand it was depending on an old version of Android Room library which is not available anymore since Bintray is not available. The new version of Room is available as it's being downloaded thorough another link. So for you the solution could be updating to a newer version of Flutter location package or forking it and changing the version of play-services-location to the most recent one.

Source https://stackoverflow.com/questions/70166663

Community Discussions, Code Snippets contain sources that include Stack Exchange Network

Vulnerabilities

No vulnerabilities reported

Install ExoPlayer

You can download it from GitHub, Maven.
You can use ExoPlayer like any standard Java library. Please include the the jar files in your classpath. You can also use any IDE and you can run and debug the ExoPlayer component as you would do with any other Java program. Best practice is to use a build tool that supports dependency management such as Maven or Gradle. For Maven installation, please refer maven.apache.org. For Gradle installation, please refer gradle.org .

Support

The developer guide provides a wealth of information.The class reference documents ExoPlayer classes.The release notes document the major changes in each release.Follow our developer blog to keep up to date with the latest ExoPlayer developments!

DOWNLOAD this Library from

Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from
over 430 million Knowledge Items
Find more libraries
Reuse Solution Kits and Libraries Curated by Popular Use Cases

Save this library and start creating your kit

Explore Related Topics

Share this Page

share link
Reuse Pre-built Kits with ExoPlayer
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from
over 430 million Knowledge Items
Find more libraries
Reuse Solution Kits and Libraries Curated by Popular Use Cases

Save this library and start creating your kit

  • © 2022 Open Weaver Inc.