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

Fixed: Zimit2 Youtube video still doesn't play on Android reader. #3879

Merged
merged 1 commit into from
Jun 13, 2024

Conversation

MohitMaliFtechiz
Copy link
Collaborator

Fixes #3860

  • YouTube videos were not playing in the Android reader because the response code for the video URL was 206 (Partial Content). The Content-Range header of the incoming data was being set incorrectly. This happened because the data had a size of 0, as the content was being written on the IO thread (to avoid blocking the UI thread) when loading in the WebView. Due to this, the Content-Range was set incorrectly, preventing the YouTube video from playing.

Screenshot from 2024-06-12 17-30-05

  • To fix this, the correct content length is now passed to the Content-Range header, ensuring that the video plays correctly.
screen-20240612-181449.mp4

* YouTube videos were not playing in the Android reader because the response code for the video URL was 206 (Partial Content). The `Content-Range` header of the incoming data was being set incorrectly. This happened because the `data` had a size of 0, as the content was being written on the IO thread (to avoid blocking the UI thread) when loading in the WebView. Due to this, the `Content-Range` was set incorrectly, preventing the YouTube video from playing.
* To fix this, the correct content length is now passed to the `Content-Range` header, ensuring that the video plays correctly.
Copy link

codecov bot commented Jun 12, 2024

Codecov Report

Attention: Patch coverage is 0% with 1 line in your changes missing coverage. Please review.

Project coverage is 53.55%. Comparing base (8e08ace) to head (36afec6).

Files Patch % Lines
...iwix/kiwixmobile/core/reader/ZimReaderContainer.kt 0.00% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##               main    #3879      +/-   ##
============================================
- Coverage     53.59%   53.55%   -0.04%     
- Complexity     1396     1397       +1     
============================================
  Files           301      301              
  Lines         11556    11556              
  Branches       1521     1521              
============================================
- Hits           6193     6189       -4     
- Misses         4367     4372       +5     
+ Partials        996      995       -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@kelson42 kelson42 merged commit d099876 into main Jun 13, 2024
9 of 10 checks passed
@kelson42 kelson42 deleted the Fixes#3860 branch June 13, 2024 08:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Zimit2 Youtube video still doesn't play on Android reader
3 participants