File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed
VideoOS/VenvyLibrary/src/main/java/cn/com/venvy/common/media/view Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -211,6 +211,9 @@ public void startPlay(String url) {
211211 stopPlay ();
212212 initPlayer (url );
213213 }
214+ if (TextUtils .isEmpty (mCurrentUrl )) {
215+ initPlayer (url );
216+ }
214217 mCurrentUrl = url ;
215218 }
216219
@@ -501,16 +504,17 @@ public boolean onTouchEvent(MotionEvent event) {
501504 }
502505
503506 private volatile boolean isStatistic = true ;
507+
504508 @ Override
505509 public void onCacheAvailable (File cacheFile , String url , int percentsAvailable ) {
506- if (isStatistic && cacheFile != null && cacheFile .exists () && cacheFile .getAbsolutePath ().endsWith (".download" )){
510+ if (isStatistic && cacheFile != null && cacheFile .exists () && cacheFile .getAbsolutePath ().endsWith (".download" )) {
507511 isStatistic = false ;
508512 statisticVideoFileSize ();
509513 }
510514 }
511515
512516 private void statisticVideoFileSize () {
513- if (TextUtils .isEmpty (mCurrentUrl )){
517+ if (TextUtils .isEmpty (mCurrentUrl )) {
514518 return ;
515519 }
516520 ThreadManager .getInstance ().createShortPool ().execute (new Runnable () {
You can’t perform that action at this time.
0 commit comments