PaoloCuscela / Cards

Awesome iOS 11 appstore cards in swift 5.
MIT License
4.21k stars 275 forks source link

No easy way to manually tell CardPlayer to play video #17

Closed WillChilcutt closed 7 years ago

WillChilcutt commented 7 years ago

Inside of CardPlayer the player variable has been exposed, I'm guessing with the intent to allow manipulating the video player.

Unfortunately calling play() on the player object does not cause the play button to disappear.

The alternative could be to call the playTapped() method which seems to be done when auto play is turned on, but this method is not exposed thus cannot be called from outside the class.

Exposing the playTapped() seems like a hacky solution as the name is not really something you would expect for an outside class to know, so maybe another method named startVideo() or playVideo() would be more appropriate.

Thanks!

PaoloCuscela commented 7 years ago

Yes, sure. The CardPlayer file is quite in alpha stage right now. Code in there is a bit messy, I'm planning to clean up it in 1.2.6 I'll add for sure play() and pause() methods to manually interact with the player.

Sent with GitHawk

WillChilcutt commented 7 years ago

No problem on the alpha stage! I just thought you'd be interested on knowing how others are using your code! Thanks!

PaoloCuscela commented 7 years ago

Yes, absolutely. Thank you very much for that :)