How fbsamples/360-video-player-for-android works
Project type and purpose
• This is a single-module Android application (“app”) whose purpose is to demonstrate playback of a 360° equirectangular video on a device. It uses standard Android framework components (Activity, TextureView, MediaPlayer) together with an OpenGL ES rendering pipeline (shaders and scene renderer) to map video frames onto a sphere.
File structure
• Top-level Gradle files (build.gradle, settings.gradle, gradlew, etc.) define the Android build and dependency system.
• The only code module is app/, containing:
• AndroidManifest.xml (declares the launch Activity)
• java/com/oculus/sample/ – main code in packages:
– SphericalPlayerActivity (entry point, UI controller)
– player/SphericalVideoPlayer (wrapper around MediaPlayer to feed frames)
– gles/ (EGLRenderTarget, GLHelpers, ShaderProgram, Sphere geometry, SphericalSceneRenderer)
• res/raw/ (sample360.mp4 + GLSL shader source)
• Standard Android resource folders (layouts, mipmaps, values).
README for additional insights
• Confirms the app uses MediaPlayer + TextureView + OpenGL ES to render 360 video on a spherical mesh.
• Touch gestures map to yaw/pitch adjustments in the renderer.
• No network or external services—standalone playback.
Diagramming conventions
• Playback pipeline in another (e.g., green)
• Rendering pipeline in a third (e.g., orange)
• System/OS layer in gray