Commit Graph

75 Commits

Author SHA1 Message Date
Stypox 3c2ea7697c
Add option to directly open fullscreen when the main player starts 2021-09-01 20:08:37 +02:00
Robin f5d015e8f9 Use ExoPlayer default values for buffers 2021-06-18 20:18:24 +02:00
Robin 95f61542b5 TEST: Downgrade ExoPlayer to 2.12 2021-05-14 14:47:53 +02:00
Robin c85b97a484
Fix: fragmentSize is below the minimum (#6238)
noticed logs " CacheDataSink: fragmentSize is below the minimum recommended value of 2097152. This may cause poor cache performance.

this fixes the issue by using ExoPlayers MIN_RECOMMENDED_FRAGMENT_SIZE. Unfortunately that field is private:
aeb306a164/library/core/src/main/java/com/google/android/exoplayer2/upstream/cache/CacheDataSink.java (L123)
2021-05-04 19:08:25 +02:00
Fynn Godau c9766d25ef Rename related streams to related items 2021-03-31 22:33:22 +02:00
Robin 83d16932a4 Update to ExoPlayer 2.13.2 2021-03-31 10:05:44 +02:00
Stypox 86381696f4
Merge pull request #5457 from Redirion/exo123
Update to ExoPlayer 2.12.3
2021-03-18 18:59:56 +01:00
TobiGr 86fa629591 Fix last resize mode not being restored correctly
I think the settings key "last_resize_mode" is ambiguous. While it is used to get the recently used resize mode, someone thought while working on the resize mode switcher, that the old (to be replaced) resize mode should be stored. 
Fixes #5613
2021-03-08 09:46:33 +01:00
Robin eba0b07782
Update to ExoPlayer 2.12.3 2021-02-16 16:42:51 +01:00
Stypox fdb0f01b38
Add Objects.requireNotNull to warning which is surely not null 2021-01-28 14:35:47 +01:00
Stypox 376cba696e
Remove useless getString for default setting value 2021-01-28 14:35:00 +01:00
Stypox 4f828fbe00
Fix always minimizing to popup player 2021-01-28 14:33:12 +01:00
Stypox f6e2dd1480
Merge player classes into a single one 2021-01-14 10:25:44 +01:00
Stypox 7476498823
[Regression] Revert "Removed remember popup properties setting"
This reverts commit 314615bfef.
2020-11-15 22:24:27 +01:00
Stypox 2a2c82e73b
More fixes with opening VideoDetailFragment 2020-11-08 10:00:28 +01:00
TacoTheDank 31cffa68c5 Push conditionals inside branch expressions 2020-10-31 15:57:26 -04:00
Isira Seneviratne 58b720b004 Use ContextCompat.getSystemService() and the Context.getSystemService() extension function. 2020-10-09 08:52:05 +05:30
Panorea 314615bfef Removed remember popup properties setting 2020-10-06 18:32:20 -04:00
wb9688 f4bd20361a Fix auto-queue with no next videos 2020-09-29 10:43:17 +02:00
TobiGr 0e5f85db95
Remove "Detail Page" open action from share dialog under certain circumstances
With the new application workflow and unified player, video detail page and video player are the same activity. So show only one of these options based on whether autoplay is enabled or not, and show both if using external player
2020-09-26 21:58:34 +02:00
TacoTheDank 06d54ef77e
Clean up SDK version checks 2020-09-06 12:55:30 +02:00
TacoTheDank ba6c7de35a
Use AndroidX preference 2020-09-06 12:52:42 +02:00
wb9688 87228673b4 Use final where possible 2020-08-16 10:25:09 +02:00
Avently 77cd3182f1 Removed unused line 2020-07-21 01:53:59 +03:00
Avently c7ccf9bab8 AndroidTvUtils -> DeviceUtils 2020-07-21 01:43:49 +03:00
Avently 06e70abb86 Merged the latest changes 2020-07-21 01:37:36 +03:00
wb9688 4274827dbe Use relatedItems instead of info.getRelatedStreams() 2020-07-15 18:52:36 +02:00
wb9688 7a30f4a7d2 Remove calls to getNextStream() 2020-07-14 21:27:59 +02:00
Avently d8f7db4715 Made checkStyle happy 2020-07-14 20:21:32 +03:00
Avently d2aaa6f691 Merged the latest changes 2020-07-13 04:17:21 +03:00
Avently a7fbe05a73 Changes for review 2020-06-27 06:25:50 +03:00
wb9688 63bcc04eff Move things back to its original place 2020-04-02 15:57:50 +02:00
wb9688 fda5405e48 Improve code style to be more consistent 2020-04-02 15:57:50 +02:00
Avently 398cbe9284 Better backstack, better tablet support, switching players confirmation, fix for background playback 2020-03-10 12:06:38 +03:00
Avently cc438fdb7b Player's elements positioning is better for tablet and in multiWindow mode
- status bar got a fix for situation when a phone vendor did not provide status bar height for landscape orientation
- popup will not be init'd twice
- also fixed some non-reproduceable bugs
2020-01-17 17:37:53 +03:00
Avently 92ff98d99a New logic for handling global orientation
- added a button to manually change an orientation of a video
- adapted UI for an automatic global orientation too
2020-01-16 14:20:22 +03:00
Avently 6fc91312d2 Changed default autoplay type to "Only on WiFi" 2020-01-09 19:27:10 +03:00
Avently 4c57893312 New features and fixes
- added autoplay options inside settings: always, only on wifi, never
- now statusbar will be shown in fullscreen mode
- playlists, channels can be autoplayed too (if enabled)
- changed title of background activity to Play queue
- fixed a crash
2020-01-08 19:16:50 +03:00
Robin bf2a3ca043 Migrate to AndroidX 2019-10-04 14:59:08 +02:00
Robin 4d80bdcc9f Update ExoPlayer to 2.9.6, including httook dependency and deprecations 2019-03-05 18:05:44 +01:00
Redirion d8b80f961a
Improved performance of getTimeString
This pull requests complements pull request  #2178 by reducing general computational time for the method getTimeString.

On my local machine (Desktop PC with Java) my tests with a sample size of 10000 calls to the method with param 86400001 showed a performance improvement of about 50%.

See sample code below to reproduce:

    private static final StringBuilder stringBuilder = new StringBuilder();
    private static final Formatter stringFormatter = new Formatter(stringBuilder, Locale.getDefault());
    
    public static String getTimeString(int milliSeconds) {
        int seconds = (milliSeconds % 60000) / 1000;
        int minutes = (milliSeconds % 3600000) / 60000;
        int hours = (milliSeconds % 86400000) / 3600000;
        int days = (milliSeconds % (86400000 * 7)) / 86400000;

        stringBuilder.setLength(0);
        return days > 0 ? stringFormatter.format("%d:%02d:%02d:%02d", days, hours, minutes, seconds).toString()
                : hours > 0 ? stringFormatter.format("%d:%02d:%02d", hours, minutes, seconds).toString()
                : stringFormatter.format("%02d:%02d", minutes, seconds).toString();
    }
    
    public static String getTimeStringL(int milliSeconds) {
        long seconds = (milliSeconds % 60000L) / 1000L;
        long minutes = (milliSeconds % 3600000L) / 60000L;
        long hours = (milliSeconds % 86400000L) / 3600000L;
        long days = (milliSeconds % (86400000L * 7L)) / 86400000L;

        stringBuilder.setLength(0);
        return days > 0 ? stringFormatter.format("%d:%02d:%02d:%02d", days, hours, minutes, seconds).toString()
                : hours > 0 ? stringFormatter.format("%d:%02d:%02d", hours, minutes, seconds).toString()
                : stringFormatter.format("%02d:%02d", minutes, seconds).toString();
    }
    
	public static void main(String[] args) throws Exception {
		final int SAMPLE_SIZE = 25000;
		long[] results = new long[SAMPLE_SIZE];
		for(int i = 0; i < SAMPLE_SIZE; i++) {
			long now = System.nanoTime();
			getTimeString(86400001);
			results[i] = System.nanoTime() - now;
		}
		long sum = 0;
		for(int i = 0; i < SAMPLE_SIZE; i++) {
			sum += results[i];
		}
		System.out.println("Average execution time: " + (sum/SAMPLE_SIZE));
		results = new long[SAMPLE_SIZE];
		for(int i = 0; i < SAMPLE_SIZE; i++) {
			long now = System.nanoTime();
			getTimeStringL(86400001);
			results[i] = System.nanoTime() - now;
		}
		sum = 0;
		for(int i = 0; i < SAMPLE_SIZE; i++) {
			sum += results[i];
		}
		System.out.println("Average execution time: " + (sum/SAMPLE_SIZE));
2019-03-04 15:45:59 +01:00
Ritvik Saraf f19cfb75e6 merged upstream/dev 2018-12-20 08:51:44 +05:30
Christian Schabesberger 6035be9ce6
Merge branch 'dev' into giga-postprocessing 2018-12-10 12:12:38 +01:00
Ritvik Saraf 9b84046865 merged upstream/dev 2018-12-04 23:19:57 +05:30
kapodamy 7e9bcff0f3
Merge branch 'dev' into giga-postprocessing 2018-11-28 22:53:29 -03:00
Shivanju Awasthi e911dbb9d4
Merge branch 'dev' into auto_queue_logic 2018-11-26 22:56:01 +05:30
Christian Schabesberger 25d6806ebd set minSdk to 19 and deprecate old player 2018-11-13 17:27:47 +01:00
shivanju 47c3da131c issue:1336 Fix for inserting new streams when auto queuing is enabled 2018-11-11 16:24:49 +05:30
kapodamy 5825843f68 main commit
Post-processing infrastructure
* remove interfaces with one implementation
* fix download resources with unknow length
* marquee style for ProgressDrawable
* "view details" option in mission context menu
* notification for finished downloads
* postprocessing infrastructure: sub-missions, circular file, layers for layers of abstractions for Java IO streams
* Mp4 muxing (only DASH brand)
* WebM muxing
* Captions downloading
* alert dialog for overwrite existing downloads finished or not.

Misc changes
* delete SQLiteDownloadDataSource.java
* delete DownloadMissionSQLiteHelper.java
* implement Localization from #114

Misc fixes (this branch)
* restore old mission listeners variables. Prevents registered listeners get de-referenced on low-end devices
* DownloadManagerService.checkForRunningMission() now return false if the mission has a error.
* use Intent.FLAG_ACTIVITY_NEW_TASK when launching an activity from gigaget threads (apparently it is required in old versions of android)

More changes
* proper error handling "infrastructure"
* queue instead of multiple downloads
* move serialized pending downloads (.giga files) to app data
* stop downloads when swicthing to mobile network (never works, see 2nd point)
* save the thread count for next downloads
* a lot of incoherences fixed
* delete DownloadManagerTest.java (too many changes to keep this file updated)
2018-11-08 19:00:44 -03:00
Ritiek Malhotra 046740f10b
Merge branch 'dev' into separate-gesture-options 2018-10-10 08:41:42 -07:00