This guide covers how to access and play recorded rooms after a live broadcast ends, including handling recording availability, implementing video players with seek controls, and managing recordings across all platforms.
class RecordingErrorHandler { func handleError(_ error: Error, for room: AmityRoom) { let errorDescription = error.localizedDescription.lowercased() if errorDescription.contains("not found") || errorDescription.contains("404") { // Recording may have been deleted or not available showError("Recording Not Available", message: "This recording is no longer available") } else if errorDescription.contains("network") { showError("Network Error", message: "Please check your connection and try again") } else if errorDescription.contains("expired") { // Recording URL expired, refresh it refreshRecordingUrl(room: room) } else { showError("Playback Error", message: error.localizedDescription) } } private func refreshRecordingUrl(room: AmityRoom) { // Re-fetch room to get fresh recording URLs let roomRepository = AmityVideoClient.newRoomRepository() let liveRoom = roomRepository.getRoom(room.roomId) liveRoom.observeOnce { liveObject, error in guard let freshRoom = liveObject.object else { return } let newInfos = freshRoom.getRecordedPlaybackInfos() // Retry playback with new URLs } }}
Recording Storage: Recordings are stored based on your network configuration. Contact support if you need to modify retention policies or storage limits.
Performance: For long recordings, consider implementing progressive loading or chunked playback to reduce initial load times and memory usage.