Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Subtitle Support for MediaElement #1918

Draft
wants to merge 146 commits into
base: main
Choose a base branch
from

Commits on May 7, 2024

  1. The most important changes involve the introduction of subtitle suppo…

    …rt for video players across different platforms (Android, iOS/macOS, and Windows) within the CommunityToolkit.Maui.Extensions namespace. This includes the ability to load subtitles from a URL, parse SRT and VTT subtitle formats, and display the subtitles synchronized with video playback. Key implementations include the `SubtitleExtensions` class for platform-specific handling, `SrtParser` and `VttParser` classes for parsing subtitle files, and the integration of subtitle functionality into the `MediaManager` classes for each platform. Additionally, UI enhancements allow users to select subtitles, and platform-specific adjustments ensure correct subtitle display in various modes.
    
    List of changes:
    
    1. **Cross-Platform Subtitle Support**: Added functionality to display subtitles in the `MediaElement` control, supporting SRT and VTT formats across Android, iOS/macOS, and Windows.
    2. **Subtitle File Loading**: Introduced a `SubtitleUrl` property in the `MediaElement` control for specifying the subtitle file URL.
    3. **Platform-Specific `SubtitleExtensions`**: Implemented on Android, iOS/macOS, and Windows to handle subtitle loading, parsing, and displaying, with adjustments for fullscreen changes.
    4. **Subtitle Parsing Classes**: Added `SrtParser` and `VttParser` static classes for parsing SRT and VTT files into `SubtitleCue` objects.
    5. **`SubtitleCue` Class**: Created to represent individual subtitle cues with start/end times and text.
    6. **MediaManager Integration**: Modified to incorporate subtitle functionality, including subtitle display based on video playback state and volume changes.
    7. **UI Enhancements**: Updated the user interface to allow subtitle selection and ensure subtitles are relevant to the video being played.
    8. **Platform-Specific Adjustments**: Implemented adjustments for correct subtitle display in fullscreen mode and during layout changes.
    9. **Error Handling and Logging**: Included basic error handling and logging, particularly for subtitle loading methods.
    10. **Memory Management**: For Windows, ensured proper disposal of unmanaged resources in the `SubtitleExtensions` class.
    
    These changes significantly enhance the video playback experience by providing users with the ability to display subtitles, thereby making content more accessible and enjoyable across different platforms and devices.
    ne0rrmatrix committed May 7, 2024
    Configuration menu
    Copy the full SHA
    96fc21a View commit details
    Browse the repository at this point in the history
  2. The primary focus of these code changes is to enhance the subtitle fu…

    …nctionality within a MAUI application, specifically targeting Windows platforms. The modifications aim to improve the integration of subtitles with the MAUI media element, manage subtitle display based on the video player's full-screen status, and ensure that subtitles are correctly managed and displayed in relation to the media player's state. Here's a summary of the most significant changes:
    
    1. **Integration with MAUI Media Element**: The `SubtitleExtensions` class has been updated to support a new `MauiMediaElement` property. This change involves replacing a `Label` text block with a `Microsoft.UI.Xaml.Controls.TextBlock` for displaying subtitles, facilitating better integration with MAUI's media element on Windows platforms.
    
    2. **Full-Screen State Management**: A new boolean property `isFullScreen` has been introduced to manage the subtitle display based on the video player's full-screen status, enhancing the user experience during full-screen playback.
    
    3. **Enhanced Subtitle Loading**: The `LoadSubtitles` method now requires an additional parameter of type `Microsoft.UI.Xaml.Controls.MediaPlayerElement`, linking the subtitle functionality directly with the media player element. This adjustment increases the flexibility and usability of the subtitle system.
    
    4. **Improved Subtitle Display Logic**: Adjustments have been made to various methods (`MauiMediaElement_WindowsChanged`, `StartSubtitleDisplay`, `Timer_Elapsed`, and `StopSubtitleDisplay`) to accommodate the changes in subtitle management. These modifications ensure that subtitles are correctly added to or removed from the media element's visual tree based on the player's state.
    
    5. **Diagnostic Trace Statements**: The `Timer_Elapsed` and `StopSubtitleDisplay` methods now include diagnostic trace statements to aid in debugging and monitoring subtitle display functionality. These statements log the displayed subtitle cue text and confirm the removal of the subtitle text block from the media element, respectively.
    
    6. **Error Handling and Diagnostics in `MediaManager.windows.cs`**: The `LoadSubtitles` method has been updated to require the `Player` object as a parameter for the `subtitleExtensions.LoadSubtitles` call, ensuring correct association with the media player element. Additionally, a diagnostic trace error statement has been added to log situations where the subtitle extensions, subtitle URL, or player object are not correctly initialized.
    
    List of Changes:
    - Updated `SubtitleExtensions` class for better integration with MAUI's media element. [Integration with MAUI Media Element]
    - Added `isFullScreen` property for full-screen state management. [Full-Screen State Management]
    - Modified `LoadSubtitles` method to enhance subtitle loading. [Enhanced Subtitle Loading]
    - Adjusted subtitle display logic in multiple methods. [Improved Subtitle Display Logic]
    - Included diagnostic trace statements in `Timer_Elapsed` and `StopSubtitleDisplay` methods. [Diagnostic Trace Statements]
    - Improved error handling and diagnostics in `MediaManager.windows.cs`. [Error Handling and Diagnostics in `MediaManager.windows.cs`]
    ne0rrmatrix committed May 7, 2024
    Configuration menu
    Copy the full SHA
    1667b8d View commit details
    Browse the repository at this point in the history
  3. The code changes made primarily focus on improving code readability, …

    …maintainability, and robustness. Here's a summary of the most important changes:
    
    1. **Simplified Object Initialization**: The initialization of `HttpClient` has been simplified using the target-typed `new` expression, making the code more concise.
    2. **Refactoring Conditional Logic**: The handling of the `isFullScreen` state has been refactored from an if-else statement to a switch statement, utilizing pattern matching for better readability.
    3. **Improving Null Checks**: An additional null check for `xamlTextBlock` in the `Timer_Elapsed` method has been added to prevent potential null reference exceptions.
    4. **Streamlining Visibility Handling**: Redundant null checks for `xamlTextBlock` have been removed, as an earlier check already ensures its non-nullity, thus cleaning up the code.
    5. **Removing Redundant Logging**: A redundant logging statement in the `StopSubtitleDisplay` method has been removed, likely to clean up the logging output.
    
    Details of the changes:
    
    - **Simplified Object Initialization**: Changed `httpClient = new HttpClient();` to `httpClient = new();` for cleaner code.
    - **Refactoring Conditional Logic**: Refactored `if (!isFullScreen)` to `switch(isFullScreen)` and replaced the else block with `case false:`, improving code maintainability.
    - **Improving Null Checks**: Added a null check `if (mediaElement?.Position is null || cues.Count == 0 || string.IsNullOrEmpty(mediaElement.SubtitleUrl) || xamlTextBlock is null)` to enhance code robustness.
    - **Streamlining Visibility Handling**: Removed unnecessary null checks `if (xamlTextBlock is not null)` after ensuring `xamlTextBlock` is not null earlier in the code.
    - **Removing Redundant Logging**: Removed the logging statement `System.Diagnostics.Trace.TraceInformation("Removed text block from player parent");` to clean up logging output.
    ne0rrmatrix committed May 7, 2024
    Configuration menu
    Copy the full SHA
    5c70eb5 View commit details
    Browse the repository at this point in the history
  4. The primary change made to the code involves the removal of a logging…

    … functionality. Specifically, the application will no longer log information related to cue text to trace listeners following the elapse of a timer and the presence of a cue. This modification could impact how developers or users monitor and debug the application, as they will no longer receive automatic trace information about cue text events.
    
    ### Summary of Change:
    - **Removal of Cue Text Logging**: The specific line of code responsible for logging cue text information using `System.Diagnostics.Trace.TraceInformation` has been removed. This action disables the application's ability to output cue text information to trace listeners upon the occurrence of a cue event post-timer elapse.
    
    _Reference to Code Change: Removal of `System.Diagnostics.Trace.TraceInformation` for cue text logging._
    ne0rrmatrix committed May 7, 2024
    Configuration menu
    Copy the full SHA
    4e35194 View commit details
    Browse the repository at this point in the history
  5. The primary change involves making the xamlTextBlock field in the `…

    …SubtitleExtensions` class immutable by converting it from a nullable, modifiable field to a read-only nullable field. This ensures that once `xamlTextBlock` is assigned, it cannot be modified. To accommodate this change, the constructor of the `SubtitleExtensions` class has been updated to initialize `xamlTextBlock` with a new `TextBlock` instance, setting up default properties for this instance. Consequently, the conditional initialization of `xamlTextBlock` within the `LoadSubtitles` method has been removed, as it is no longer necessary or possible due to the field's read-only status.
    
    List of changes:
    1. The `xamlTextBlock` field in the `SubtitleExtensions` class has been changed to a read-only nullable field to enforce immutability after its initial assignment. This modification ensures that the `xamlTextBlock` cannot be altered once it is set, enhancing the stability and predictability of how `xamlTextBlock` is used within the class.
    2. In the `SubtitleExtensions` constructor, `xamlTextBlock` is now initialized with a new `TextBlock` instance. This instance is configured with default settings, including empty text, a specific margin, visibility, alignment, foreground color, font size, and text wrapping settings. This change ensures that `xamlTextBlock` is always in a ready-to-use state immediately after an instance of `SubtitleExtensions` is created.
    3. The removal of conditional initialization of `xamlTextBlock` within the `LoadSubtitles` method. Since `xamlTextBlock` is initialized in the constructor and is read-only, there's no need or ability to reinitialize or modify it in the `LoadSubtitles` method, simplifying the method's logic and ensuring consistency in how `xamlTextBlock` is used.
    ne0rrmatrix committed May 7, 2024
    Configuration menu
    Copy the full SHA
    a2b1ab1 View commit details
    Browse the repository at this point in the history
  6. The code changes primarily focus on enhancing the subtitle functional…

    …ity within a media playback context, introducing more robust and flexible handling of subtitles, improving thread safety, and ensuring UI updates are performed correctly. The most significant changes include the modification of the `SubtitleExtensions` constructor and methods, refactoring of the `LoadSubtitles` method, adjustments to subtitle display lifecycle methods (`StartSubtitleDisplay`, `StopSubtitleDisplay`, and `UpdateSubtitle`), and improvements to the `MediaManager` class for better immutability and thread safety.
    
    ### Important Changes Summary:
    
    1. **Namespace and Class Imports:** Introduction of new imports to support enhanced subtitle functionality.
    2. **SubtitleExtensions Constructor Modification:** Changes to how and when the subtitle label is initialized and added to the view, aiming for better flexibility and control.
    3. **LoadSubtitles Method Refactoring:** Simplification and enhancement of subtitle content loading, including support for nullability and a more concise approach to parsing based on file extension.
    4. **StartSubtitleDisplay Method Changes:** Ensures UI updates are performed on the main thread and updates subtitle label positioning logic to be more dynamic and responsive during playback.
    5. **StopSubtitleDisplay and UpdateSubtitle Method Adjustments:** Adjustments to maintain the subtitle label in the view hierarchy, potentially for performance or state management reasons.
    6. **CalculateSubtitleFrame Method Signature Change:** Decouples the frame calculation method from instance state, allowing for more flexible usage.
    7. **MediaManager Class Adjustments:** Enforces immutability of the `CancellationTokenSource` to ensure predictable behavior and thread safety.
    
    ### Detailed Changes:
    
    - **Namespace and Class Imports:** Added to support new functionality in `SubtitleExtensions`. [Namespace and Class Imports]
    - **SubtitleExtensions Constructor Modification:** Improved subtitle frame calculation and modified when the subtitle label is added to the view. [SubtitleExtensions Constructor Modification]
    - **LoadSubtitles Method Refactoring:** Enhanced loading logic with nullability support and a more streamlined approach to parsing subtitle formats. [LoadSubtitles Method Refactoring]
    - **StartSubtitleDisplay Method Changes:** Added main thread requirement for UI updates and refined frame calculation during playback. [StartSubtitleDisplay Method Changes]
    - **StopSubtitleDisplay and UpdateSubtitle Method Adjustments:** Removed unnecessary removal of the subtitle label from the view hierarchy in `UpdateSubtitle`. [StopSubtitleDisplay and UpdateSubtitle Method Adjustments]
    - **CalculateSubtitleFrame Method Signature Change:** Made the method static and changed its signature for broader applicability. [CalculateSubtitleFrame Method Signature Change]
    - **MediaManager Class Adjustments:** Changed `subTitles` field to be read-only for better immutability and thread safety. [MediaManager Class Adjustments]
    ne0rrmatrix committed May 7, 2024
    Configuration menu
    Copy the full SHA
    df4d9ee View commit details
    Browse the repository at this point in the history
  7. The primary change involves updating the null check syntax for the `c…

    …urrentCue` variable in a C# codebase. This modification enhances readability and aligns with modern C# coding practices by replacing the traditional inequality operator (`!=`) with the more contemporary `is not` pattern for null checks.
    
    ### Change Summary:
    - Updated the null check for `currentCue` from using `!=` to `is not` to improve code readability and adhere to modern C# standards.
    
    Reference to the code change:
    - The code change modifies the null check of `currentCue` from using `!=` to using the `is not` pattern, transitioning to a more modern and readable syntax for checking non-null values in C#.
    ne0rrmatrix committed May 7, 2024
    Configuration menu
    Copy the full SHA
    3ec12b0 View commit details
    Browse the repository at this point in the history

Commits on May 8, 2024

  1. The primary change involves the removal of code that added a subtitle…

    … label as a subview to the playerViewController's view within a method responsible for starting subtitle display. This modification suggests a change in how subtitles are managed or displayed in the application, potentially impacting the user interface or the way subtitles are rendered during video playback.
    
    ### Summary of Change:
    - **Removal of Subtitle Label Addition**: The specific line of code that added the subtitle label to the playerViewController's view has been removed from the `StartSubtitleDisplay` method. This indicates a significant change in the approach to displaying subtitles, possibly due to a redesign of the subtitle rendering system or an optimization of the existing process.
    
    ### Detailed Change:
    - In the file `SubtitleExtensions.macios.cs`, within the method `StartSubtitleDisplay`, the line `playerViewController.View?.AddSubview(subtitleLabel);` was removed. This action signifies that the subtitle label is no longer directly added to the playerViewController's view as part of initiating subtitle display. This could reflect a shift towards a different method of subtitle integration or an update to the user interface design that necessitates this change.
    ne0rrmatrix committed May 8, 2024
    Configuration menu
    Copy the full SHA
    64ac62b View commit details
    Browse the repository at this point in the history
  2. The primary change made to the code involves adjusting the font size …

    …of a text block element (`xamlTextBlock`) based on a condition. This condition checks the state of a variable named `isFullScreen`. If `isFullScreen` is true, indicating that a full-screen mode is active, the font size of the text block is increased to 24. Conversely, if `isFullScreen` is false, suggesting that the full-screen mode is not active, the font size is set to a smaller size of 16. This modification ensures that the text size is dynamically adjusted to enhance readability and user experience depending on the display mode.
    
    ### List of Changes:
    - Conditional setting of `xamlTextBlock` font size based on the `isFullScreen` variable. The font size is set to 24 when `isFullScreen` is true and 16 when it is false.
    ne0rrmatrix committed May 8, 2024
    Configuration menu
    Copy the full SHA
    0cfbd6f View commit details
    Browse the repository at this point in the history
  3. The modifications to the SubtitleExtensions.android.cs file within …

    …the `CommunityToolkit.Maui.Extensions` namespace primarily focus on refactoring and enhancing the subtitle display capabilities for a video player. These changes aim to improve clarity, maintainability, and performance. The most significant updates include the reorganization of field declarations and initializations, enhancements to the constructor for better subtitle styling, adjustments for full-screen layout changes, and optimizations in the subtitle display start and stop methods. Additionally, general code cleanup has been performed to remove unnecessary code and simplify logic.
    
    ### Important Changes:
    
    1. **Initialization and Declaration Changes:**
       - Fields such as `httpClient`, `textBlock`, `timer`, `cues`, and `mediaElement` have been reorganized for better clarity and maintainability.
       - `textBlock` is now initialized within the constructor with predefined properties like background color, padding, text color, and visibility.
    
    2. **Constructor Enhancements:**
       - The constructor now includes detailed initialization of `textBlock`, setting up text size, alignment, scroll bar settings, and visibility state to ensure it's ready for displaying subtitles with the desired styling.
    
    3. **FullScreen Layout Adjustments:**
       - Code has been simplified for handling full-screen layout changes, focusing on efficiently adding and removing subtitle display views and adjusting layout parameters for correct positioning.
    
    4. **Subtitle Display Start and Stop Methods:**
       - `StartSubtitleDisplay` method streamlined by removing redundant `textBlock` initialization and adding a null check.
       - `StopSubtitleDisplay` method now clears the displayed subtitles by setting `textBlock` text to an empty string.
    
    5. **General Code Cleanup:**
       - Unnecessary dispatcher invocations removed, conditional checks simplified, and redundant code blocks eliminated, enhancing readability and performance.
    
    These changes collectively contribute to a more efficient, maintainable, and user-friendly subtitle display functionality within the video player component.
    ne0rrmatrix committed May 8, 2024
    Configuration menu
    Copy the full SHA
    27d2af4 View commit details
    Browse the repository at this point in the history

Commits on May 9, 2024

  1. The most important changes revolve around the introduction of subtitl…

    …e customization features across various platforms (Android, iOS/macOS, and Windows) for media playback. These changes allow users to customize the font and font size of subtitles, enhancing the accessibility and user experience of media elements. The changes include the addition of `SubtitleFont` and `SubtitleFontSize` properties to the `IMediaElement` interface and `MediaElement` class, adjustments in subtitle display logic on different platforms to utilize these new properties, and general code cleanup and refactoring to support these enhancements.
    
    ### List of Changes:
    
    1. **MediaElement Subtitle Customization**
       - Introduced `SubtitleFont` and `SubtitleFontSize` properties to `IMediaElement` and `MediaElement` for subtitle font and size customization.
    
    2. **Android Subtitle Display Adjustments**
       - Updated subtitle display logic in `SubtitleExtensions.android.cs` to use the new customization properties, ensuring subtitles are displayed with the specified font and size on Android devices.
    
    3. **iOS/macOS Subtitle Display Adjustments**
       - Added logic in `SubtitleExtensions.macios.cs` to apply `SubtitleFont` and `SubtitleFontSize` for subtitle display, enabling custom font and size on iOS and macOS.
    
    4. **Windows Subtitle Display Adjustments**
       - Adjusted subtitle display in `SubtitleExtensions.windows.cs` to utilize the new properties for subtitle customization on Windows platforms.
    
    5. **General Code Cleanup and Refactoring**
       - Removed unused `using` directives in `SubtitleExtensions.macios.cs` and made code adjustments for consistency with the new subtitle customization features.
    
    6. **Subtitle Loading and Display Enhancements**
       - Enhanced subtitle loading and display across Android, iOS/macOS, and Windows to support the new customization options, ensuring correct display according to specified settings.
    
    7. **API and Property Changes**
       - Added new properties (`SubtitleFont`, `SubtitleFontSize`) for subtitle customization in the `IMediaElement` interface and `MediaElement` class, and adjusted existing methods and properties to integrate these features seamlessly with existing media playback functionality.
    ne0rrmatrix committed May 9, 2024
    Configuration menu
    Copy the full SHA
    8134fa5 View commit details
    Browse the repository at this point in the history
  2. Fix spacing issue

    ne0rrmatrix committed May 9, 2024
    Configuration menu
    Copy the full SHA
    dc3b150 View commit details
    Browse the repository at this point in the history
  3. The most important changes revolve around enhancing subtitle function…

    …ality and handling window state changes more dynamically across different platforms, particularly focusing on iOS and MacCatalyst. These changes include adjustments to subtitle font settings based on the operating system, improvements in subtitle display and positioning, and better handling of window state changes such as entering or exiting full screen.
    
    ### Summary of Key Changes:
    
    1. **Subtitle Font Setting Logic Enhancement**: The logic for setting subtitle fonts has been adjusted to cater to different platforms, setting "Avenir-Book" for iOS and MacCatalyst, and "monospace" for others within the `ChangeSourceClicked` method in `MediaElementPage.xaml.cs`.
    
    2. **Dynamic Subtitle Display Handling**: The `SubtitleExtensions` class has been modified to handle nullable UILabels for subtitles and introduced dynamic management of subtitle display and font settings through a nullable `UIViewController` and `UIFont`.
    
    3. **Window State Change Event Handling**: A new event, `WindowsChanged`, has been introduced and is subscribed to in the `SubtitleExtensions` class to adjust subtitle properties and positioning dynamically based on window state changes.
    
    4. **Enhanced Subtitle Functionality**: Methods within `SubtitleExtensions` such as `LoadSubtitles`, `StartSubtitleDisplay`, `StopSubtitleDisplay`, and `UpdateSubtitle` have been updated or modified to improve subtitle loading, display, positioning, and updating during playback.
    
    5. **Full-Screen Presentation Event Handling**: In `MediaManager.macios.cs`, a delegate for the `AVPlayerViewController` has been set to handle full-screen presentation events, and a new class `MediaManagerDelegate` has been introduced to manage these events, allowing for a more responsive UI during window state changes.
    
    ### Detailed Changes:
    
    - **MediaElementPage.xaml.cs Modifications**: Adjusted subtitle font setting logic for different platforms within the `ChangeSourceClicked` method.
    - **SubtitleExtensions.macios.cs Additions and Modifications**: Enhanced functionality with additional `using` directives, modified the `SubtitleExtensions` class for dynamic subtitle management, and introduced handling for the `WindowsChanged` event.
    - **MediaManager.macios.cs Modifications**: Updated to set a delegate for handling full-screen presentation events and introduced `MediaManagerDelegate` for managing window state changes.
    
    These changes collectively aim to improve the user experience by ensuring subtitles are displayed correctly and responsively across different platforms and during various window state changes, such as entering or exiting full screen.
    ne0rrmatrix committed May 9, 2024
    Configuration menu
    Copy the full SHA
    4de0281 View commit details
    Browse the repository at this point in the history

Commits on May 10, 2024

  1. The code changes primarily focus on simplifying the subtitle display …

    …mechanism in an Android context, enhancing maintainability, readability, and potentially performance. Key adjustments include the removal of the `WidthRequest` property from `MediaElementPage.xaml` to streamline responsive design, the addition of a dependency comment in `SubtitleExtensions.android.cs`, and significant refactoring within the `SubtitleExtensions` class to simplify layout management and subtitle display methods.
    
    ### Most Important Changes:
    1. **Simplification of Responsive Design in MediaElementPage.xaml**: The removal of the `WidthRequest` property for different idioms indicates a move towards a simpler or refactored responsive design approach.
    2. **Dependency Annotation in SubtitleExtensions.android.cs**: A comment was added to highlight a dependency on a specific pull request, suggesting that the changes are contingent on the acceptance of related modifications.
    3. **Refactoring of SubtitleExtensions Class**: This includes reorganization and simplification of class fields, introduction of a new `textBlockLayout` for flexible subtitle display, and significant method adjustments to streamline fullscreen toggling and subtitle display management.
    
    ### Detailed List of Changes:
    - **MediaElementPage.xaml Adjustments**: Removal of `WidthRequest` property for `MediaElement` to simplify responsive design. [MediaElementPage.xaml]
    - **SubtitleExtensions.android.cs Namespace and Using Directives**: Added a dependency comment and adjusted namespace usage for better readability. [SubtitleExtensions.android.cs]
    - **SubtitleExtensions Class Field Modifications**: Reorganized fields, introduced `textBlockLayout`, and removed complex layout fields like `relativeLayout` and `fullScreenLayout` to simplify layout management. [SubtitleExtensions]
    - **Constructor and Method Adjustments in SubtitleExtensions**: Added initialization for `textBlockLayout`, refactored `MauiMediaElement_WindowsChanged` method for better readability, and simplified `StartSubtitleDisplay` and `StopSubtitleDisplay` methods by directly managing the `textBlock`. [SubtitleExtensions]
    
    These changes collectively aim to enhance the subtitle functionality within an Android application by making the codebase more manageable and the user interface more efficient.
    ne0rrmatrix committed May 10, 2024
    Configuration menu
    Copy the full SHA
    ef34b04 View commit details
    Browse the repository at this point in the history

Commits on May 11, 2024

  1. Configuration menu
    Copy the full SHA
    48d357b View commit details
    Browse the repository at this point in the history

Commits on Jun 6, 2024

  1. Configuration menu
    Copy the full SHA
    9267ef1 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    96f0d81 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    d9d1481 View commit details
    Browse the repository at this point in the history

Commits on Jun 8, 2024

  1. Configuration menu
    Copy the full SHA
    b7f0acc View commit details
    Browse the repository at this point in the history

Commits on Jun 16, 2024

  1. Configuration menu
    Copy the full SHA
    c4bc4ea View commit details
    Browse the repository at this point in the history

Commits on Jun 17, 2024

  1. Refactor UI and resource handling in media element

    - Removed outdated conditional comment related to PR# 1873.
    - Enhanced namespace access with additional `using` directives for Android and CommunityToolkit.
    - Modified `textBlock` to be nullable, supporting dynamic UI updates.
    - Centralized `textBlock` initialization in the constructor via `InitializeTextBlock()`.
    - Introduced `VerifyAndRetrieveCurrentWindowResources` for resource validation.
    - Updated `MauiMediaElement_WindowsChanged` for null checks and re-initialization of `textBlock`.
    - Added dynamic re-initialization of `textBlock` in `InitializeTextBlock()`, adjusting properties like text alignment and color.
    - Improved safety in `StopSubtitleDisplay` with null checks for `textBlock`.
    - Made Windows platform-specific UI adjustments, including increased `xamlTextBlock` bottom margin for better visual separation.
    ne0rrmatrix committed Jun 17, 2024
    Configuration menu
    Copy the full SHA
    8af5835 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    6973513 View commit details
    Browse the repository at this point in the history
  3. Refactor SubtitleExtensions class

    Refactored and simplified the SubtitleExtensions class by removing Android-specific dependencies and changing its base class to IDisposable for better resource management. Introduced a destructor and an explicit Dispose method to enhance cleanup of unmanaged resources. Added and improved methods for subtitle display management, including a new StopSubtitleDisplay method and reorganization of textBlock initialization. Restored functionality for dynamic UI adjustments with the reintroduction of VerifyAndRetrieveCurrentWindowResources method and event handler. Updated fullscreen handling logic for better subtitle visibility control. General code cleanup was performed, including the removal of unused imports, unnecessary null checks, and making the Dispose method virtual for extensibility. Adjusted instantiation in MediaManager.android.cs to align with constructor changes.
    ne0rrmatrix committed Jun 17, 2024
    Configuration menu
    Copy the full SHA
    cb80c9c View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    4743987 View commit details
    Browse the repository at this point in the history
  5. Improve subtitle handling and code cleanup

    This commit introduces several key improvements and cleanups across the codebase, focusing on enhancing media playback and subtitle management. Notably, we've added initialization for empty subtitle URLs in `MediaElementPage.xaml.cs` to prevent issues when changing media sources. Both `SrtParser.cs` and `VttParser.cs` have been updated to return an empty list of cues for null or empty subtitle content, optimizing parsing efficiency and reliability.
    
    We've removed unused namespaces, such as `System.Data;` in `SubtitleExtensions.android.cs`, and refactored `SubtitleExtensions` classes across platforms to include better error handling, clearer event management, and more robust null checking using `ArgumentNullException.ThrowIfNull`. These changes ensure a cleaner, more maintainable codebase with improved readability and compile-time efficiency.
    
    Additionally, we've made significant enhancements in media manager classes by ensuring proper subtitle and session management, including stopping and clearing subtitles appropriately and following proper disposal patterns to prevent memory leaks.
    
    Minor code improvements were also made to enhance readability, efficiency, and robustness, including the removal of redundant null checks, the use of pattern matching, and the simplification of switch statements. Lastly, we've adjusted the raising of `WindowsChanged` events to ensure consistent behavior across different media playback scenarios.
    
    These collective efforts aim to bolster the codebase's maintainability, efficiency, and reliability, especially in handling media playback and subtitles across various platforms.
    ne0rrmatrix committed Jun 17, 2024
    Configuration menu
    Copy the full SHA
    c40cacf View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    8086827 View commit details
    Browse the repository at this point in the history
  7. Improve subtitle sizing in full-screen mode

    Enhanced the `MauiMediaElement_WindowsChanged` method in `SubtitleExtensions.windows.cs` to adjust subtitle text size based on the full-screen state of the media element. Specifically, when in full-screen mode, the subtitle font size is now increased by 8.0 units over the base `mediaElement.SubtitleFontSize`. Conversely, when not in full-screen mode, the subtitle font size reverts to the base size. Additionally, simplified the `Timer_Elapsed` method by removing redundant code for setting `xamlTextBlock` font properties, streamlining the subtitle display logic.
    ne0rrmatrix committed Jun 17, 2024
    Configuration menu
    Copy the full SHA
    261bfaa View commit details
    Browse the repository at this point in the history

Commits on Jun 18, 2024

  1. Configuration menu
    Copy the full SHA
    b76ed97 View commit details
    Browse the repository at this point in the history

Commits on Jun 19, 2024

  1. Configuration menu
    Copy the full SHA
    582c175 View commit details
    Browse the repository at this point in the history
  2. 1. remove uneeded using

    2. fix windows font size when loading
    3. fix windows font size when changing from normal to full screen and back.
    ne0rrmatrix committed Jun 19, 2024
    Configuration menu
    Copy the full SHA
    1b5dfda View commit details
    Browse the repository at this point in the history

Commits on Jun 20, 2024

  1. Configuration menu
    Copy the full SHA
    5c1f8ea View commit details
    Browse the repository at this point in the history
  2. remove old code

    ne0rrmatrix committed Jun 20, 2024
    Configuration menu
    Copy the full SHA
    665f629 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    9e0ceb2 View commit details
    Browse the repository at this point in the history
  4. remove empty spacing

    ne0rrmatrix committed Jun 20, 2024
    Configuration menu
    Copy the full SHA
    e8b1720 View commit details
    Browse the repository at this point in the history
  5. Restrict class visibility

    Made several classes internal by changing their access modifiers from public to internal or removing the public keyword, affecting SrtParser, SubtitleCue, and various SubtitleExtensions files. This change limits their accessibility to within the assembly, aiming for better encapsulation. Additionally, documentation comments have been removed from these classes.
    ne0rrmatrix committed Jun 20, 2024
    Configuration menu
    Copy the full SHA
    ea1d054 View commit details
    Browse the repository at this point in the history
  6. Refactor subtitle parsers for code compliance. 'private' is not allow…

    …ed in code compliance.
    
    - Added static `timecodePattern` Regex fields in `SrtParser.cs` and `VttParser.cs` for matching timecodes in SRT and VTT formats, respectively.
    - Removed `MyRegex` method and `[GeneratedRegex]` attribute from both parsers, leveraging the new static regex patterns for improved consistency and performance.
    - Updated `ParseSrtContent` in `SrtParser.cs` and `ParseVttContent` in `VttParser.cs` to use the static `timecodePattern` fields, eliminating redundant Regex object instantiation.
    ne0rrmatrix committed Jun 20, 2024
    Configuration menu
    Copy the full SHA
    bf24dd3 View commit details
    Browse the repository at this point in the history
  7. Refactor HttpClient usage in SubtitleExtensions

    This commit centralizes the HttpClient instance across the SubtitleExtensions class for Android, macOS, and Windows platforms by changing the `httpClient` variable from an instance to a static variable. This change promotes efficient resource management and ensures consistency in handling HTTP requests across different platform implementations. Additionally, constructors have been adjusted to remove the now unnecessary instantiation of `HttpClient`, further streamlining the codebase.
    ne0rrmatrix committed Jun 20, 2024
    Configuration menu
    Copy the full SHA
    61c6745 View commit details
    Browse the repository at this point in the history

Commits on Jun 21, 2024

  1. Refactor subtitle handling and UI adjustments

    This commit overhauls the subtitle display and management across Android, iOS/macOS, and Windows platforms. Key changes include:
    
    - Renaming `textBlock` and `textBlockLayout` to `subtitleView` and `subtitleLayout`, respectively, for clarity in their purpose.
    - Correcting the event name from `WindowsChanged` to `WindowChanged` in multiple files to fix a typo and standardize the event across the codebase.
    - Updating method signatures and event handler implementations to align with the new variable and event names, ensuring consistency in subtitle initialization, display, and removal.
    - Adjusting subtitle-related UI component properties (e.g., font settings, visibility, layout parameters) to improve subtitle presentation in line with media element settings.
    - Modifying event handling logic to support the updated event name and improve subtitle management during window state changes.
    - Enhancing resource cleanup by updating `Dispose` methods for new subtitle-related variables to prevent memory leaks.
    - Conducting general code cleanup to remove unused code and improve code clarity and maintainability.
    
    These changes aim to enhance the readability, maintainability, and functionality of subtitle handling in media elements, providing a more intuitive and smooth user experience.
    ne0rrmatrix committed Jun 21, 2024
    Configuration menu
    Copy the full SHA
    cfb47ec View commit details
    Browse the repository at this point in the history
  2. Refactor subtitle update and cleanup logic

    - Renamed `Timer_Elapsed` to `UpdateSubtitle` in `SubtitleExtensions` files to better reflect its purpose.
    - Updated event subscription/unsubscription to use `UpdateSubtitle`, ensuring correct event handling.
    - Enhanced disposal pattern in both Android and Windows extensions to include safety checks and ensure proper cleanup of the timer and `httpClient`, preventing memory leaks and null reference exceptions.
    ne0rrmatrix committed Jun 21, 2024
    Configuration menu
    Copy the full SHA
    d1f3133 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    9018a89 View commit details
    Browse the repository at this point in the history
  4. Refactor and enhance subtitle handling

    This commit introduces several key changes aimed at improving the performance, clarity, and resource management within the CommunityToolkit.Maui.Extensions library, particularly around media playback and subtitle handling across various platforms. Key changes include:
    
    - Refactoring `SrtParser` and `VttParser` classes to utilize the `[GeneratedRegex]` attribute for more efficient Regex initialization.
    - Converting the `SubtitleCue` class to sealed to prevent inheritance and ensure its integrity.
    - Modifying the base class/interface of `SubtitleExtensions` for Android, macOS, and Windows to better align with platform-specific needs, alongside shifting event handling focus from window status to full-screen status changes.
    - Introducing `FullScreenEventArgs` and `GridEventArgs` to replace `WindowsEventArgs`, refining event data specificity for better clarity in event handling.
    - Updating event handling in `MauiMediaElement` across Android and Windows to utilize the new event argument classes, ensuring consistency with the library's refocused event handling strategy.
    - Implementing adjustments in `MediaManager` classes for Android and macOS, including clearer CancellationTokenSource variable names and improved resource cleanup patterns, as well as updating macOS event handling to use `FullScreenEventArgs`.
    
    These changes collectively enhance the library's approach to handling media and subtitles, focusing on performance optimization, clearer code, and better resource management.
    ne0rrmatrix committed Jun 21, 2024
    Configuration menu
    Copy the full SHA
    386ad50 View commit details
    Browse the repository at this point in the history
  5. Refactor and centralize parser logic

    - Simplified namespace declarations in `SrtParser.cs` and `VttParser.cs` by removing unnecessary `using` directives.
    - Introduced `Parser.shared.cs` to centralize common logic for SRT and VTT parsers, including shared regular expressions, a common timecode parsing method, and a shared line separator.
    - Refactored `SrtParser.cs` and `VttParser.cs` to utilize centralized logic from `Parser.shared.cs`, enhancing code reuse and maintainability.
    - Removed duplicate code and definitions from `SrtParser.cs` and `VttParser.cs`, further reducing redundancy.
    - Adopted the `GeneratedRegex` attribute in `Parser.shared.cs` for defining regular expressions, improving performance and maintainability.
    ne0rrmatrix committed Jun 21, 2024
    Configuration menu
    Copy the full SHA
    8d1749d View commit details
    Browse the repository at this point in the history
  6. Make subtitle properties read-only in IMediaElement

    Changed the `SubtitleFont`, `SubtitleUrl`, and `SubtitleFontSize` properties in the `IMediaElement` interface from read-write to read-only. This update restricts these properties to be set only once, preventing further modifications after their initial assignment.
    ne0rrmatrix committed Jun 21, 2024
    Configuration menu
    Copy the full SHA
    fb5f22c View commit details
    Browse the repository at this point in the history
  7. Refactor subtitle parsing and HTTP handling

    - Centralized HttpClient usage in Parser class, enhancing code reuse and simplifying HTTP request management across subtitle extensions.
    - Shifted regex usage to SrtParser and VttParser, optimizing where regular expressions are primarily utilized.
    - Introduced CommunityToolkit.Maui.Core in Parser.shared.cs for improved functionality within the Maui toolkit.
    - Added async methods for subtitle fetching and parsing in Parser.shared.cs, supporting SRT and VTT formats for better efficiency and application responsiveness.
    - Implemented GeneratedRegex attributes in SrtParser and VttParser for performance through compile-time optimized code.
    - Cleaned up unused Regex instances and refined class structures in Parser.shared.cs, SrtParser, and VttParser, focusing on the new parsing strategy and improving codebase clarity.
    - Enhanced error handling and logging in subtitle content fetching to ensure robust subtitle loading.
    - Updated UI and lifecycle management across platform-specific subtitle extensions and MediaManager.macios.cs to align with the new parsing and fetching strategy, ensuring consistent handling and resource management.
    ne0rrmatrix committed Jun 21, 2024
    Configuration menu
    Copy the full SHA
    c98bf9f View commit details
    Browse the repository at this point in the history
  8. Refactor and improve SubtitleExtensions

    Introduced `subtitleBackgroundColor` and `clearBackgroundColor` constants in `SubtitleExtensions` for unified color management. Refactored background color assignments in `StartSubtitleDisplay` and `UpdateSubtitle` methods to use these constants, enhancing code readability and maintainability. Streamlined the removal of the time observer in the `StopSubtitleDisplay` method by checking for nullity before proceeding, improving logic flow. Simplified destructor logic by inverting null checks and removing redundant code, leading to cleaner and more efficient resource management. These changes collectively enhance the clarity, maintainability, and efficiency of the `SubtitleExtensions` class.
    ne0rrmatrix committed Jun 21, 2024
    Configuration menu
    Copy the full SHA
    06ad678 View commit details
    Browse the repository at this point in the history
  9. Refactor SubtitleExtensions class

    Refactored the SubtitleExtensions class to improve Android context and resource management. Removed unused namespaces and fields, shifting dependency from IDisposable to Java.Lang.Object for better lifecycle management. Introduced a new field and struct for robust activity and view handling. Updated methods for initialization and full-screen handling to utilize the new approach. Removed IDisposable pattern in favor of finalization for resource cleanup.
    ne0rrmatrix committed Jun 21, 2024
    Configuration menu
    Copy the full SHA
    3d2fd49 View commit details
    Browse the repository at this point in the history
  10. Fix method naming inconsistencies

    - Corrected the method name from `OnWindowsChanged` to `OnFullScreenChanged` in `MauiMediaElement.android.cs` to accurately reflect its functionality related to full screen state changes.
    - Fixed a typo in `MediaManager.macios.cs`, changing `OnFulScreenChanged` back to the correct `OnFullScreenChanged` to prevent potential compilation errors.
    ne0rrmatrix committed Jun 21, 2024
    Configuration menu
    Copy the full SHA
    6c2a667 View commit details
    Browse the repository at this point in the history
  11. Renamed OnGridEventsChanged to FullScreenChanged

    Renamed the method `OnGridEventsChanged` to `FullScreenChanged` to better reflect its purpose related to handling full-screen state changes. Updated calls in `OnFullScreenButtonClick` method to match the new method name, ensuring consistent handling of full-screen toggles and popup management. The destructor `~MauiMediaElement()` and the core functionality of the renamed method remain unchanged.
    ne0rrmatrix committed Jun 21, 2024
    Configuration menu
    Copy the full SHA
    0cbd66f View commit details
    Browse the repository at this point in the history
  12. Configuration menu
    Copy the full SHA
    8e46365 View commit details
    Browse the repository at this point in the history

Commits on Jun 22, 2024

  1. Refactor and fix subtitle extension bugs

    - Added null checks and validation in SubtitleExtensions for Android to ensure the current activity and its decor view are correctly initialized, throwing exceptions if not.
    - Removed redundant code and simplified visibility state changes in SubtitleExtensions for Android, enhancing code readability and maintainability.
    - Improved UI code readability in SubtitleExtensions for iOS/macOS by adjusting property settings to be multi-line.
    - Streamlined subtitle loading in MediaManager for Android by optimizing variable usage and method calls.
    ne0rrmatrix committed Jun 22, 2024
    Configuration menu
    Copy the full SHA
    1b854e6 View commit details
    Browse the repository at this point in the history
  2. Refactor subtitle parsers for efficiency

    - In both SrtParser.cs and VttParser.cs, changed list initialization to `new List<SubtitleCue>()` for clarity and proper instantiation.
    - Improved readability by adding spaces around `if` conditions and using implicit typing with `var` for line splitting.
    - Introduced `textBuffer` in both parsers to optimize string handling, reducing memory usage and improving performance.
    - Adjusted subtitle text addition to use `Environment.NewLine` in SRT and spaces in VTT, enhancing readability and format consistency.
    - Replaced string concatenations with more efficient methods for building subtitle texts.
    - Changed `Text = ""` to `Text = string.Empty` in `SubtitleCue` initialization for consistency.
    ne0rrmatrix committed Jun 22, 2024
    Configuration menu
    Copy the full SHA
    df5d603 View commit details
    Browse the repository at this point in the history
  3. Created sample parser file and added ability of developer to use a cu…

    …stom parser in media element.
    ne0rrmatrix committed Jun 22, 2024
    Configuration menu
    Copy the full SHA
    38aa3e4 View commit details
    Browse the repository at this point in the history
  4. Refine codebase and improve documentation

    - Converted `Parser.cs` from a partial to a regular class and moved `HttpClient` to a static readonly field for better management.
    - Added meaningful XML documentation across `Parser.cs`, `SrtParser.cs`, and `IParser` interface to enhance code understandability and maintainability.
    - Streamlined code by removing unnecessary XML comments and refining access modifiers in `SubtitleExtensions` across Android, macOS, and Windows implementations.
    - General cleanup across subtitle parsing and extension classes, focusing on removing redundant comments and adding valuable documentation where necessary.
    - Updated `IParser` interface with documented `ParseContent` method to clarify expected behavior for implementers.
    ne0rrmatrix committed Jun 22, 2024
    Configuration menu
    Copy the full SHA
    d2ccc90 View commit details
    Browse the repository at this point in the history
  5. Refactor subtitle parsing functionality

    This commit represents a comprehensive refactor of the subtitle parsing functionality within the application. Key changes include the removal of the `Parser` class and its replacement with the `SubtitleParser` class, designed specifically for subtitle parsing. The `CustomParser` property in the `IMediaElement` interface and `MediaElement` class has been renamed to `CustomSubtitleParser` to more accurately reflect its purpose. All references to the old `Parser` class have been updated to use `SubtitleParser`, ensuring consistency across the codebase. Platform-specific `SubtitleExtensions` files have been updated to utilize the new `SubtitleParser` for loading and parsing subtitle content. The introduction of the `SubtitleParser` class includes methods for parsing subtitle content, fetching content from URLs, and error handling for more robust functionality. Additionally, the static `Separator` property has been maintained for splitting subtitle content into lines, preserving the original parsing logic while transitioning to the new class structure.
    ne0rrmatrix committed Jun 22, 2024
    Configuration menu
    Copy the full SHA
    8ff9947 View commit details
    Browse the repository at this point in the history

Commits on Jun 23, 2024

  1. Refactor subtitle management and error handling

    This commit overhauls the subtitle management system, focusing on enhancing robustness, maintainability, and readability. Key changes include:
    
    - Refactored `CurrentPlatformActivity` to use static properties, eliminating the need for instantiation when accessing the current activity, window, and view group. This simplification is pivotal for streamlining operations related to subtitle management in media applications.
    
    - Modified `subtitleView` initialization to leverage the static `CurrentActivity` property from `CurrentPlatformActivity`, aligning with the refactoring efforts and ensuring context-appropriate initialization.
    
    - Introduced comprehensive error handling by adding checks to throw exceptions if the current activity or its window is null, significantly improving the application's resilience by ensuring graceful failure with informative error messages.
    
    - Enhanced subtitle loading logic by adding validation to prevent null reference exceptions, implementing a clear operation for `cues`, and adding a conditional early return if the `SubtitleUrl` is null or empty, optimizing the process and ensuring a clean state for subtitle loading.
    
    - Improved subtitle display control by adding conditional checks to prevent unnecessary display attempts and ensuring a clean state through clear operations for `cues` when stopping the subtitle display.
    
    - Updated `OnFullScreenChanged` method to use static properties of `CurrentPlatformActivity` for accessing the current view group, maintaining consistency with the refactoring and ensuring correct fullscreen mode handling.
    
    These changes collectively improve the application's subtitle management functionality, making it more robust, maintainable, and easier to read.
    ne0rrmatrix committed Jun 23, 2024
    Configuration menu
    Copy the full SHA
    b5f232f View commit details
    Browse the repository at this point in the history
  2. Refactor PageExtensions and update Android refs

    - Changed `PageExtensions` class from `static` to `static partial` for enhanced flexibility and maintainability.
    - Removed direct `Android.App.Activity` reference in `SubtitleExtensions.android.cs`, replacing it with `CurrentPlatformActivity` from `CommunityToolkit.Maui.Extensions.PageExtensions` for better modularity.
    - Deleted `CurrentPlatformActivity` record in `SubtitleExtensions.android.cs` and reintroduced it in `PageExtensions.android.cs` to centralize platform-specific activity management.
    - Removed unused `Android.Graphics` import in `MediaControlsService.android.cs` to clean up dependencies and improve compile-time efficiency.
    ne0rrmatrix committed Jun 23, 2024
    Configuration menu
    Copy the full SHA
    7ebee6a View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    233048c View commit details
    Browse the repository at this point in the history

Commits on Jun 25, 2024

  1. Configuration menu
    Copy the full SHA
    799c967 View commit details
    Browse the repository at this point in the history
  2. Added fonts to mac plist.

    Removed unneeded test code.
    ne0rrmatrix committed Jun 25, 2024
    Configuration menu
    Copy the full SHA
    f8211a6 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    98e1b46 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    d5c7a79 View commit details
    Browse the repository at this point in the history
  5. Refactor font handling for subtitles

    Unified subtitle font handling across platforms by simplifying the code in `MediaElementPage.xaml.cs` to use a single `SubtitleFont` property, eliminating the need for platform-specific directives. Integrated `CommunityToolkit.Maui.Core` in `AppBuilderExtensions.shared.cs` for enhanced app functionality and introduced dynamic font loading to add fonts programmatically, increasing flexibility. Updated device-specific font specifications in subtitle extension files (`SubtitleExtensions.*.cs`) to dynamically determine correct fonts, reducing platform-specific code. Added `FontExtensions.cs` for utility methods supporting dynamic font handling. Improved fullscreen subtitle support on Windows in `SubtitleExtensions.windows.cs` by adjusting font size based on the media element's property, enhancing user experience.
    ne0rrmatrix committed Jun 25, 2024
    Configuration menu
    Copy the full SHA
    b6ba3a7 View commit details
    Browse the repository at this point in the history
  6. Refactor font spec handling and parsing

    - Renamed `DeviceFontSpecs` to `FontExtensions` and refactored its functionality.
    - Introduced `FontFamily` record struct for parsing font specifications with regular expressions, providing platform-specific font paths through properties (`Android`, `WindowsFont`, `MacIOS`).
    - Made the regex pattern static for performance and added instance `match` field in `FontFamily` for optimized parsing.
    - Improved error handling by logging mismatches in expected font specification format.
    - Updated subtitle extension methods across platform-specific files to use `FontFamily` struct for font specifications.
    - Added a new `FontHelper` class, indicating further refactoring or new functionalities related to font handling.
    ne0rrmatrix committed Jun 25, 2024
    Configuration menu
    Copy the full SHA
    f0bdc92 View commit details
    Browse the repository at this point in the history

Commits on Jun 26, 2024

  1. Add multiple fonts to sample to show how to use them in media element.

    Add support for OTF and TTF font types
    ne0rrmatrix committed Jun 26, 2024
    Configuration menu
    Copy the full SHA
    7636777 View commit details
    Browse the repository at this point in the history
  2. Refactor subtitle parsers for efficiency

    - Introduced `System.Text` namespace in `MediaElementPage.xaml.cs`, `SrtParser.cs`, and `VttParser.cs` for `StringBuilder` usage.
    - Refactored subtitle cue text construction to use `StringBuilder` in `SrtParser.cs` and `VttParser.cs`, enhancing string manipulation efficiency.
    - Modified line splitting logic to ignore empty entries, streamlining parsing.
    - Added `CreateCue` method in both parsers for centralized `SubtitleCue` creation, improving modularity.
    - Updated text buffering to use `StringBuilder.AppendLine`, optimizing memory and simplifying code.
    - Enhanced regex performance in timecode parsing by using `RegexOptions.Compiled`.
    - Improved error handling in `VttParser.cs` timecode parsing with `TimeSpan.TryParse`, increasing robustness.
    ne0rrmatrix committed Jun 26, 2024
    Configuration menu
    Copy the full SHA
    a7bb0d5 View commit details
    Browse the repository at this point in the history
  3. Updated font exports behavior

    Removed font loading from sample project, it is not needed for device specific font load in nuget.
    ne0rrmatrix committed Jun 26, 2024
    Configuration menu
    Copy the full SHA
    97702a3 View commit details
    Browse the repository at this point in the history
  4. fix spacing

    ne0rrmatrix committed Jun 26, 2024
    Configuration menu
    Copy the full SHA
    b3c7a1e View commit details
    Browse the repository at this point in the history

Commits on Jun 27, 2024

  1. Improve subtitle loading and display

    - Updated the `loadSubTitles` string in `MediaElementPage.xaml.cs` for clarity.
    - Added platform-specific subtitle font size settings in `ChangeSourceClicked`.
    - Adjusted font size and line break mode for iOS/macOS in `SubtitleExtensions.macios.cs`.
    - Modified `StartSubtitleDisplay` to clear cues on stop.
    - Simplified `StopSubtitleDisplay` by removing redundant code.
    - Enhanced `UpdateSubtitle` with early return for null or empty `SubtitleUrl`.
    ne0rrmatrix committed Jun 27, 2024
    Configuration menu
    Copy the full SHA
    6e79bf0 View commit details
    Browse the repository at this point in the history
  2. Add destructor to SubtitleExtensions class

    Added a destructor method `~SubtitleExtensions()` to the `SubtitleExtensions` class within the `SubtitleExtensions.macios.cs` file. This destructor ensures proper cleanup by unsubscribing from the `FullScreenChanged` event of the `MediaManagerDelegate` and removing a time observer from the `player` object, provided `playerObserver` and `player` are not null. This change aims to prevent potential memory leaks or unwanted behavior by ensuring that instances of `SubtitleExtensions` are correctly disposed of during garbage collection.
    ne0rrmatrix committed Jun 27, 2024
    Configuration menu
    Copy the full SHA
    8a367bd View commit details
    Browse the repository at this point in the history

Commits on Jun 28, 2024

  1. Improve subtitle parsing and error handling

    Enhanced subtitle parsing and error handling across SRT and VTT formats by trimming trailing newlines, adding validation for empty files and cue timing, and wrapping subtitle loading in try-catch blocks. Implemented new unit tests for both parsers and refactored code for better readability and maintainability. These changes aim to ensure more robust and efficient subtitle processing, with improved error logging and validation mechanisms.
    ne0rrmatrix committed Jun 28, 2024
    Configuration menu
    Copy the full SHA
    b60beee View commit details
    Browse the repository at this point in the history
  2. Update test for SrtParser invalid timestamps

    The `ParseSrtFile_InvalidTimestamps_ThrowsException` test in `SrtParserTests.cs` was modified to correctly test the `SrtParser` instead of `VttParser`. Changes include removing the instantiation of `VttParser`, adding a new instantiation of `SrtParser`, and updating the assertion to use the `srtParser` instance for checking a `FormatException` when parsing invalid timestamps.
    ne0rrmatrix committed Jun 28, 2024
    Configuration menu
    Copy the full SHA
    4e2348a View commit details
    Browse the repository at this point in the history
  3. Refactor subtitle handling across platforms

    Refactored subtitle handling to improve maintainability and code quality across Android, macOS, iOS, and Windows platforms. Key changes include transitioning `SubtitleExtensions` to partial classes for shared code usage, introducing shared properties (`MediaElement`, `Cues`, `Timer`) in `SubtitleExtensions.shared.cs`, and centralizing the `LoadSubtitles` method. Enhanced `SrtParser.cs` and `SubtitleParser.cs` for better line splitting and URL validation. Removed unused directives and variables, and added new test cases for subtitle loading functionality. Minor comment adjustments and code clean-up were also performed to enhance readability and maintainability.
    ne0rrmatrix committed Jun 28, 2024
    Configuration menu
    Copy the full SHA
    cd71c3d View commit details
    Browse the repository at this point in the history
  4. Add FontExtensions unit tests

    Added a comprehensive suite of unit tests in `FontExtensionsTests.cs` for the `CommunityToolkit.Maui` project, focusing on the `FontFamily` property across different platforms (Android, Windows, Mac/iOS). These tests validate correct font file names, URIs, and names for valid inputs and ensure graceful handling of invalid inputs by returning an empty string. Dependencies on `CommunityToolkit.Maui.Core`, `CommunityToolkit.Maui.Views`, and `Xunit` were introduced to support these tests.
    ne0rrmatrix committed Jun 28, 2024
    Configuration menu
    Copy the full SHA
    d6fa737 View commit details
    Browse the repository at this point in the history
  5. Refine font family test methods

    - Removed unused `using` directive for `CommunityToolkit.Maui.Core` and corrected the `using` directive for `CommunityToolkit.Maui.Views` to prevent duplication.
    - Renamed test methods for TTF font family verification on Android, Windows, and MacOS/iOS to include "TTF" in their names for clarity.
    - Added new test methods for verifying OTF font family results across Android, Windows, and MacOS/iOS, focusing on `.otf` file extension handling.
    - Updated test methods for invalid TTF font input to specify "TTF" in method names, enhancing specificity and clarity.
    ne0rrmatrix committed Jun 28, 2024
    Configuration menu
    Copy the full SHA
    24b9ad7 View commit details
    Browse the repository at this point in the history
  6. Update comments

    ne0rrmatrix committed Jun 28, 2024
    Configuration menu
    Copy the full SHA
    6144f4b View commit details
    Browse the repository at this point in the history
  7. Refactor and optimize subtitle handling

    This commit introduces several key changes aimed at refining the subtitle display functionality across different platforms. Notably, the `StopSubtitleDisplay` method in both `SubtitleExtensions.android.cs` and `SubtitleExtensions.windows.cs` files has been refactored for improved efficiency and readability. In the Android version, the method now clears `Cues` unconditionally at the start, adds checks for null `Timer`, and ensures `subtitleView.Text` is only cleared if `subtitleView` is not null. Redundant code has been removed, streamlining the method's execution.
    
    In the Windows version, a null-conditional operator is now used for clearing `Cues`, and `subtitleTextBlock.Text` is explicitly set to an empty string when stopping the subtitle display, enhancing safety against null reference exceptions.
    
    Additionally, `SubtitleExtensions.windows.cs` sees the introduction of a `using` directive for `Microsoft.Maui.Controls.Grid` and changes the `mauiMediaElement` field to read-only, signaling a design shift towards immutability.
    
    The `LoadSubtitles` method in both `MediaManager.android.cs` and `MediaManager.windows.cs` has been updated to optimize subtitle loading. The Android version eliminates a redundant stop-start cycle in subtitle display, potentially improving performance. The Windows version now conditionally instantiates `subtitleExtensions`, avoiding unnecessary object creation and preserving state.
    
    These changes collectively aim to make subtitle handling more efficient, readable, and robust across platforms.
    ne0rrmatrix committed Jun 28, 2024
    Configuration menu
    Copy the full SHA
    3eabcfb View commit details
    Browse the repository at this point in the history
  8. Remove many empty lines

    ne0rrmatrix committed Jun 28, 2024
    Configuration menu
    Copy the full SHA
    22b5fdf View commit details
    Browse the repository at this point in the history

Commits on Jul 2, 2024

  1. Refactor test for NullReferenceException

    Refactored `LoadSubtitles_InvalidSubtitleExtensions_ThrowsNullReferenceExceptionAsync` in `SubtitleExtensionsTests.cs` to focus on invalid `SubtitleExtensions` rather than an invalid `IMediaElement`. Changed the setup to instantiate a valid `MediaElement` and explicitly set `subtitleExtensions` to `null` to simulate an uninitialized state. Updated the assertion to expect a `NullReferenceException`, aligning with the new test focus.
    ne0rrmatrix committed Jul 2, 2024
    Configuration menu
    Copy the full SHA
    19875bb View commit details
    Browse the repository at this point in the history

Commits on Jul 3, 2024

  1. Configuration menu
    Copy the full SHA
    de2bbcb View commit details
    Browse the repository at this point in the history

Commits on Jul 4, 2024

  1. Fix merge Conflict

    ne0rrmatrix committed Jul 4, 2024
    Configuration menu
    Copy the full SHA
    3f2aca7 View commit details
    Browse the repository at this point in the history
  2. Fix merge error

    ne0rrmatrix committed Jul 4, 2024
    Configuration menu
    Copy the full SHA
    b67a00e View commit details
    Browse the repository at this point in the history

Commits on Jul 5, 2024

  1. Configuration menu
    Copy the full SHA
    ea38639 View commit details
    Browse the repository at this point in the history

Commits on Jul 9, 2024

  1. Configuration menu
    Copy the full SHA
    a19a523 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    cf89c37 View commit details
    Browse the repository at this point in the history

Commits on Jul 17, 2024

  1. Configuration menu
    Copy the full SHA
    5f972f3 View commit details
    Browse the repository at this point in the history

Commits on Jul 19, 2024

  1. Refactor full-screen event handling

    This commit significantly refactors the handling of full-screen state changes across Android, iOS/macOS, and Windows within a media playback context. A new class, `FullScreenStateChangedEventArgs`, and an enum, `MediaElementScreenState`, have been introduced to standardize full-screen state change notifications. Platform-specific full-screen events and their handlers have been removed in favor of a centralized `FullScreenEvents` record in `MediaManager.shared.cs`, which includes a static event `WindowsChanged` and a method `OnWindowsChanged` for raising the event. This change aims to improve cross-platform consistency and maintainability of media playback features with full-screen capabilities. Additionally, code cleanup and refactoring were performed to enhance readability and update documentation.
    ne0rrmatrix committed Jul 19, 2024
    Configuration menu
    Copy the full SHA
    91f1dbb View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    e101e4d View commit details
    Browse the repository at this point in the history
  3. Refactor Android context access in Maui app

    This commit overhauls how platform-specific activities, windows, and view groups are managed within our Maui application targeting Android. Key changes include the removal of the `PageExtensions` class, which was previously responsible for providing access to the current Android activity, window, and view group. In its place, we've introduced a new `CurrentPlatformContext` record struct within the `MauiMediaElement` class. This struct is designed to serve a similar purpose but with an improved structure and broader access, as indicated by its `public readonly` visibility modifier.
    
    Additionally, the `SubtitleExtensions` class has been updated to utilize the new `CurrentPlatformContext` for managing subtitle functionality, particularly in relation to full-screen mode toggling. This shift away from the now-removed `PageExtensions` class to a more centralized approach within `MauiMediaElement` aims to streamline interactions with the Android platform. It enhances the maintainability and readability of the code, especially for features requiring close integration with Android system capabilities like media playback and full-screen management.
    ne0rrmatrix committed Jul 19, 2024
    Configuration menu
    Copy the full SHA
    dfa0a4a View commit details
    Browse the repository at this point in the history
  4. Refine visibility and structure of records

    Changed the visibility of `CurrentPlatformContext` in `MauiMediaElement.android.cs` and `FullScreenEvents` in `MediaManager.shared.cs` from `public` to `internal`, limiting their accessibility to within the assembly. Additionally, transformed `FullScreenEvents` from a `record` to a `readonly record struct`, making it a value type and immutable.
    ne0rrmatrix committed Jul 19, 2024
    Configuration menu
    Copy the full SHA
    16a7b9f View commit details
    Browse the repository at this point in the history

Commits on Jul 20, 2024

  1. Refactor FontExtensions and PageExtensions

    - Changed `FontExtensions` class from `static` to `sealed`, allowing instantiation and extension but preventing inheritance.
    - Modified `PageExtensions` class from `partial` to a static class, consolidating its implementation.
    ne0rrmatrix committed Jul 20, 2024
    Configuration menu
    Copy the full SHA
    715f808 View commit details
    Browse the repository at this point in the history

Commits on Jul 22, 2024

  1. Configuration menu
    Copy the full SHA
    dbb3f59 View commit details
    Browse the repository at this point in the history

Commits on Jul 23, 2024

  1. Enhance subtitle parsing and display capabilities

    This commit significantly updates the subtitle handling functionality across the application, marking a pivotal enhancement in how subtitles are parsed, represented, and displayed. Key changes include:
    
    - Refactored the `SrtParser` and `VttParser` for improved parsing accuracy and error handling, transitioning from returning a list of cues to a more structured `SubtitleDocument`.
    - Enhanced the `SubtitleCue` class with additional properties for detailed cue settings and replaced the `Text` property with `RawText` and `ParsedCueText` for a richer representation of subtitle cues.
    - Updated Android `SubtitleExtensions` to support advanced subtitle cue structures, including new methods for displaying cues with applied styles and positioning.
    - Conducted general code cleanup for better readability and maintainability, including the removal of unused `using` directives.
    - Adjusted namespace and using directives in response to changes in the CommunityToolkit libraries, reflecting a reorganization of classes and functionalities.
    - Modified field modifiers and initialization practices, particularly in macOS/iOS implementations, to enhance flexibility in handling subtitle cues.
    - Improved error handling and validation across the board, throwing more specific exceptions for invalid inputs and formats.
    - Introduced new classes (`SubtitleDocument`, `SubtitleMetadataCue`, `SubtitleNode`) to support a comprehensive representation of subtitle data.
    - Implemented a suite of tests for the updated parsers and subtitle handling functionalities, ensuring robustness and reliability.
    
    These updates collectively advance the application's capability to handle a wide range of subtitle formats and features, laying the groundwork for future enhancements in multimedia content accessibility and presentation.
    ne0rrmatrix committed Jul 23, 2024
    Configuration menu
    Copy the full SHA
    2791bd6 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    236e550 View commit details
    Browse the repository at this point in the history

Commits on Jul 24, 2024

  1. Revert "Enhance subtitle parsing and display capabilities"

    This reverts commit 2791bd6.
    
    reverting
    ne0rrmatrix committed Jul 24, 2024
    Configuration menu
    Copy the full SHA
    79ae3c5 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    1872d04 View commit details
    Browse the repository at this point in the history
  3. Reorder SubtitleUrl assignment in ChangeSourceClicked method

    Reordered the assignment of the `SubtitleUrl` property in the
    `ChangeSourceClicked` method within `MediaElementPage.xaml.cs`.
    Set `SubtitleUrl` to an empty string before setting the `Source`
    property for `loadOnlineMp4` and `loadHls` cases. Moved `SubtitleUrl`
    assignment after setting `Source` to `null` in the `resetSource` case.
    ne0rrmatrix committed Jul 24, 2024
    Configuration menu
    Copy the full SHA
    2c63665 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    ab22367 View commit details
    Browse the repository at this point in the history
  5. In SubtitleExtensions.windows.cs:

    - Changed subtitleTextBlock from TextBlock to TextBox for advanced text handling.
    - Set properties for subtitleTextBlock: FontSize (16), Width (one-third of player's width), TextAlignment (Center), Foreground (white), Background (black with 0.7 opacity), BackgroundSizing (InnerBorderEdge), TextWrapping (Wrap), and initialized Text to an empty string.
    - Modified StopSubtitleDisplay to clear TextProperty using ClearValue.
    - Set HorizontalTextAlignment to Center in UpdateSubtitle method.
    - Adjusted OnFullScreenChanged method to handle subtitleTextBlock width and margin changes based on full-screen mode.
    ne0rrmatrix committed Jul 24, 2024
    Configuration menu
    Copy the full SHA
    fb5b6af View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    a7ee1be View commit details
    Browse the repository at this point in the history

Commits on Jul 25, 2024

  1. Configuration menu
    Copy the full SHA
    c993d38 View commit details
    Browse the repository at this point in the history
  2. Refactor SubtitleExtensions for better layout management

    Updated SubtitleExtensions to improve subtitle handling and layout:
    - Replaced RelativeLayout.LayoutParams with FrameLayout.LayoutParams.
    - Added screenState field to manage screen state.
    - Initialized screenState in constructor and called InitializeLayout.
    - Added destructor to clean up timer and unsubscribe from events.
    - Updated StartSubtitleDisplay and StopSubtitleDisplay methods.
    - Refactored UpdateSubtitle to call SetHeight and InitializeText.
    - Added OnFullScreenChanged to handle full-screen state changes.
    - Added SetHeight to adjust subtitle view height.
    - Added InitializeText to set typeface and text size.
    - Added InitializeLayout to set up subtitleLayout.
    - Moved InitializeTextBlock for better code organization.
    ne0rrmatrix committed Jul 25, 2024
    Configuration menu
    Copy the full SHA
    b0bc69b View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    269b512 View commit details
    Browse the repository at this point in the history

Commits on Jul 26, 2024

  1. Refactor subtitleTextBlock initialization and usage

    Refactored the `SubtitleExtensions` class to improve code readability and maintainability:
    - Changed `subtitleTextBlock` to a nullable type (`TextBox?`).
    - Moved `subtitleTextBlock` initialization to a new method `InitializeTextBlock`.
    - Updated the constructor to call `InitializeTextBlock`.
    - Added null checks for `subtitleTextBlock` using `ArgumentNullException.ThrowIfNull`.
    - Introduced `InitializeText` to handle text-related properties of `subtitleTextBlock`.
    - Removed redundant initialization code from the constructor and `UpdateSubtitle`, moving it to `InitializeText`.
    ne0rrmatrix committed Jul 26, 2024
    Configuration menu
    Copy the full SHA
    f0efafc View commit details
    Browse the repository at this point in the history
  2. Refactor SubtitleExtensions and update MediaManager

    Updated `SubtitleExtensions` to replace `viewController` with `screenState`, refactored methods to use `screenState`, and added new methods for text wrapping and regex matching. Adjusted `CalculateSubtitleFrame` and `OnFullScreenChanged` methods. Updated `MediaManager` to call `StopSubtitleDisplay`.
    ne0rrmatrix committed Jul 26, 2024
    Configuration menu
    Copy the full SHA
    ee297d8 View commit details
    Browse the repository at this point in the history
  3. Refactor SubtitleExtensions for better resource management

    Refactored SubtitleExtensions to improve resource management and
    ensure proper disposal of resources. Replaced destructor with
    Dispose method, which now calls StopTimer, clears Cues, and
    disposes of subtitleView. Updated StartSubtitleDisplay to
    subscribe to WindowsChanged event and start timer using new
    StartTimer method. Updated StopSubtitleDisplay to call StopTimer,
    clear Cues, and unsubscribe from WindowsChanged event. Added
    null checks in UpdateSubtitle and OnFullScreenChanged methods.
    In MediaManager.android.cs, Dispose method now calls
    subtitleExtensions?.StopSubtitleDisplay() and
    subtitleExtensions?.Dispose() for proper cleanup.
    ne0rrmatrix committed Jul 26, 2024
    Configuration menu
    Copy the full SHA
    206e650 View commit details
    Browse the repository at this point in the history

Commits on Jul 27, 2024

  1. Refactor SubtitleExtensions and MediaManager

    Updated SubtitleExtensions.android.cs:
    - Added using directives for CommunityToolkit.Maui namespaces.
    - Removed Dispose method; added finalizer to call StopSubtitleDisplay.
    - Corrected formatting in StartSubtitleDisplay method.
    - Used null-coalescing assignment in StartTimer method.
    - Set Timer to null in StopTimer method after disposal.
    - Unsubscribed from WindowsChanged event, cleared subtitle text, and removed subtitleView in StopSubtitleDisplay method.
    - Refactored UpdateSubtitle method with pattern matching and early return.
    - Refactored OnFullScreenChanged method with switch statement and thread-safe UI updates.
    
    Updated MediaManager.android.cs:
    - Used null-coalescing assignment for subtitleExtensions initialization.
    - Updated Dispose method to call subtitleExtensions?.Dispose().
    ne0rrmatrix committed Jul 27, 2024
    Configuration menu
    Copy the full SHA
    fd173c2 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    4262cd5 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    ca21bbd View commit details
    Browse the repository at this point in the history
  4. Refactor SubtitleExtensions methods

    Modified SetText to pass text directly to TextWrapper, allowing null values. Changed GetCurrentUIViewController to a static method for class-level access.
    ne0rrmatrix committed Jul 27, 2024
    Configuration menu
    Copy the full SHA
    2dfedae View commit details
    Browse the repository at this point in the history
  5. Refactor UpdateSubtitle method for clarity and efficiency

    Streamlined null checks in `UpdateSubtitle` method by combining
    checks for `playerViewController` and `MediaElement.SubtitleUrl`
    into a single conditional statement. Removed redundant
    `ArgumentNullException.ThrowIfNull` calls for `Cues`,
    `subtitleLabel`, and `MediaElement`.
    ne0rrmatrix committed Jul 27, 2024
    Configuration menu
    Copy the full SHA
    6869d5a View commit details
    Browse the repository at this point in the history
  6. Updated Spacing

    ne0rrmatrix committed Jul 27, 2024
    Configuration menu
    Copy the full SHA
    6daff2d View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    a942033 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    e7669bb View commit details
    Browse the repository at this point in the history
  9. Refactor subtitle width and font size calculations

    Modified `GetSubtileWidth` to use the `text` parameter directly, ensuring accurate width calculation based on provided text. Simplified `GetFontSize` by removing `MediaElement` dependency and applying a 1.5x multiplier for full screen, focusing on the `fontSize` parameter.
    ne0rrmatrix committed Jul 27, 2024
    Configuration menu
    Copy the full SHA
    ff4f6a6 View commit details
    Browse the repository at this point in the history

Commits on Jul 28, 2024

  1. Add Dispose method to SubtitleExtensions for resource cleanup

    Updated SubtitleExtensions in android and macios to include a
    Dispose method for proper resource cleanup. Removed finalizers
    as Dispose now handles cleanup. This prevents potential memory
    leaks by ensuring resources are properly disposed of.
    ne0rrmatrix committed Jul 28, 2024
    Configuration menu
    Copy the full SHA
    4414ae6 View commit details
    Browse the repository at this point in the history

Commits on Jul 29, 2024

  1. Refactor SubtitleExtensions and add CancellationToken support

    - Refactored SubtitleExtensions to inherit from SubtitleTimer<T> and implement IDisposable for resource management.
    - Renamed subtitleView to subtitleTextBlock for clarity.
    - Added CancellationToken support to LoadSubtitles and SubtitleParser.Content methods.
    - Updated MediaManager classes to pass CancellationToken.
    - Enhanced OnFullScreenChanged method and updated related methods to use subtitleTextBlock.
    - Included debug logging in UpdateSubtitle.
    - Improved code style and added comments for better readability.
    ne0rrmatrix committed Jul 29, 2024
    Configuration menu
    Copy the full SHA
    7dab55e View commit details
    Browse the repository at this point in the history
  2. Fix spacing issues

    ne0rrmatrix committed Jul 29, 2024
    Configuration menu
    Copy the full SHA
    6ae8dea View commit details
    Browse the repository at this point in the history
  3. Refactor to remove early return in subtitle cue logic

    Refactored the code to eliminate the early return pattern when no matching `SubtitleCue` is found. The `cue` variable is now assigned directly, and subsequent logic is wrapped in a conditional check to handle the case when `cue` is not null. This change simplifies the code flow by reducing the number of return statements and consolidating the logic within a single block.
    ne0rrmatrix committed Jul 29, 2024
    Configuration menu
    Copy the full SHA
    22a964e View commit details
    Browse the repository at this point in the history

Commits on Aug 2, 2024

  1. Configuration menu
    Copy the full SHA
    c885c94 View commit details
    Browse the repository at this point in the history

Commits on Aug 3, 2024

  1. Configuration menu
    Copy the full SHA
    02b6222 View commit details
    Browse the repository at this point in the history

Commits on Aug 4, 2024

  1. Configuration menu
    Copy the full SHA
    3bba920 View commit details
    Browse the repository at this point in the history

Commits on Aug 8, 2024

  1. Configuration menu
    Copy the full SHA
    c074229 View commit details
    Browse the repository at this point in the history

Commits on Aug 9, 2024

  1. Configuration menu
    Copy the full SHA
    ef100f0 View commit details
    Browse the repository at this point in the history
  2. Fix merge errors

    ne0rrmatrix committed Aug 9, 2024
    Configuration menu
    Copy the full SHA
    a5d7383 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    e6c62cf View commit details
    Browse the repository at this point in the history

Commits on Aug 19, 2024

  1. Configuration menu
    Copy the full SHA
    74aeecc View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    20ba5b4 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    69e11a2 View commit details
    Browse the repository at this point in the history

Commits on Aug 21, 2024

  1. Configuration menu
    Copy the full SHA
    b418ee2 View commit details
    Browse the repository at this point in the history

Commits on Aug 25, 2024

  1. Configuration menu
    Copy the full SHA
    ea906cd View commit details
    Browse the repository at this point in the history

Commits on Aug 29, 2024

  1. Configuration menu
    Copy the full SHA
    66b752a View commit details
    Browse the repository at this point in the history

Commits on Sep 2, 2024

  1. Configuration menu
    Copy the full SHA
    739e9f8 View commit details
    Browse the repository at this point in the history

Commits on Sep 9, 2024

  1. Configuration menu
    Copy the full SHA
    21ae2c1 View commit details
    Browse the repository at this point in the history

Commits on Sep 10, 2024

  1. Configuration menu
    Copy the full SHA
    478ca42 View commit details
    Browse the repository at this point in the history
  2. Fix merge bug

    ne0rrmatrix committed Sep 10, 2024
    Configuration menu
    Copy the full SHA
    581dcdd View commit details
    Browse the repository at this point in the history

Commits on Sep 11, 2024

  1. Configuration menu
    Copy the full SHA
    6f39c17 View commit details
    Browse the repository at this point in the history

Commits on Sep 16, 2024

  1. Configuration menu
    Copy the full SHA
    686c2d9 View commit details
    Browse the repository at this point in the history

Commits on Sep 24, 2024

  1. Configuration menu
    Copy the full SHA
    bdb69eb View commit details
    Browse the repository at this point in the history

Commits on Sep 27, 2024

  1. Configuration menu
    Copy the full SHA
    16d20ce View commit details
    Browse the repository at this point in the history

Commits on Oct 21, 2024

  1. Configuration menu
    Copy the full SHA
    a6b0b78 View commit details
    Browse the repository at this point in the history
  2. Fix MediaElement source assignment in ChangeSourceClicked

    Removed an incomplete line that set `MediaElement.Source` without a value. Now, `MediaElement.Source` is correctly assigned to a `MediaSource` created from the `hlsStreamTestUrl` URI, ensuring proper source update in the `loadHls` case.
    ne0rrmatrix committed Oct 21, 2024
    Configuration menu
    Copy the full SHA
    bddca10 View commit details
    Browse the repository at this point in the history

Commits on Oct 31, 2024

  1. Configuration menu
    Copy the full SHA
    78b3291 View commit details
    Browse the repository at this point in the history

Commits on Nov 5, 2024

  1. Configuration menu
    Copy the full SHA
    29b5ffc View commit details
    Browse the repository at this point in the history

Commits on Nov 7, 2024

  1. Configuration menu
    Copy the full SHA
    7709c24 View commit details
    Browse the repository at this point in the history

Commits on Nov 11, 2024

  1. Configuration menu
    Copy the full SHA
    d6a3b33 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    6eeee75 View commit details
    Browse the repository at this point in the history