DevOps Articles

Curated articles, resources, tips and trends from the DevOps World.

Pinterest: Turbocharge Android Video with These Simple Steps

2 years ago thenewstack.io
Pinterest: Turbocharge Android Video with These Simple Steps

Summary: This is a summary of an article originally published by The New Stack. Read the full original article here →

Social media giant https://help.pinterest.com/en/guide/all-about-pinterest improved Android video performance by optimizing warm-ups, configurations, and player pooling with a few simple steps, according to a recent blog post from company engineers. Engineers of the site consider their work a “never-ending” investigation into the inner workings of https://github.com/google/ExoPlayer, their preferred application-level media player for Android.

ExoPlayer’s default is to parse the video URL to: calculate the aspect ratio invoke on onContentAspectRarioChanged() inform the AspectRatioFrameLayout of the aspect ratio. Since most of the video’s aspect ratios are pre-determined, the following functions can prevent that work from happening: setting the video aspect ratio via AspectRatioFrameLayout.setAspectRatio()

This callback informed Pinterest when it was time to clear out their player cache pool when they got close to sending OOMs.

Made with pure grit © 2024 Jetpack Labs Inc. All rights reserved. www.jetpacklabs.com