Git Product home page Git Product logo

mux-stats-sdk-bitmovin-android's Introduction

Mux Stats SDK for Bitmovin Android Player

This is the Mux wrapper around the Bitmovin player SDK, built on top of Mux's core Java library, providing Mux Data performance analytics for applications utilizing Bitmovin.

Setup and Usage

Add the Mux Bitmovin SDK to your build

Use whichever of the following options is best for your project

Option 1: Using settings.gradle

Add the following lines to your dependencyResolutionManagement {...} block

maven {
  url "https://muxinc.jfrog.io/artifactory/default-maven-release-local"
}

Option 2: Using build.gradle

Add the following lines to your project's build.gradle

allprojects {
    repositories {
        maven {
          url "https://muxinc.jfrog.io/artifactory/default-maven-release-local"
        }
    }
}

Add the SDK as a Dependency in your application

Add one the following lines to the dependencies block in your app module's build.gradle, depending on which bitmovin library you are using. The current version can be found on our Releases Page

Bitmovin Player support

We support version 3.11.1 of Bitmovin Player. Support for additional versions is planned

implementation 'com.mux.stats.sdk.muxstats:muxstatssdkbitmovinplayer_r3_11_1:[CurrentVersion]'

Monitor Bitmovin Player using Mux Data

The Mux Data SDK for Bitmovin Player can be used by creating a new instance of MuxStatsBitmovinPlayer with the desired configuration. The constructor requires a MuxStatsBitmovinPlayer, which Mux will observe for data events.

// Initialize with data about you, your video, and your app
CustomerPlayerData customerPlayerData = new CustomerPlayerData();
customerPlayerData.setEnvironmentKey("YOUR_ENVIRONMENT_KEY_HERE");
CustomerVideoData customerVideoData = new CustomerVideoData();
customerVideoData.setVideoTitle("VIDEO_TITLE_HERE");
CustomData customData = new CustomData();
customData.setCustomData1("YOUR_CUSTOM_STRING_HERE");
CustomerData customerData = new CustomerData(customerPlayerData, customerVideoData, null);
customerData.setCustomData(customData);

// Create a new Mux Stats monitor 
muxStatsBitmovin = new MuxStatsSDKBitmovinPlayer(
        this, /* context */
        playerView, /* Bitmovin player view */ 
        "demo-view-player", /* player name */
        customerData /* Mux CustomerData */);

// Set the size of the screen
Point size = new Point();
getWindowManager().getDefaultDisplay().getSize(size);
muxStatsBitmovin.setScreenSize(size.x, size.y);

You must also release the MuxStatsSDKBitmovinPlayer object when your component's lifecycle is ending. For example:

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

Releases

The current version of the SDK is v0.5.0, as of 3/14/2022

All release notes can be found in our changelog

Contributing

Developer Quick Start

  • Open this project in Android Studio, and let Gradle run to configure the application.
  • Build variants can be selected to support different versions of Bitmovin player.

Style

The code in this repo conforms to the Google Java Style Guide. Run the reformatter on files before committing. The code was formatted in Android Studio/IntelliJ using the Google Java Style for IntelliJ. The style can be installed via the Java-style section of the IDE preferences (Editor -> Code Style - >Java).

Documentation

See our docs for more information.

mux-stats-sdk-bitmovin-android's People

Contributors

com6056 avatar daytime-em avatar jsanford8 avatar nbirkenshaw-mux avatar skidder avatar tomkordic avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Forkers

ets-android5

mux-stats-sdk-bitmovin-android's Issues

MUX Stat Config is freezing player's UI

Hi, we are having some issues on several users since Sep 16th

Bitmovin Version: 3.23.0 (we tested with these 3 version, 3.11.1 and 3.18.1, no problems were found, we published the app 2 days before the issue appeared)
MUX SDK Version: 0.5.1

What is happening: Mux configuration is freezing the player UI, content audio can be listened, after a while Android alert pop up.

Here is the Stat Configuration:

val player = Player.create(this, playerConfig = playerConfig).also {
                bView.bitmovinPlayerView.player = it
            }
            //setup player listeners
            setupPlayerListeners()
            //Load playlist
            player.load(playlistConfig)
            setMUXConfig()
private fun setMUXConfig() {
        Log.e("here", "MUX Config")

        try {
            val customerPlayerData = CustomerPlayerData()
            customerPlayerData.environmentKey = BuildConfig.MUX_KEY
            val customerVideoData = CustomerVideoData()
            customerVideoData.videoTitle = titleVideo
            customerVideoData.videoId = titleVideoID
            customerVideoData.videoSeries = episodeName
            customerPlayerData.playerInitTime = getCurrentNowMilliseconds()
            customerPlayerData.subPropertyId = BuildConfig.SUB_PROPERTY_ID
            val customerData = CustomerData(customerPlayerData, customerVideoData, null)

            muxStatsBitmovin = MuxStatsSDKBitmovinPlayer(
                this,
                bView.bitmovinPlayerView,
                "Riivi",
                customerData)

            val size = Point()
            windowManager.defaultDisplay.getSize(size)
            muxStatsBitmovin?.setScreenSize(size.x, size.y)

        } catch (e: Exception){
            Log.e("mux", "${e.message}")
        }

    }

And here is the Stacktrace:

  at com.mux.stats.sdk.muxstats.MuxStats.handle (unavailable:2)
  at com.mux.stats.sdk.core.events.EventBus.dispatch (unavailable:24)
  at com.mux.stats.sdk.muxstats.bitmovinplayer.MuxStatsSDKBitmovinPlayer.dispatch (MuxStatsSDKBitmovinPlayer.java:587)
  at com.mux.stats.sdk.muxstats.bitmovinplayer.MuxStatsSDKBitmovinPlayer.buffering (MuxStatsSDKBitmovinPlayer.java:386)
  at com.mux.stats.sdk.muxstats.bitmovinplayer.MuxStatsSDKBitmovinPlayer.lambda$new$10$com-mux-stats-sdk-muxstats-bitmovinplayer-MuxStatsSDKBitmovinPlayer (MuxStatsSDKBitmovinPlayer.java:263)
  at com.mux.stats.sdk.muxstats.bitmovinplayer.MuxStatsSDKBitmovinPlayer$$ExternalSyntheticLambda11.onEvent (unavailable:4)
  at com.bitmovin.player.api.event.EventEmitter$DefaultImpls$d.a (SourceFile:1)
  at com.bitmovin.player.api.event.EventEmitter$DefaultImpls$d.invoke (SourceFile:1)
  at com.bitmovin.player.u.b.b (SourceFile:206)
  at com.bitmovin.player.u.d.a (SourceFile:1)
  at com.bitmovin.player.f.p0.a (SourceFile:42)
  at com.bitmovin.player.f.p0.a (SourceFile:1)
  at com.bitmovin.player.f.p0.b (SourceFile:1)
  at com.bitmovin.player.f.p0$a.a (SourceFile:2)
  at com.bitmovin.player.f.p0$a.invoke (SourceFile:1)
  at kotlinx.coroutines.flow.FlowKt__TransformKt$onEach$$inlined$unsafeTransform$1$2.emit (Emitters.kt:223)
  at kotlinx.coroutines.flow.StateFlowImpl.collect (StateFlow.kt:398)
  at kotlinx.coroutines.flow.FlowKt__TransformKt$onEach$$inlined$unsafeTransform$1.collect (SafeCollector.common.kt:113)
  at kotlinx.coroutines.flow.FlowKt__CollectKt.collect (Collect.kt:30)
  at kotlinx.coroutines.flow.FlowKt.collect (unavailable:1)
  at kotlinx.coroutines.flow.FlowKt__CollectKt$launchIn$1.invokeSuspend (Collect.kt:50)
  at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith (ContinuationImpl.kt:33)
  at kotlinx.coroutines.DispatchedTask.run (DispatchedTask.kt:106)
  at android.os.Handler.handleCallback (Handler.java:938)
  at android.os.Handler.dispatchMessage (Handler.java:99)
  at android.os.Looper.loopOnce (Looper.java:226)
  at android.os.Looper.loop (Looper.java:313)
  at android.app.ActivityThread.main (ActivityThread.java:8663)
  at java.lang.reflect.Method.invoke (Native method)
  at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run (RuntimeInit.java:571)
  at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:1135)

NullPointerException on 0.5.3 with Bitmovin Player

Hello again

We are having some crashes from MUX sdk verion 0.5.3 with Bitmovin Player 3.24.1 since January 23rd.

From a pool of 44k users, is not so serious, but we want to check what is the problem

Here is the stacktrace:

Exception java.lang.NullPointerException:
  at com.mux.stats.sdk.muxstats.bitmovinplayer.MuxStatsSDKBitmovinPlayer.lambda$new$12$com-mux-stats-sdk-muxstats-bitmovinplayer-MuxStatsSDKBitmovinPlayer (MuxStatsSDKBitmovinPlayer.java:267)
  at com.mux.stats.sdk.muxstats.bitmovinplayer.MuxStatsSDKBitmovinPlayer$$ExternalSyntheticLambda13.onEvent
  at com.bitmovin.player.api.event.EventEmitter$DefaultImpls$d.a (SourceFile:1)
  at com.bitmovin.player.api.event.EventEmitter$DefaultImpls$d.invoke (SourceFile:1)
  at com.bitmovin.player.u.b.b (SourceFile:206)
  at com.bitmovin.player.u.d.a (SourceFile:1)
  at com.bitmovin.player.b.r0.b (SourceFile:4)
  at com.bitmovin.player.b.r0.a (SourceFile:19)
  at com.bitmovin.player.b.r0.c (SourceFile:5)
  at com.bitmovin.player.b.s0.b (SourceFile:8)
  at com.bitmovin.player.a.e.a (SourceFile:217)
  at com.bitmovin.player.a.e.a (SourceFile:4)
  at com.bitmovin.player.a.e$c.a (SourceFile:1)
  at com.bitmovin.player.a.e$c.invoke (SourceFile:1)
  at com.bitmovin.player.u.b.b (SourceFile:206)
  at com.bitmovin.player.u.d.a (SourceFile:1)
  at com.bitmovin.player.i.p.a (SourceFile:13)
  at com.bitmovin.player.f.c0.k (SourceFile:9)
  at com.bitmovin.player.f.c0.play (SourceFile:1)
  at com.bitmovin.player.f.i.play (SourceFile:1)
  at com.bitmovin.player.a.b.play (SourceFile:1)
  at com.bitmovin.player.a.e.play
  at com.bitmovin.player.a.g.playAd (SourceFile:1)
  at com.google.ads.interactivemedia.v3.internal.akf.f (IMASDK:6)
  at com.google.ads.interactivemedia.v3.internal.ajx.r (IMASDK:3)
  at com.google.ads.interactivemedia.v3.internal.ajx.k (IMASDK:117)
  at com.google.ads.interactivemedia.v3.internal.ake.f (IMASDK:6)
  at com.google.ads.interactivemedia.v3.internal.aka.onPostMessage (IMASDK:2)
  at androidx.webkit.internal.WebMessageListenerAdapter.onPostMessage (WebMessageListenerAdapter.java:54)
  at java.lang.reflect.Method.invoke
  at org.chromium.support_lib_boundary.util.BoundaryInterfaceReflectionUtil$InvocationHandlerWithDelegateGetter.invoke (BoundaryInterfaceReflectionUtil.java:162)
  at java.lang.reflect.Proxy.invoke (Proxy.java:1006)
  at $Proxy14.onPostMessage
  at org.chromium.android_webview.WebMessageListenerHolder.onPostMessage (chromium-TrichromeWebViewGoogle.aab-stable-<US_SOCIAL_SECURITY_NUMBER>:53)
  at android.os.MessageQueue.nativePollOnce
  at android.os.MessageQueue.next (MessageQueue.java:335)
  at android.os.Looper.loopOnce (Looper.java:186)
  at android.os.Looper.loop (Looper.java:313)
  at android.app.ActivityThread.main (ActivityThread.java:8741)
  at java.lang.reflect.Method.invoke
  at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run (RuntimeInit.java:571)
  at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:1067)

And here are the top devices having the problem

Captura de pantalla 2023-02-03 a la(s) 11 41 34

Let me know if you need another data
Cheers.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.