# Android: WOWZPlayerView background settable by theme causing invisibility

**URL:** <https://community.wowza.com/t/android-wowzplayerview-background-settable-by-theme-causing-invisibility/54091>\
**Category:** Wowza GoCoder SDK\
**Created:** [October 19, 2019, 12:46am UTC](https://community.wowza.com/t/android-wowzplayerview-background-settable-by-theme-causing-invisibility/54091 "2019-10-19T00:46:40Z")\
**Posts on this page:** 18\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sami\_Eljabali](https://avatars.discourse-cdn.com/v4/letter/s/6bbea6/32.png) [@Sami\_Eljabali](https://community.wowza.com/u/Sami_Eljabali)\
**Post date:** [October 19, 2019, 12:46am UTC](https://community.wowza.com/t/android-wowzplayerview-background-settable-by-theme-causing-invisibility/54091/1 "2019-10-19T00:46:40Z")

</div>

I have a basic fragment with the following XML:

```auto
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:clickable="true"
        android:focusable="true"
        android:orientation="vertical">

    <com.wowza.gocoder.sdk.api.player.WOWZPlayerView
            android:id="@+id/videoPlayerView"
            android:layout_width="match_parent"
            android:layout_height="match_parent"/>
</LinearLayout

```

My application is using a single theme across all of its pages:

```auto
<style name="Theme.Foo" parent="Theme.AppCompat.NoActionBar">
    <item name="android:windowIsTranslucent">false</item>
    <!-- General theme colors -->
    <item name="colorPrimary">@color/fooColorPrimary</item>
    <item name="colorPrimaryDark">@color/fooColorPrimaryDark</item>
    <item name="colorAccent">@color/fooColorAccent</item>
    <item name="android:background">@color/fooBackground</item>

```

My issue is that because the background of `WOWZPlayerView` is being set by the theme, as is its outer linear layout background, it causes it to appear invisible.

I’ve tried making the `WOWZPlayerView` not take the background of the theme by setting on it:

```auto
android:background="@null"
android:theme="@android:style/Theme.Holo.Light"

```

However its background was still being set. I am certain this is the case since in commenting out the

```auto
<item name="android:background">@color/fooBackground</item>

```

portion of my theme definition do I see the video being played.

Fix is to not allow the `WOWZPlayerView` have `setBackground(Drawable background)` yield any effect.

TL;DR: WOWZPlayerView shouldn’t expose its `setBackground` method or simply have it no-op.

---

<div class="post-metadata">

**Author:** ![Rose\_Power-Wowza\_Com](https://sea2.discourse-cdn.com/flex002/user_avatar/community.wowza.com/rose_power-wowza_com/32/431_2.png) [@Rose\_Power-Wowza\_Com](https://community.wowza.com/u/Rose_Power-Wowza_Com)\
**Post date:** [October 21, 2019, 5:47pm UTC](https://community.wowza.com/t/android-wowzplayerview-background-settable-by-theme-causing-invisibility/54091/2 "2019-10-21T17:47:01Z")

</div>

Looking into this for you @Sami Eljabali…

---

<div class="post-metadata">

**Author:** ![Sami\_Eljabali](https://avatars.discourse-cdn.com/v4/letter/s/6bbea6/32.png) [@Sami\_Eljabali](https://community.wowza.com/u/Sami_Eljabali)\
**Post date:** [November 12, 2019, 10:29pm UTC](https://community.wowza.com/t/android-wowzplayerview-background-settable-by-theme-causing-invisibility/54091/3 "2019-11-12T22:29:22Z")

</div>

Hi @Rose Power-Wowza Community Manager, any updates on this? If you guys like, I can provide a sample project illustrating the issue.

---

<div class="post-metadata">

**Author:** ![Rose\_Power-Wowza\_Com](https://sea2.discourse-cdn.com/flex002/user_avatar/community.wowza.com/rose_power-wowza_com/32/431_2.png) [@Rose\_Power-Wowza\_Com](https://community.wowza.com/u/Rose_Power-Wowza_Com)\
**Post date:** [November 12, 2019, 10:51pm UTC](https://community.wowza.com/t/android-wowzplayerview-background-settable-by-theme-causing-invisibility/54091/4 "2019-11-12T22:51:30Z")

</div>

Let me ask the SDK team if we have a fix for this.

---

<div class="post-metadata">

**Author:** ![Rose\_Power-Wowza\_Com](https://sea2.discourse-cdn.com/flex002/user_avatar/community.wowza.com/rose_power-wowza_com/32/431_2.png) [@Rose\_Power-Wowza\_Com](https://community.wowza.com/u/Rose_Power-Wowza_Com)\
**Post date:** [November 12, 2019, 11:07pm UTC](https://community.wowza.com/t/android-wowzplayerview-background-settable-by-theme-causing-invisibility/54091/5 "2019-11-12T23:07:21Z")

</div>

Thanks for your patience on this @Sami Eljabali, but placing the WOWZPlayerView inside a fragment is NOT possible at this time with Android GoCoder SDK.

---

<div class="post-metadata">

**Author:** ![Sami\_Eljabali](https://avatars.discourse-cdn.com/v4/letter/s/6bbea6/32.png) [@Sami\_Eljabali](https://community.wowza.com/u/Sami_Eljabali)\
**Post date:** [November 12, 2019, 11:15pm UTC](https://community.wowza.com/t/android-wowzplayerview-background-settable-by-theme-causing-invisibility/54091/6 "2019-11-12T23:15:36Z")

</div>

Hi @Rose Power-Wowza Community Manager, I actually got it working in a fragment as my description mentions, which is besides the point. The problem remains as it has to do with the video player View itself and its allowance of themes altering its background. Whether the view is in an activity or in a fragment does not matter in this instance.

---

<div class="post-metadata">

**Author:** ![Rose\_Power-Wowza\_Com](https://sea2.discourse-cdn.com/flex002/user_avatar/community.wowza.com/rose_power-wowza_com/32/431_2.png) [@Rose\_Power-Wowza\_Com](https://community.wowza.com/u/Rose_Power-Wowza_Com)\
**Post date:** [November 12, 2019, 11:53pm UTC](https://community.wowza.com/t/android-wowzplayerview-background-settable-by-theme-causing-invisibility/54091/7 "2019-11-12T23:53:32Z")

</div>

That’s great you got that to work. Let me check back with the SDK engineer and share your feedback and get you a more specific answer regarding the theme altering the background. As soon as I know, I will post and tag you.

---

<div class="post-metadata">

**Author:** ![Rose\_Power-Wowza\_Com](https://sea2.discourse-cdn.com/flex002/user_avatar/community.wowza.com/rose_power-wowza_com/32/431_2.png) [@Rose\_Power-Wowza\_Com](https://community.wowza.com/u/Rose_Power-Wowza_Com)\
**Post date:** [November 13, 2019, 12:44am UTC](https://community.wowza.com/t/android-wowzplayerview-background-settable-by-theme-causing-invisibility/54091/8 "2019-11-13T00:44:14Z")

</div>

If you could please provide that sample of your project @Sami Eljabali, the SDK team is curious how you are using this so they can better assist. They’re also curious why you aren’t using the native Android player. Are you setting up a Ultra low latency stream with Wowza that requires the Wowza Player? Just need more details so the sample would be great. You can email it to me directly if you’d like at [rose.power@wowza.com](mailto:rose.power@wowza.com) in case there is any key information in it that we wouldn’t want posted publicly.

Thanks and I’ll look for your reply.

---

<div class="post-metadata">

**Author:** ![Sami\_Eljabali](https://avatars.discourse-cdn.com/v4/letter/s/6bbea6/32.png) [@Sami\_Eljabali](https://community.wowza.com/u/Sami_Eljabali)\
**Post date:** [November 13, 2019, 10:09pm UTC](https://community.wowza.com/t/android-wowzplayerview-background-settable-by-theme-causing-invisibility/54091/9 "2019-11-13T22:09:54Z")

</div>

Hi @Rose Power-Wowza Community Manager. I’ve created a sample repository illustrating the issue that can be found here: [https://github.com/seljabali/wowza-themed-player-issue](https://github.com/seljabali/wowza-themed-player-issue). In the codebase lie TODOs that help replicate the issue locally. By the way, I am using the native player. You’re thinking of the other forum question I posted, which is not related to this. Best!

---

<div class="post-metadata">

**Author:** ![Sami\_Eljabali](https://avatars.discourse-cdn.com/v4/letter/s/6bbea6/32.png) [@Sami\_Eljabali](https://community.wowza.com/u/Sami_Eljabali)\
**Post date:** [December 18, 2019, 11:15pm UTC](https://community.wowza.com/t/android-wowzplayerview-background-settable-by-theme-causing-invisibility/54091/10 "2019-12-18T23:15:34Z")

</div>

Hi @Rose Power-Wowza Community Manager has the SDK team found the repository useful in reproducing the issue?

---

<div class="post-metadata">

**Author:** ![Fabio\_De\_Lorenzo1](https://sea2.discourse-cdn.com/flex002/user_avatar/community.wowza.com/fabio_de_lorenzo1/32/419_2.png) [@Fabio\_De\_Lorenzo1](https://community.wowza.com/u/Fabio_De_Lorenzo1)\
**Post date:** [December 18, 2019, 11:28pm UTC](https://community.wowza.com/t/android-wowzplayerview-background-settable-by-theme-causing-invisibility/54091/11 "2019-12-18T23:28:11Z")

</div>

Hi @Sami Eljabali, are you playing HLS or ULL ?

Thanks

---

<div class="post-metadata">

**Author:** ![Sami\_Eljabali](https://avatars.discourse-cdn.com/v4/letter/s/6bbea6/32.png) [@Sami\_Eljabali](https://community.wowza.com/u/Sami_Eljabali)\
**Post date:** [December 19, 2019, 4:45pm UTC](https://community.wowza.com/t/android-wowzplayerview-background-settable-by-theme-causing-invisibility/54091/12 "2019-12-19T16:45:09Z")

</div>

Hi @Fabio De Lorenzo. I don’t think it quite matters, as the Video Player view background is changed. I tried VOD & LIVE app id videos.

---

<div class="post-metadata">

**Author:** ![Sami\_Eljabali](https://avatars.discourse-cdn.com/v4/letter/s/6bbea6/32.png) [@Sami\_Eljabali](https://community.wowza.com/u/Sami_Eljabali)\
**Post date:** [December 19, 2019, 4:45pm UTC](https://community.wowza.com/t/android-wowzplayerview-background-settable-by-theme-causing-invisibility/54091/13 "2019-12-19T16:45:16Z")

</div>

Hi @Fabio De Lorenzo, I don’t believe it matters as the Video Player itself becomes invisible. I’ve verified this is the case with a live stream as well as with a playback of VOD app id type. I’m unsure of the video type playing in nature. Thanks!

---

<div class="post-metadata">

**Author:** ![Fabio\_De\_Lorenzo1](https://sea2.discourse-cdn.com/flex002/user_avatar/community.wowza.com/fabio_de_lorenzo1/32/419_2.png) [@Fabio\_De\_Lorenzo1](https://community.wowza.com/u/Fabio_De_Lorenzo1)\
**Post date:** [December 19, 2019, 5:14pm UTC](https://community.wowza.com/t/android-wowzplayerview-background-settable-by-theme-causing-invisibility/54091/14 "2019-12-19T17:14:12Z")

</div>

It doesn’t for your question. If you don’t mind, since you are asking for support, could we know what you are trying to playback ? HLS or ULL ?

Thanks

---

<div class="post-metadata">

**Author:** ![Sami\_Eljabali](https://avatars.discourse-cdn.com/v4/letter/s/6bbea6/32.png) [@Sami\_Eljabali](https://community.wowza.com/u/Sami_Eljabali)\
**Post date:** [December 20, 2019, 5:16pm UTC](https://community.wowza.com/t/android-wowzplayerview-background-settable-by-theme-causing-invisibility/54091/15 "2019-12-20T17:16:55Z")

</div>

@Fabio De Lorenzo, HLS.

---

<div class="post-metadata">

**Author:** ![Sami\_Eljabali](https://avatars.discourse-cdn.com/v4/letter/s/6bbea6/32.png) [@Sami\_Eljabali](https://community.wowza.com/u/Sami_Eljabali)\
**Post date:** [January 14, 2020, 5:46pm UTC](https://community.wowza.com/t/android-wowzplayerview-background-settable-by-theme-causing-invisibility/54091/16 "2020-01-14T17:46:31Z")

</div>

@Fabio De Lorenzo were you able to replicate the issue? Are there any updates?

---

<div class="post-metadata">

**Author:** ![Fabio\_De\_Lorenzo1](https://sea2.discourse-cdn.com/flex002/user_avatar/community.wowza.com/fabio_de_lorenzo1/32/419_2.png) [@Fabio\_De\_Lorenzo1](https://community.wowza.com/u/Fabio_De_Lorenzo1)\
**Post date:** [January 14, 2020, 5:50pm UTC](https://community.wowza.com/t/android-wowzplayerview-background-settable-by-theme-causing-invisibility/54091/17 "2020-01-14T17:50:16Z")

</div>

Since you are using HLS, my suggestion is to use ExoPlayer. It’s a richer and widely supported player and it will avoid the issue you described.

Thanks

---

<div class="post-metadata">

**Author:** ![Sami\_Eljabali](https://avatars.discourse-cdn.com/v4/letter/s/6bbea6/32.png) [@Sami\_Eljabali](https://community.wowza.com/u/Sami_Eljabali)\
**Post date:** [January 14, 2020, 5:51pm UTC](https://community.wowza.com/t/android-wowzplayerview-background-settable-by-theme-causing-invisibility/54091/18 "2020-01-14T17:51:26Z")

</div>

I’m using WOWZ with HLS fallback. I need to use the Wowza player.
