nit: this block of code might be easier to read if you used a shorter variable name than preferredSizesRequest.  I often just use 'req' for these request objects if there is only one.  And if you have a local var key='camera.recording.preferredSizes', that will simplify your expressions and you might not have to break them across lines.