[Android] Save video pause status with a flag

Geoffrey Métais geoffrey.metais at gmail.com
Tue Jan 6 10:15:51 CET 2015


It would be better to discuss this sort of issues instead of pushing this
directly.

delayed runnable doesn't seem a very good idea.
Callbacks like *case EventHandler.MediaParsedChanged:* may do the job.

Also, why is *isPaused* a Boolean instead of boolean?

Thus, this kind of solution makes audio glitches, as Alexandre experimented
it and tried to work around in his patch proposal.

On Tue, Jan 6, 2015 at 9:37 AM, Jean-Baptiste Kempf <jb at videolan.org> wrote:

> On 05 Jan, Edward Wang wrote :
> > +            // Paused flag
> > +            boolean wasPaused =
> mSettings.getBoolean(PreferencesActivity.VIDEO_PAUSED, false);
> > +            if(wasPaused) {
> > +                Log.d(TAG, "Video was previously paused, resuming in
> paused mode");
> > +                mHandler.postDelayed(new Runnable() {
> > +                    @Override
> > +                    public void run() {
> > +                        mLibVLC.pause();
> > +                    }}, 500);
> > +            }
>
> Sorry, but this is overly ugly.
>
> What if the video takes more than 500ms to open? What if it takes less?
>
> With my kindest regards,
>
> --
> Jean-Baptiste Kempf
> http://www.jbkempf.com/ - +33 672 704 734
> Sent from my Electronic Device
> _______________________________________________
> Android mailing list
> Android at videolan.org
> https://mailman.videolan.org/listinfo/android
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/android/attachments/20150106/a3f22191/attachment.html>


More information about the Android mailing list