<div dir="ltr"><div><div><div><div>It would be better to discuss this sort of issues instead of pushing this directly.<br><br></div>delayed runnable doesn't seem a very good idea.<br></div>Callbacks like <i>case EventHandler.MediaParsedChanged:</i> may do the job.<br><br></div>Also, why is <i>isPaused</i> a Boolean instead of boolean?<br><br></div>Thus, this kind of solution makes audio glitches, as Alexandre experimented it and tried to work around in his patch proposal.<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Jan 6, 2015 at 9:37 AM, Jean-Baptiste Kempf <span dir="ltr"><<a href="mailto:jb@videolan.org" target="_blank">jb@videolan.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On 05 Jan, Edward Wang wrote :<br>
<span class="">> +            // Paused flag<br>
> +            boolean wasPaused = mSettings.getBoolean(PreferencesActivity.VIDEO_PAUSED, false);<br>
> +            if(wasPaused) {<br>
> +                Log.d(TAG, "Video was previously paused, resuming in paused mode");<br>
> +                mHandler.postDelayed(new Runnable() {<br>
> +                    @Override<br>
> +                    public void run() {<br>
> +                        mLibVLC.pause();<br>
> +                    }}, 500);<br>
> +            }<br>
<br>
</span>Sorry, but this is overly ugly.<br>
<br>
What if the video takes more than 500ms to open? What if it takes less?<br>
<br>
With my kindest regards,<br>
<span class="HOEnZb"><font color="#888888"><br>
--<br>
Jean-Baptiste Kempf<br>
<a href="http://www.jbkempf.com/" target="_blank">http://www.jbkempf.com/</a> - +33 672 704 734<br>
Sent from my Electronic Device<br>
</font></span><div class="HOEnZb"><div class="h5">_______________________________________________<br>
Android mailing list<br>
<a href="mailto:Android@videolan.org">Android@videolan.org</a><br>
<a href="https://mailman.videolan.org/listinfo/android" target="_blank">https://mailman.videolan.org/listinfo/android</a><br>
</div></div></blockquote></div><br></div>