Skip to content

Comments

Add webm support#233

Closed
CEBATOR wants to merge 5 commits into8of:developfrom
CEBATOR:add-webm-support
Closed

Add webm support#233
CEBATOR wants to merge 5 commits into8of:developfrom
CEBATOR:add-webm-support

Conversation

@CEBATOR
Copy link
Contributor

@CEBATOR CEBATOR commented Feb 3, 2020

Background

WEBM support was down for a while, and it's frustrating given that most video content on 2ch is in that exact format. Since iOS has no native support for that format, I had to use VLCKit

What has been done

  1. Updated target to deploy target to iOS 9 (needed 9.0 for safe area support.)
  2. Add VLCKit pod
  3. Integrated Swift into the project
  4. Created VLCPlayer view controller
  5. Add Icons for the player view
  6. Update readme file to reflect the new minimal iOS version

How to test

  1. Proofread the code (might have grammatical errors)
  2. Start the app
  3. Open a thread that has WebM files
  4. Tap on any WebM file
  5. Make sure the video starts muted
  6. Test that the controls are working properly
  7. Make sure that the play/pause and mute/unmute buttons have opposite action relative to the player state. (ex. should be pause while video playing)

TODO (sometimes in the future)

  • Player controls have a bit of delay on tap
  • There is a bug that will not let the video to play from the start once the playback is finished.
  • Update deprecated code.
  • Player controls are not hiding.
  • No error is presented when the URL to WebM is broken

@CEBATOR CEBATOR requested a review from 8of February 3, 2020 17:52
@BadMachine
Copy link

@CEBATOR Why this app is not available in Russian store?

@CEBATOR
Copy link
Contributor Author

CEBATOR commented Feb 9, 2020

@BadMachine A few reasons

  • it has a lot of deprecated code, that needs to be updated before it can be submitted
  • even though the NSFW boards are hidden behind a pop-up, the possibility to add them could be enough for Apple to not approve the app

I might try to upload it to appstore after I finish updating, given that GLP3 license allows that.

In the meantime, you can build the app yourself, if you have access to a mac.

@BadMachine
Copy link

@CEBATOR Thanks for your answer!

Copy link
Owner

@8of 8of left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • Good PR. Extra ❤️ for using final and private in the right places.
  • Make suggested small improvement and I'll merge it.
  • About "a bug that will not let the video to play from the start once the playback is finished". Is there a simple option in VLC to loop the video? It would solve the problem for now.
  • While we are at it, add credentials to the Readme at the end. Something like WebM support by [your nick/name and link] will do.

pod 'Texture', '2.5.1'
pod 'TUSafariActivity', '1.0.4'
pod 'YapDatabase', '3.0.2'
pod 'MobileVLCKit', '~>3.3.0'
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's set the exact version here (without ~>) for stability, for now.

CODE_SIGN_IDENTITY = "iPhone Developer";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
DEFINES_MODULE = YES;
DEVELOPMENT_TEAM = Q9324QX3V7;
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Auto-change, let's remove it.

var interactor: VLCPlayerViewOutput!
var player: VLCMediaPlayer?

@IBOutlet weak var playerView: UIView!
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I suggest we mark everything private if we aren't accessing it from outside. Even IBOutlets and IBActions.


// IBAction

@IBAction func progressBarWasMoved(_ sender: UISlider) {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can move every private method to a private local extension. Code will be more organized, robust and predictable.


+ (UIAlertController *)webmDeprecatedAlert {
UIAlertController *alertController = [UIAlertController
alertControllerWithTitle:NSLS(@"DEPRECATED")
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can get rid of "Deprecated" in both localizations as well.

@8of 8of self-assigned this May 7, 2020
@8of
Copy link
Owner

8of commented Jul 7, 2021

Surprisingly, several people asked me lately to finally merge this PR or add WebM support at least somehow.

It was an Objective C-only project so far. I decided to leave it that way and ported the code to Objective C.

Current video controls implementation is really frustrating. Because of delay after tap. The only control I left is a tap on video view to mute / unmute current video.

I'll try to look into the problem later if I'll have time. Maybe, I'll implement full thread playlist for convenient webm threads surfing.

Anyway, you pushed the project in the right direction and new credit in README file is well deserved. Cheers! 🙌

@8of 8of closed this Jul 7, 2021
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.

3 participants