Issue #123 - a small fix

This commit is contained in:
Thomas 2020-12-05 18:48:41 +01:00
parent fbeb87e29e
commit 1690507a18
1 changed files with 5 additions and 3 deletions

View File

@ -763,6 +763,11 @@ public class PeertubeActivity extends AppCompatActivity implements CommentListAd
binding.doubleTapPlayerView.setVisibility(View.GONE); binding.doubleTapPlayerView.setVisibility(View.GONE);
binding.castController.setVisibility(View.VISIBLE); binding.castController.setVisibility(View.VISIBLE);
dialog.dismiss(); dialog.dismiss();
if (chromeCastVideoURL != null) {
if (player != null && player.getCurrentPosition() > 0) {
chromeCastVideoURL += "?start=" + (player.getCurrentPosition() / 1000);
}
}
}; };
mainHandler.post(myRunnable); mainHandler.post(myRunnable);
if (!chromeCast.isConnected()) { if (!chromeCast.isConnected()) {
@ -776,9 +781,6 @@ public class PeertubeActivity extends AppCompatActivity implements CommentListAd
} }
if (chromeCastVideoURL != null) { if (chromeCastVideoURL != null) {
if (player != null && player.getCurrentPosition() > 0) {
chromeCastVideoURL += "?start=" + (player.getCurrentPosition() / 1000);
}
String mime = MimeTypeMap.getFileExtensionFromUrl(chromeCastVideoURL); String mime = MimeTypeMap.getFileExtensionFromUrl(chromeCastVideoURL);
chromeCast.setRequestTimeout(120000); chromeCast.setRequestTimeout(120000);
chromeCast.load(peertube.getTitle(), null, chromeCastVideoURL, mime); chromeCast.load(peertube.getTitle(), null, chromeCastVideoURL, mime);