7

I am using below way to integrate mini_controller in my chromecast app. However, I always seeing progressbar instead of pause/play button in mini controller.

<fragment
        android:id="@+id/cast_mini_controller"
        class="com.google.android.gms.cast.framework.media.widget.MiniControllerFragment"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:visibility="gone"
        app:castControlButtons="@array/cast_mini_controller_control_buttons"
        app:castProgressBarColor="@color/colorPrimary"
        app:castShowImageThumbnail="true" />

Can anybody please suggest what can be the issue it might be?

I tried various articles and none of them able to resolve this issue. All is working fine except the fact that I can not pause the chromecast video through mini controller inside my app as its showing progressbar always.

Note: My application is using queuing mechanism in order to load the chunk of videos at once.

2 Answers 2

0

Make sure you are specifying the correct set of buttons for the fragment:

<array name="cast_mini_controller_control_buttons">
    <item>@id/cast_button_type_rewind_30_seconds</item>
    <item>@id/cast_button_type_play_pause_toggle</item>
    <item>@id/cast_button_type_forward_30_seconds</item>
</array>
2
0

I know it's old, but... I've had a similar problem, - always is showing only 2 instead of 3 buttons. My solution is 'app:castShowImageThumbnail="false"'. After that, 3rd button appears.

https://developers.google.com/cast/docs/android_sender/customize_ui#choose_buttons

"Note: If app:castShowImageThumbnail="false", the album art will be hidden and slots 1, 2, and 3 will be available for control buttons. Otherwise, since the album art will be shown in slot 1, you can provide an empty button for slot 1 and control buttons for slots 2 and 3."

Not the answer you're looking for? Browse other questions tagged or ask your own question.