twilio / cocoapod-specs

https://www.twilio.com/
10 stars 15 forks source link

Podspec for Video sdk version 1.0.0-beta2 #39

Closed piyushtank closed 7 years ago

ceaglest commented 7 years ago

👍 Lets hold off on merging this until the QS changes are ready.

AndrewBarba commented 7 years ago

Hey guys I've been testing beta2 since this PR was put up and .attach() is not working well at all compared to beta1. With no code changes from beta1 to beta2 I can maybe get a video track to render via attach 1 out of 50 times. Incredibly inconsistent, especially in an app extension (specifically a iMessage app). Going back to beta1 everything works as expected regarding rendering.

ceaglest commented 7 years ago

@AndrewBarba thanks for the early feedback. We made some changes to renderer behavior to make our OpenGL and Metal implementations more consistent, and to prevent using GPU resources in the background at initialization time. Sounds like the issue you are having in your extension is that the renderers now pause rendering while the application is in the inactive state.

If you use beta1 and force the use of OpenGL rendering do you have any rendering problems? Even in beta1 the OpenGL renderer would never render unless the application is active.

Edit: For context, what type of extension are you writing?

AndrewBarba commented 7 years ago

@ceaglest Thanks for the update! Yes it is in the extension that I am seeing this happen. It is an iMessage application with NO parent app, just an extension, which is allowed specifically for iMessage apps in the new app store.

Perhaps a build option could be provided to make the SDK extension safe? A few other popular open source libraries do this so you can use the SDK in a regular app and provide a build option in Podfile for extension targets.

Ex. PureLayout

ceaglest commented 7 years ago

@AndrewBarba I appreciate your response. We did some investigation into this issue, and unfortunately the beta2 release will not support this use case properly. Our team will consider how to properly support extensions in future releases, especially given that our SDK is delivered in pre-compiled form. We have updated the beta2 release notes to mention this issue.

For TVIVideoViewRenderer we would prefer to to have automatic detection of application state (by default) so that developers do not need to worry about GPU related crashes in the background. In the future I could see adding a public API to enable / disable the renderer so that you could call it in response to extension lifecycle events.

AndrewBarba commented 7 years ago

@ceaglest Totally understand. Would really appreciate a re-visit of extensions in a future beta, I have an app thats pretty much ready to go otherwise :) Also happy to share code if it helps you guys test / see use cases.