Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Feature/sdk 3780/exoplayer migration (#621)
* Chore: Formatting * Chore: Code refactoring - code cleanup and conditions simplified * Feat: Exoplayer code extraction from fragment - removed exoplay and styledplayerview instance in other handle - the handle provides methods which will be extracted in interface * Chore: Formatting and cleanup * Feat: Extraction of exoplayer from MediaPlayerRV + optimisation - removed all exoplayer imports - optimised the code to fold methods - removed recundant checks - rect is reused - stop and release methods called appropriately - todo in activity * Feat: Fields optimised - fields made final where possible - optimised the context getting and usage, removed cached field * Feat: Removed exoplayer deps from CTInboxBaseMessageViewHolder - the class does not contain any player/surface handling code anymore - deletes the code to ExoplayerHandle.kt class where which we use as a holder to migrate to the media3 * Chore: Used lambda * Chore: Used lambda * Chore: Rename methods. * Feat: Kotliny syntax - force unwrap avoided * Feat: static initialiser - removed static block and made static field inline. * Chore: Doc for class * Chore: Class level doc * Feat: Removed force unwraps - removes force unwraps so that there are no NPEs * Feat: Methods extracted * Feat: Extracts video supported flag - is video supported is computed statically by checking class.forname - moved method to correct package * Chore: Removed force unwraps. - removed forceful unwraps and used null safe operator. * Chore: Removed redundant method. * Feat: Orientation from context - did not use static filed from activity. * Feat: Minor fixup. - removed unref method * Feat: Fixed problematic player assignment - fixes val name clashing * Feat: Removed companion object - possible to use field in holder. * Feat: SDK-3780 : Media handle - adds media handle which uses media3 components instead of exoplayer - adds a different handle class which has similar func to exo handle - runtime can find the correct handle based on user and attach * Feat: Unstable api annotation * Chore: removes redundant import * Feat: Redundant ?.let call * Feat: SDK-3780: Extraction of video handle interface - allows use of both impls of media3 as well as exoplayer2 - checks need to be added on runtime to chekc available lib and use appropriate handle * Feat(SDK-3780): Adds runtime check method for media3 * Feat(SDK-3780): Methods to check media3 exoplayer - adds method to check media3 exoplayer which is new lib * Rename .java to .kt * Feat(SDK-3780): Converts MediaPlayerRecyclerView to kotlin - changes to kotlin class from java - force unwraps removed - change method signature which is more optimised for kotlin code * Feat(SDK-3780): Removed redundant ovrrride * Feat(SDK-3780): Runtime check for video lib - uses media3 if possible - exoplayer is deprecated but we do not force migration * Chore(SDK-3780): Compilation errors fixed - changes interface signature so corrected the impl * Feat(SDK-3780): Video library check - uses media3 if available - used exoplayer in other cases * Feat(SDK-3780): Video library check -> Interstitial inapp - uses media3 if available - used exoplayer in other cases * Chore(SDK-3780): optimise find view call * Chore(SDK-3780): annotate with unstable+static access correctness * Chore(SDK-3780): unused anno removed * Feat(SDK-3780): CTInAppNativeInterstitialFragment code cleanup - broken down view method into smaller chunks - makes the fragment readable * Task(SDK-3894): Optimise and fix view add/remove - corrects behaviour of add/remove views which are used to steam - optimises add/remove on lifecycle events - optimises view creation for surfaceview and close button - reuses same views in dialog and activity - methods cleanup and renaming * Task(SDK-3894): crash fix for full screen switch - fixes video view removal/add crash. dialog is reused and video container need not be attached again. * Task(SDK-3894): layout params fixed - moves full screen and normal view layout params in handles - sets them correctly as needed * Task(SDK-3894): Fixes init of mediaplayer - corrects initialisation after removal * Chore(SDK-3894): code simplified * Feat(SDK-3780): removes progress bar correctly - posts so that lifecycle scroll is settled and view is removed. * Feat(SDK-3780): Pr comments addressed. * Feat(SDK-3780): Changes build.gradle - adds new media library instead of deprecated exoplayer2
- Loading branch information