android / socialite

Apache License 2.0
398 stars 71 forks source link

Add preload manager to exoplayer to improve short form playback experience #91

Closed MayuriKhinvasara closed 2 months ago

MayuriKhinvasara commented 2 months ago

Add preload manager to exoplayer to improve short form playback experience

(1) Add preload manager for exoplayer (2) Create an Wrapper class to manage and customize all functionalities of preload (PreloadManagerWrapper)(3) Add preload manager as an optional to Timeline screen (4) Add 10 remote videos to chats by sending :preload: message to any chat (5) Replace Timeline surface view with Player view for better performance.

In order to test / generate a bunch of short form videos in the Timeline View, send a "preload" text message to any chat in the Chat screen. Thereby a list of 10 short videos urls (listed in ShortsVideoList class) will be sent as a response. These vidoes can then be used in the Timeline View to scroll .

riggaroo commented 2 months ago

The UI doesn't load the content properly for me into a Pager, the visuals sometimes appear in the chat but not reliably.

Also after sometime of running the app, it crashes:

FATAL EXCEPTION: FinalizerWatchdogDaemon (Ask Gemini)
                                                                                                    Process: com.google.android.samples.socialite, PID: 15726
                                                                                                    java.util.concurrent.TimeoutException: android.media.MediaMetadataRetriever.finalize() timed out after 10 seconds
                                                                                                        at android.media.MediaMetadataRetriever.native_finalize(Native Method)
                                                                                                        at android.media.MediaMetadataRetriever.finalize(MediaMetadataRetriever.java:1109)
                                                                                                        at java.lang.Daemons$FinalizerDaemon.doFinalize(Daemons.java:370)
                                                                                                        at java.lang.Daemons$FinalizerDaemon.processReference(Daemons.java:350)
                                                                                                        at java.lang.Daemons$FinalizerDaemon.runInternal(Daemons.java:322)
                                                                                                        at java.lang.Daemons$Daemon.run(Daemons.java:131)
                                                                                                        at java.lang.Thread.run(Thread.java:1012)
MayuriKhinvasara commented 2 months ago

The UI doesn't load the content properly for me into a Pager, the visuals sometimes appear in the chat but not reliably.

Also after sometime of running the app, it crashes:

FATAL EXCEPTION: FinalizerWatchdogDaemon (Ask Gemini)
                                                                                                    Process: com.google.android.samples.socialite, PID: 15726
                                                                                                    java.util.concurrent.TimeoutException: android.media.MediaMetadataRetriever.finalize() timed out after 10 seconds
                                                                                                      at android.media.MediaMetadataRetriever.native_finalize(Native Method)
                                                                                                      at android.media.MediaMetadataRetriever.finalize(MediaMetadataRetriever.java:1109)
                                                                                                      at java.lang.Daemons$FinalizerDaemon.doFinalize(Daemons.java:370)
                                                                                                      at java.lang.Daemons$FinalizerDaemon.processReference(Daemons.java:350)
                                                                                                      at java.lang.Daemons$FinalizerDaemon.runInternal(Daemons.java:322)
                                                                                                      at java.lang.Daemons$Daemon.run(Daemons.java:131)
                                                                                                      at java.lang.Thread.run(Thread.java:1012)

Can you help file a bug for this with repro steps, Seems like network or server issue.