Viewing Post Content
Post content viewing involves understanding the parent-child relationship structure and implementing efficient content rendering for different media types. This guide covers how to access, process, and display various types of post content with optimal performance.Posts with media attachments (images, files, videos) follow a Parent-Child relationship where the text content is the parent post and each media item is a separate child post. This structure enables flexible content management and efficient media handling.
Architecture Overview
Post Structure & Hierarchy
Understanding the parent-child relationship is crucial for proper content rendering and efficient data access.- iOS
- Android
- TypeScript
- Flutter
Image Post Content
Image posts support automatic multi-size generation for optimal performance across different display contexts. Each uploaded image is processed into four different sizes with a maximum file size of 1GB.Available Image Sizes
| Size | Description | Use Case |
|---|---|---|
small | Thumbnail size | Profile pictures, preview thumbnails |
medium | Standard display | Feed previews, card layouts |
large | High quality | Detailed view, modal displays |
full | Original resolution | Full-screen viewing, downloads |
- iOS
- Android
- TypeScript
- Flutter
URL Construction for Custom Implementations
For custom image loading implementations, you can construct image URLs manually by appending thesize query parameter:
Valid size parameters:
small, medium, large, fullFile Post Content
File posts support various document types including PDFs, Word documents, spreadsheets, and more. Each file attachment maintains its original metadata and provides secure download capabilities with a maximum file size of 1GB.Supported File Types
Documents
PDF, DOC, DOCX, TXT, RTF
Spreadsheets
XLS, XLSX, CSV, ODS
Presentations
PPT, PPTX, ODP
Archives
ZIP, RAR, 7Z, TAR
Code Files
JS, TS, PY, JAVA, CPP
Others
Any file type up to 1GB
- iOS
- Android
- TypeScript
- Flutter
Best Practices for File Posts
File Security & Validation
File Security & Validation
- Always validate file types and sizes before processing
- Implement virus scanning for uploaded files
- Use secure download URLs with expiration
- Check file permissions before download attempts
Performance Optimization
Performance Optimization
- Implement download progress indicators for better UX
- Cache file metadata to avoid repeated API calls
- Use background downloads for large files
- Implement download queue management for multiple files
Error Handling
Error Handling
- Handle network interruptions gracefully
- Provide retry mechanisms for failed downloads
- Show meaningful error messages to users
- Implement fallback mechanisms for unsupported file types
Storage Management
Storage Management
- Clean up temporary files after use
- Implement storage quota management
- Provide options to delete downloaded files
- Monitor available storage space
For detailed file handling information, refer to the File Management Guide.
Video Post Content
Video posts support automatic transcoding into multiple resolutions for optimal playback across different devices and network conditions. Each uploaded video (up to 1GB) is processed into various quality levels while maintaining the original version for high-quality viewing.Available Video Resolutions
1080p (Full HD)
High quality for desktop and large screens
720p (HD)
Standard quality for most devices
480p (SD)
Medium quality for mobile and slower connections
360p (Low)
Low quality for very slow connections
Original
Original uploaded resolution (immediately available)
Transcoding Process: While the original video is immediately available after upload, transcoded versions take time to process. Always check resolution availability before playback.
- iOS
- Android
- TypeScript
- Flutter
Video Transcoding Status
Understanding transcoding status is crucial for providing the best user experience:Immediate Availability
Immediate Availability
- Original Quality: Available immediately after upload
- Use original quality as fallback while transcoded versions process
- Monitor transcoding progress for quality upgrades
Transcoding Timeline
Transcoding Timeline
- 360p: Usually ready within 1-2 minutes
- 480p: Ready within 2-3 minutes
- 720p: Ready within 3-5 minutes
- 1080p: Ready within 5-10 minutes
- Processing time varies with video length and complexity
Quality Selection Strategy
Quality Selection Strategy
- Start with the highest available quality for current network
- Implement fallback chain: preferred → available → original
- Use adaptive streaming when multiple qualities are ready
Best Practices for Video Posts
Network Optimization
- Implement adaptive bitrate streaming
- Monitor network conditions continuously
- Provide manual quality selection options
- Cache video metadata for quick access
User Experience
- Show loading states with thumbnails
- Provide seek preview thumbnails
- Implement background/foreground handling
- Add picture-in-picture support where available
Performance
- Pre-generate video thumbnails
- Implement video preloading for better UX
- Use efficient video codecs (H.264/H.265)
- Monitor memory usage during playback
Error Handling
- Handle network interruptions gracefully
- Provide retry mechanisms for failed streams
- Show meaningful error messages
- Implement fallback to lower qualities
For comprehensive video handling information, refer to the Video Handling Guide.
Live Stream Post Content
Live stream posts enable real-time video broadcasting and interactive engagement within social feeds. These posts support live video streaming with real-time chat, viewer interactions, and automatic recording capabilities.Live Stream Features
Real-time Broadcasting
High-quality live video streaming with adaptive bitrate
Interactive Chat
Real-time messaging and audience engagement
Stream Recording
Automatic recording for post-stream playback
Viewer Analytics
Live viewer count and engagement metrics
- iOS
- Android
- TypeScript
Stream States & Handling
Understanding different stream states is essential for providing appropriate user experiences:- Live State
- Ended State
- Scheduled State
Best Practices for Live Streams
Real-time Performance
Real-time Performance
- Use WebRTC for lowest latency streaming
- Implement adaptive bitrate based on network conditions
- Buffer management for smooth playback
- Handle network interruptions gracefully
Chat & Interactions
Chat & Interactions
- Rate limiting for chat messages to prevent spam
- Moderation tools for inappropriate content
- Emoji reactions for quick engagement
- Real-time viewer count updates
Error Handling
Error Handling
- Automatic reconnection for network issues
- Fallback to recorded version if live fails
- Clear error messages for users
- Graceful degradation for unsupported devices
Analytics & Monitoring
Analytics & Monitoring
- Track viewer engagement metrics
- Monitor stream quality and performance
- Record chat activity and reactions
- Generate post-stream analytics reports
For comprehensive live streaming setup and configuration, refer to the Video Streaming Guide.
Poll Post
Poll posts enable interactive user engagement through voting mechanisms integrated directly into the post feed. These posts contain poll data with customizable options and real-time result tracking.Architecture Overview
Poll Post Structure
Poll posts follow a parent-child architecture where the poll is embedded as a child post:| Component | Description | Properties |
|---|---|---|
| Parent Post | Main post container | Text content, metadata, child references |
| Poll Child | Embedded poll data | Question, options, vote counts, expiration |
| Vote Results | Real-time statistics | Vote counts per option, total votes, percentages |
Accessing Poll Data
- iOS
- Android
- TypeScript
- Flutter
Best Practices
User Experience Optimization
User Experience Optimization
- Visual Feedback: Provide immediate visual feedback when users vote
- Real-time Updates: Show live vote counts and percentages
- Accessibility: Include proper ARIA labels and keyboard navigation
- Mobile Responsive: Ensure poll UI works well on all screen sizes
- Progress Indicators: Show voting progress with animated bars
Performance Considerations
Performance Considerations
- Efficient Updates: Use selective UI updates for real-time changes
- Caching Strategy: Cache poll results to reduce API calls
- Batch Operations: Group multiple vote submissions when possible
- Memory Management: Properly dispose of real-time subscriptions
- Network Optimization: Implement retry logic for failed votes
Error Handling
Error Handling
- Vote Validation: Check poll status before allowing votes
- Network Errors: Handle offline scenarios gracefully
- Permission Checks: Verify user can vote before showing options
- Expired Polls: Disable voting for closed polls
- Rate Limiting: Implement vote throttling to prevent spam
Error Handling
| Error Type | Description | Recommended Action |
|---|---|---|
| Poll Not Found | Poll child post missing or invalid | Display post without poll functionality |
| Poll Expired | Voting attempted on closed poll | Show “Poll Closed” message |
| Network Error | Vote submission failed | Retry with exponential backoff |
| Permission Denied | User lacks voting permissions | Hide voting interface |
| Invalid Vote | Malformed vote data | Validate input before submission |
Real-World Use Cases
Community Feedback
Gather opinions on community decisions, feature requests, or content preferences with engaging poll interfaces.
Content Curation
Let users vote on best content, favorite posts, or trending topics to improve content discovery algorithms.
Event Planning
Use polls to decide on event dates, locations, activities, or gather attendee preferences for better planning.
Product Research
Collect user preferences, feature priorities, or market research data through embedded poll interactions.
For comprehensive poll creation and management features, refer to the Polls Guide. Poll posts automatically inherit all poll features including expiration, vote limits, and moderation controls.